#ifndef DRV_USART2_H #define DRV_USART2_H #define TX_2_BUFFER_SIZE 128 #define RX_2_BUFFER_SIZE 128 #define UART_1_IDAR (0) #define USART_1_BAUND (USART_BAUND) extern DELAY_COMMON uart2_tout; __inline void Uart2_Time_Out(void) { //uart2 if(uart2_tout.set) { if(uart2_tout.count) uart2_tout.count--; else { g_event |= RS485_2_RECEIVE_END_EVENT; uart2_tout.set = 0; uart2_tout.count = 0; } } } void Usart2_Initial(void); int8_t Send_Data_2_RS485(uint8_t*data,uint16_t size); uint16_t Get_RS485_2_Data(uint8_t * dbuf,uint16_t dbuf_len); #endif