33 lines
859 B
C
33 lines
859 B
C
/* USER CODE END Header */
|
|
/* Define to prevent recursive inclusion -------------------------------------*/
|
|
#ifndef __RECEIVEDATA_H__
|
|
#define __RECEIVEDATA_H__
|
|
|
|
#ifdef __cplusplus
|
|
extern "C" {
|
|
#endif
|
|
|
|
/* Includes ------------------------------------------------------------------*/
|
|
#include "main.h"
|
|
#include "ring_queue.h"
|
|
|
|
typedef struct _uart_device_info{
|
|
uint8_t init; //该设备是否初始化准备接收数据标志
|
|
RingQueue uart_ring_queue; //用于维护设备的接收缓存的循环队列
|
|
}uart_device_info;
|
|
|
|
uart_device_info* get_handle_485(void);//获取485操作句柄
|
|
//串口设备缓冲区是否有数据
|
|
int uart_dev_char_present(uart_device_info device);
|
|
//串口设备从缓冲区读入一个数据
|
|
char rs485_dev_in_char(uart_device_info *device);
|
|
|
|
void IRQHandler_485_process(uint8_t c);
|
|
void init_ring_queue(void);
|
|
|
|
#ifdef __cplusplus
|
|
}
|
|
#endif
|
|
#endif /* __RECEIVEDATA_H__ */
|
|
|