⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 commtype.h

📁 瑞斯康公司载波模块串口通信程序,很标准的串口通信程序,可以作为学习参考.
💻 H
字号:

/**********************************************************************************************************
File:		CommType.h
Reference:	
Purpose:
To Do:		
**********************************************************************************************************/
#ifndef _COMMTYPE_H
#define _COMMTYPE_H

/*---------------------------------------------------------------------------------------------------------
Section: 头文件
---------------------------------------------------------------------------------------------------------*/

/*---------------------------------------------------------------------------------------------------------
Section: 常数定义
---------------------------------------------------------------------------------------------------------*/
#define UID_LEN			6	/* Length of the Unique Node Id.         */
#define MB_BUF_LEN		256
#define MAX_NODE_NUM	200 
#define RTITEM_LEN		9 
#define MAX_SUBNET_NUM	127
#define MSG_MAX_LEN		256
/*---------------------------------------------------------------------------------------------------------
Section: 宏定义
---------------------------------------------------------------------------------------------------------*/

/*---------------------------------------------------------------------------------------------------------
Section: 类型定义
---------------------------------------------------------------------------------------------------------*/
/* 以下 typedef 要根据所用编译作变化.其余文件应只用 int8, int16, uint8 等. 应用应尽可能用 nint, nlong 等 */
typedef char                int8;
typedef short int           int16;
typedef long int            int32;
typedef unsigned char       uint8;
typedef unsigned short int  uint16;
typedef unsigned long int   uint32;

/* int long 等的典型 709.1 定义. */
typedef int8                nshort;
typedef int8                nint; 
typedef uint8               nuint;
typedef uint8               nushort;
typedef int16               nlong;
typedef uint32              nulong;

typedef unsigned char		Byte;
typedef unsigned char		Bits;

/* 在移植到其它平台时,这里的类型定义或许要用 #ifndef 宏包围. */
typedef enum 
{
	FALSE = 0,
	TRUE  = 1
} Boolean;

typedef Boolean boolean; /* For nc compatibility. */

/*---------------------------------------------------------------------------------------------------------
Section: 常量定义
---------------------------------------------------------------------------------------------------------*/

/*---------------------------------------------------------------------------------------------------------
Section: 全局函数原型.
---------------------------------------------------------------------------------------------------------*/

#endif /* #ifndef _COMMTYPE_H */
/*-------------------------------------------- End of CommType.h -----------------------------------------*/

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -