Release:5.20灰测
This commit is contained in:
35
Core/User/Driver/drv_usart.h
Normal file
35
Core/User/Driver/drv_usart.h
Normal file
@@ -0,0 +1,35 @@
|
||||
|
||||
#ifndef __DRV_USART_H
|
||||
#define __DRV_USART_H
|
||||
|
||||
/* Suppress warning messages */
|
||||
#if defined(__CC_ARM)
|
||||
// Suppress warning message: extended constant initialiser used
|
||||
#pragma diag_suppress 1296
|
||||
#elif defined(__ICCARM__)
|
||||
#elif defined(__GNUC__)
|
||||
#endif
|
||||
|
||||
/* includes ----------------------------------------------------------------------------------------------*/
|
||||
#include "global.h"
|
||||
|
||||
/* macro ------------------------------------------------------------------------------------------------*/
|
||||
#define UART1_TX_BUFFER_SIZE 512
|
||||
#define UART1_RX_BUFFER_SIZE 512
|
||||
|
||||
#define UART3_TX_BUFFER_SIZE 256
|
||||
#define UART3_RX_BUFFER_SIZE 256
|
||||
|
||||
/* global variable ---------------------------------------------------------------------------------------*/
|
||||
extern uint8_t uart1_rx_buffer[UART1_RX_BUFFER_SIZE];
|
||||
extern uint8_t uart1_tx_buffer[UART1_TX_BUFFER_SIZE];
|
||||
|
||||
extern uint8_t uart3_rx_buffer[UART3_RX_BUFFER_SIZE];
|
||||
extern uint8_t uart3_tx_buffer[UART3_TX_BUFFER_SIZE];
|
||||
/* function prototype ------------------------------------------------------------------------------------*/
|
||||
extern void drv_usart_init(void); // 初始化所有串口
|
||||
extern void air724_callback_fun(void); // 4G数据接收回调函数
|
||||
extern void rs485_callback_fun(void); // RS485数据接收回调函数
|
||||
extern void Air724_Message_Send(uint8_t *data, uint16_t len); // 4G数据发送函数
|
||||
extern void Rs485_Message_Send(uint8_t *data, uint16_t len); // RS485数据发送函数
|
||||
#endif /* __DRV_USART_H */
|
||||
Reference in New Issue
Block a user