_rs485.h
来自「全自动剥线机(C语言源码+DOC文档说明)」· C头文件 代码 · 共 45 行
H
45 行
/* this is the _rs485.h module, all the communication head parameter is define here. */
/* specification */
/* this program define the following prefix as a rule */
/* p - pointer variable
g - global variable
d - local variable
c - counter
b - bit
lc - local counter
gc - global counter
uchar - unsigned char
uint - unsigned int
ulong - unsigned long
f - function
CN - constant data
AD - constant address */
/* Define the communication constant. */
#define CN_DAHEADLENGTH 6 /* define the data head length. */
#define CN_COMMFLASH 6 /* define the comm flash timer. */
#define CN_DELAYTIMER 45 /* delay for data respond. */
#define CN_FRAME 80 /* the frame byte number. */
#define CN_COMMOK 0x55 /* data communication OK. */
#define CN_COMMERR 0xAA /* data communication err. */
/* define the data receive status value. */
#define CN_ADDR_HANDLE 0
#define CN_DATAHEAD_HANDLE 1
#define CN_DATA_HANDLE 2
/* define the receive flash flag. */
#define CN_RECE_FOFF 0
#define CN_RECE_FON 1
#define CN_RECE_FOFFOVER 2
#define CN_RECE_FONOVER 3
/**************************************************************************
Edit by:
FRANK 20040103 ShenZhen
**************************************************************************/
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?