25 lines
884 B
C
25 lines
884 B
C
#ifndef __RS232x_H
|
||
#define __RS232x_H
|
||
#include "stm32f10x.h"
|
||
#include "syslib.h"
|
||
|
||
/*****************************************
|
||
*驱动可供外部使用的常变量
|
||
****************************************/
|
||
#define RS232_COM COM5 //RS232映射的串口
|
||
extern FrameQueue_s sRS232Queue ; //RS232 接收数据帧数据环形缓冲区,上层只需要在初始化RS232后,处理该缓冲区数据即可
|
||
|
||
/*****************************************
|
||
*内部函数声明
|
||
****************************************/
|
||
void Rs232RecFrameCallback(char *recvBuf, uint16_t recvLen) ; //RS232接收帧数据回调函数
|
||
|
||
/*****************************************
|
||
*对外接口函数声明
|
||
****************************************/
|
||
extern void RS232Init(uint32_t baudrate) ; //RS232串口初始化
|
||
extern void RS232SendData(char* sendData, uint16_t dataLen) ; //通过RS232_COM端口输出dataLen长度的数据 sendData
|
||
|
||
#endif
|
||
|