📄 example_dps2812m_sci.h
字号:
/* =================================================================================
File name: Mudbus.H (28x version)
Originator: R&D Group
NIE
Description:
Header file containing constants, data type definitions, and
function prototypes for the communication.
=====================================================================================
History:
-------------------------------------------------------------------------------------
03-16-2005 Release Rev 1.0
------------------------------------------------------------------------------*/
#ifndef __Example_DPS2812M_SCI_H__
#define __Example_DPS2812M_SCI_H__
#define COMRXSUCCESS 2
#define COMTXSUCCESS 3
#define TX 1
#define RX 0
#define COMMERROR 0xff
#define MODULE 0xf0
#define PARANUMMIN 0
#define PARANUMMAX 40
#define RS232 1
#define RS485 0
typedef struct {
int far *TabValuePoint;
unsigned int PortSel; //端口选择;硬件上1-SCIA为232,0-SCIB为485
unsigned int CommFlag; //接收发送选择
unsigned int CommLen; //桢通讯长度
unsigned int Count; //通讯计数
unsigned int FrameError; //错误标志
unsigned char CommData[40]; //
void (*Comm)();
} SCI_DRV;
typedef SCI_DRV *SCI_DRV_handle;
/*------------------------------------------------------------------------------
datatab in Mudbus.C
------------------------------------------------------------------------------*/
extern int Out_Data[40];
//故障代码地址
/*-----------------------------------------------------------------------------
Default initalizer for the Mudbus object.
-----------------------------------------------------------------------------*/
#define SCI_DRV_DEFAULTS { &Out_Data[0], \
0,\
0,\
8,\
0,\
0, \
{0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,\
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,},\
(void (*)(Uint32))Comm}
/*------------------------------------------------------------------------------
Prototypes for the functions in Mudbus.C
------------------------------------------------------------------------------*/
void Comm(SCI_DRV_handle);
void InitSciRS485(void);
void InitSciRS232(void);
//extern volatile struct TABLE Table;
#endif
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -