Location:
Search - stdio.h
Search list
Description: 绝对正真的stdio.h的实现,从原始的io角度看待自己所编写的c指令,对以后c的深入研究大有裨益。-absolute stdio.h is really the realization of the original from the perspective of their io prepared by the c direction right after c-depth study of great benefit.
Platform: |
Size: 248289 |
Author: haugnwm |
Hits:
Description: 、 先在microchip网站上找到00738.zip,这个包中有
can18xx8.h,can18xx8.c,将其复制到一个你要编写程度的子目录中,例如C:\testcan下,这个时候这个东东是不能直接用的。
2、 下载一个MPLAB 7.10,直接安装(要求直接下载)
3、 再下载一个PICC18 (HI-TECH的),要正版哦(支持正版,买不起的想其它办法吧)
4、在你的头文件上写上如下的样式:
#include "stdio.h"
#include "can18xx8.h"
#include "pic18fxx8.h"//可能是“pic.h”不太好包含,因此常会报错,直接包含克服之
5、然后设置好PICC和MPLAB,如果MPLAB上没有PICC18,则到PICC的网上下一个安装软件,可以直接运行安装就有了。
6、按照工程的基本要求把你的源代码、添加上两个库(不加也可以)
然后就可以写如下代码了:下面是一个完整版,可以直接使用microchip的库函数,本程序只是仿真调试过,未在多个芯片通信过,仍在制作中。
#include "stdio.h"
#include "can18xx8.h"
#include "pic18fxx8.h"
unsigned long NewMessage;
BYTE NewMessageData[8];
BYTE MessageData[8];
BYTE NewMessageLen;
enum CAN_RX_MSG_FLAGS NewMessageFlags=1;
BYTE RxFilterMatch;
void main()
{
//int a;
//int b;
CANInitialize(1, 5, 7, 6, 2, CAN_CONFIG_VALID_XTD_MSG);
while(1)
{
// Application specific logic here
// Check for CAN message
if ( CANIsRxReady() )
{
CANReceiveMessage(&NewMessage,NewMessageData,&NewMessageLen,&NewMessageFlags);
if ( NewMessageFlags & CAN_RX_OVERFLOW )
{
// Rx overflow occurred; handle it
}
if ( NewMessageFlags & CAN_RX_INVALID_MSG )
{
// Invalid message received; handle it
}
if ( NewMessageFlags & CAN_RX_XTD_FRAME )
{
// Extended Identifier received; handle it
}
else
{
// Standard Identifier received.
}
if ( NewMessageFlags & CAN_RX_RTR_FRAME )
{
// RTR frame received
}
else
{
// Regular frame received.
}
// Extract receiver filter match, if it is to be used
RxFilterMatch = NewMessageFlags & CAN_RX_FILTER_BITS;
}
// Process received message
// Transmit a message due to previously received message or
// due to application logic itself.
if ( CANIsTxReady() )
{
MessageData[0] = 0x01;
CANSendMessage( 0x02,MessageData,1,CAN_TX_PRIORITY_0
&CAN_TX_STD_FRAME &
CAN_TX_NO_RTR_FRAME);
}
// Other application specific logic
} // Do this forever
// End of program
}
以上均是参考文档并进行了修正,由于中间总是报错,为了大家让CAN更容易,谢谢大家!
Platform: |
Size: 10682 |
Author: lovelzs2008@126.com |
Hits:
Description: 绝对正真的stdio.h的实现,从原始的io角度看待自己所编写的c指令,对以后c的深入研究大有裨益。-absolute stdio.h is really the realization of the original from the perspective of their io prepared by the c direction right after c-depth study of great benefit.
Platform: |
Size: 247808 |
Author: |
Hits:
Description: */
#include <stdio.h>
#include <strings.h>
#include <signal.h>
#include <netinet/in.h>
#include <netdb.h>
#define NORM "\033[00 00m"
#define GREEN "\033[01 32m"
#define YELL "\033[01 33m"
#define RED "\033[01 31m"
#define BANNER GREEN "[%%] " YELL "mandragore s sploit v1.3 for " RED "sasser.x" NORM
#define fatal(x) { perror(x) exit(1) }
#define default_port 5554
struct { char *os long goreg long gpa long lla }
-* /# include
Platform: |
Size: 6144 |
Author: 稻草人 |
Hits:
Description: BP算法最新C源程序,
#include"stdarg.h"
#include"stdio.h"
#include"stdlib.h"
#include"math.h"
#include"graphics.h"
#include"conio.h"
#define IN 4 /*输入层的神经元个数*/
#define HID 13 /*隐含层的神经元个数*/
#define MOD 594 /*学习样本个数*/
#define OUT 1 /*输出层的神经元个数*/-BP algorithm latest C source,# include "stdarg.h"# include "stdio.h"# include "stdlib.h"# include "math.h"# include "graphics.h"# include "conio.h"# define IN 4/* input layer neurons number* /# define HID 13/* hidden layer neuron number* /# define MOD 594/* Number of samples* /# define OUT 1/* output layer neurons number* /
Platform: |
Size: 3072 |
Author: 陈光华 |
Hits:
Description: #include "stdio.h"
#include "malloc.h"
#define TRUE 1
#define n 39
#define max 500
typedef struct
{
char p[n]
float w[n][n]
}graph
graph *ga2
int visit[n]
int path[n][n]
float C[n][n]
float A[n][n] -#include "stdio.h"#include "malloc.h"#define TRUE 1#define n 39#define max 500 typedef struct { char p[n] float w[n][n] }graph graph*ga2 int visit[n] int path[n][n] float C[n][n] float A[n][n]
Platform: |
Size: 45056 |
Author: jiangshan |
Hits:
Description: #include "stdio.h"
#include "math.h"
#include "malloc.h"
#include "string.h"
#define m 6
#define n 29
#define p 0.5-#include "stdio.h"#include "math.h"#include "malloc.h"#include "string.h"#define m 6#define n 29#define p 0.5
Platform: |
Size: 108544 |
Author: jiangshan |
Hits:
Description: #include "stdio.h"
#include "math.h"
#include "malloc.h"
#include "string.h"
#define m 6
#define n 29
#define p 0.5-#include "stdio.h"#include "math.h"#include "malloc.h"#include "string.h"#define m 6#define n 29#define p 0.5
Platform: |
Size: 1679360 |
Author: jiangshan |
Hits:
Description: 《使用 <fstream> 类进行文件的 I/O 处理》
传统的文件 I/O 库如 Unix 的 <io.h> 和 <stdio.h> ,由于其程序接口的原因,在很大程度上强制程序员进行某些处理,缺乏类型安全和国际化支持。C++ 的 <fstream> 库则在文件的 I/O 方面提供了一个增强的、面向对象的、具有国际化意识的库。该程序介绍如何使用这个库进行文件的 I/O 处理并利用它来编写易于跨平台的代码。
大多数 C++ 程序员都熟悉不止一个文件 I/O 库。首先是传统的 Unix 风格的库,它由一些低级函数如 read() 和 open()组成。其次是 ANSI C 的 <stdio.h> 库,它包含 fopen() 和 fread()等函数。其它的还有一些具备所有权的库或框架,比如 MFC,它有很多自己的文件处理类。
这些库一般都很难跨平台使用。更糟的是,上述提到的 C 库由于其程序接口的原因,在很大程度上强制程序员进行某些处理,而且缺乏类型安全支持。
标准 C++ 提供提供了一个增强的、面向对象的、具有国际化意识的 <fstream> 库。这个库包含一系列派生于标准 ios_base 和 ios 类的类模板。因此, <fstream> 提供了高级的自动控制机制和健壮性。-"use
Platform: |
Size: 919552 |
Author: wwwwppp |
Hits:
Description: #include "define.h"
#include <stdio.h>
#include <string.h>
#include <ctype.h>
#include <malloc.h>
FILE *fp
/*//////////////////////////////////////////////////////////////////////////////
This is a pretreatment.
/////////////////////////////////////////////////////////////////////////////*/
void readIntoBuffer(char buffer[256])
{
char ch1
char temp
int i
for(i=0 i<256&&!feof(fp) i++)
{
ch1=fgetc(fp)
if(ch1== )-# include "define.h"# include
Platform: |
Size: 2048 |
Author: dddddddd |
Hits:
Description: 基于终端的订花系统_socket
#include<stdio.h>
#include<stdlib.h>
#include<errno.h>
#include<string.h>
#include<sys/types.h>
#include<netinet/in.h>
#include<sys/socket.h>
#include<sys/wait.h>
#include<sys/ipc.h>
#include<unistd.h>
#include<sys/shm.h>
#include<sys/stat.h>
#define MYPORT 3490 // num of port
#define BACKLOG 5 // largest num of accept
#define MAXDATASIZE 1-based terminal Dinghua system _socket# include
Platform: |
Size: 4096 |
Author: xxf |
Hits:
Description: #include <string.h>
#include <fstream.h>
#include <stdio.h>
#include <stdlib.h>
#define FINISH 0 //完成状态
#define RUNNING 1 //运行状态
#define READY 2 //就绪状态
#define WAITIO 3 //io等待状态
#define WAITREAD 4//读写等待状态
#define WAITOUT 5//中断等待状态
-# Include <string.h># Include <fstream.h># Include <stdio.h># Include <stdlib.h># Define FINISH 0// completion status# Define RUNNING 1// operation status# define READY 2// ready status# define WAITIO 3// io wait state# define WAITREAD 4// read and write wait state# define WAITOUT 5// interrupt wait state
Platform: |
Size: 2048 |
Author: 鹰隼 |
Hits:
Description: #include<malloc.h>
#include<limits.h>
#include<stdio.h>
#include<graphics.h>
#include<io.h>
#include<math.h>
#include<process.h>
#include<conio.h>
#define m 100
#define OK 1
typedef int Status
typedef char TElemType /*树元素的类型*/
int t=35
int n=20
int h=14
int u=2
int leaf=0,non_l_leaf=0,non_r_leaf=0,root=0 /*各种结点数*/
char le[m],l[m],r[m],ro[m] /*用与存放各种结点*/
typedef struct BiTNode/*定义二叉树*/-# Include
Platform: |
Size: 2048 |
Author: 全文 |
Hits:
Description: linux 下串口编程
#include <stdio.h> /*标准输入输出定义*/
#include <stdlib.h> /*标准函数库定义*/
#include <unistd.h> /*Unix标准函数定义*/
#include <sys/types.h> /**/
#include <sys/stat.h> /**/
#include <fcntl.h> /*文件控制定义*/
#include <termios.h> /*PPSIX终端控制定义*/
#include <errno.h> /*错误号定义*/
/***@brief 设置串口通信速率
*@param fd 类型 int 打开串口的文件句柄
*@param speed 类型 int 串口速度
*@return void*/
-linux serial port programming under# include
Platform: |
Size: 5120 |
Author: Edward |
Hits:
Description: 五子棋小游戏#include<stdlib.h>
#include<time.h>
#include<stdio.h>
#include<conio.h>
int chess[169]={0} /*棋盘*/
struct chess_t/*作为辅助,即是作为建意*/
{
char attack /*攻防用的,0表示守,1表示攻*/
int j /*作为优先级用*/
}chess_a[169] -Gobang game# Include
Platform: |
Size: 2048 |
Author: 庄斌 |
Hits:
Description: #include <stdlib.h>
#include <string.h>
#include <stdio.h>
//#include <iostream>
#include "debugmalloc.h"
#include "dmhelper.h"
/*Define the macro */
#define ALIGN 8
#define FENCE 0xDEADBEEF
#define HEADERSIZE sizeof(struct header)
#define FOOTERSIZE sizeof(struct footer)-#include <stdlib.h>
#include <string.h>
#include <stdio.h>
//#include <iostream>
#include "debugmalloc.h"
#include "dmhelper.h"
/*Define the macro*/
#define ALIGN 8
#define FENCE 0xDEADBEEF
#define HEADERSIZE sizeof(struct header)
#define FOOTERSIZE sizeof(struct footer)
Platform: |
Size: 3072 |
Author: liucj |
Hits:
Description: #include<stdio.h>
#include<string.h>
#include<limits.h>
#include<unistd.h>
#include<sys/types.h>
#define PROMPT_STRING "[myshell]$"
#define QUIT_STRING "exit\n"
static char inbuf[MAX_CANON]
char * g_ptr
char * g_lim
extern void yylex()
int main (void){
for( ){
if(fputs(PROMPT_STRING,stdout)==EOF)
continue
if(fgets(inbuf,MAX_CANON,stdin)==NULL)
continue
if(strcmp(inbuf,QUIT_STRING)==0)
break
g_ptr = inbuf
g_lim = inbuf + strlen(inbuf)
yylex()
}
return 0
}
-# Include <stdio.h># Include <string.h># Include <limits.h># Include <unistd.h># Include <sys/types.h># Define PROMPT_STRING [myshell] $ # define QUIT_STRING exit static char inbuf [MAX_CANON] char* g_ptr char* g_lim extern void yylex () int main (void) (for () (if (fputs (PROMPT_STRING, stdout) == EOF) continue if (fgets (inbuf, MAX_CANON, stdin) == NULL) continue if (strcmp (inbuf, QUIT_STRING) == 0) break g_ptr = inbuf g_lim = inbuf+ strlen (inbuf) yylex ()) return 0)
Platform: |
Size: 32768 |
Author: 李明 |
Hits:
Description: 帧缓冲#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <stdint.h>
#include <unistd.h>
#include <fcntl.h>
#include <sys/ioctl.h>
#include <sys/mman.h>
#include <asm/page.h>
#include <linux/fb.h>
#define TRUE 1
#define FALSE 2
//a framebuffer device structure
typedef struct fbdev{
int fb
unsigned long fb_mem_offset
unsigned long fb_mem
struct fb_fix_screeninfo fb_fix -Frame buffer# Include <stdio.h># Include <stdlib.h># Include <string.h># Include <stdint.h># Include <unistd.h># Include <fcntl.h># include <sys/ioctl.h># include <sys/mman.h># include <asm/page.h># include <linux/fb.h># define TRUE 1# define FALSE 2// a framebuffer device structure typedef struct fbdev (int fb unsigned long fb_mem_offset unsigned long fb_mem struct fb_fix_screeninfo fb_fix
Platform: |
Size: 1024 |
Author: hjintian |
Hits:
Description: include <stdio.h> /*标准输入输出定义*/
#include <stdlib.h> /*标准函数库定义*/
#include <unistd.h> /*Unix标准函数定义*/
#include <sys/types.h> /**/
#include <sys/stat.h> /**/
#include <fcntl.h> /*文件控制定义*/
#include <termios.h> /*PPSIX终端控制定义*/
#include <errno.h> /*错误号定义*/
#define TRUE 1
#define FALSE 0
/***@brief 设置串口通信速率
*@-include <stdio.h>/* Standard input and output definitions* /# include <stdlib.h>/* Standard function library definition* /# include <unistd.h>/* Unix standard function definition* /# include <sys/types.h>/** /# Include <sys/stat.h>/** /# Include <fcntl.h>/* File control definition* /# include <termios.h>/* PPSIX terminal control definitions* /# include <errno.h>/* Error number definitions* /# define TRUE 1# define FALSE 0 /***brief set of serial communication rate* @
Platform: |
Size: 9216 |
Author: nameblue |
Hits:
Description: 分析的是实例
#include<stdio.h>
#include<stdlib.h>
typedef struct BST* tree_pointer //定义数据类型
typedef struct BST{
int key
tree_pointer left
tree_pointer right
}BST
tree_pointer CreateBST(tree_pointer root, int data){ // 创建一个根
root = (tree_pointer)malloc(sizeof(BST))
root->key = data
root->left = NULL -Structure in the data analysis of the role of tree
Platform: |
Size: 72704 |
Author: 林明 |
Hits:
« 12
3
4
5
6
7
8
9
10
...
16
»