stm32_ota/ABM开发板(BOOT源码)/BOOTV2.1/HARDWARE/RS232/rs232.h
2024-12-17 20:03:43 +08:00

25 lines
884 B
C
Raw Permalink Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

#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