/* ****************************************************************************** * * @file uart.h * @brief uart module * * * @version 1.0 * @date 2023/05/12 09:59:40 * @author Alex Xu * * Copyright (c) 2013-2099,Tkplusemi Technology Co.,Ltd. * All Rights Reserved * * History: * Revision Date Author Desc * 1.0.0 2023/07/12 Alex build this file ****************************************************************************** */ #ifndef __UART_H__ #define __UART_H__ #include "define.h" #define Baud_Rate0 115200//9600//19200//38400//93750 #define S0REL_VALUE (1024-375000/Baud_Rate0) #ifdef _DEBUG_ALL extern char putchar (char ch); #endif #if UART0_ENABLE #ifdef VOX_RX #define COM0_Data_Lenth 11 #if defined(QIANCHENG) //岍丞 #define COM0_Data_Lenth 11 #elif defined(ZHONGKELANXUN) //中科蓝讯 #define COM0_Data_Lenth 16 #elif defined(XIAOMI) #define COM0_Data_Lenth 64 #endif extern idata uint8_t RX0_Buffer[COM0_Data_Lenth]; //接收缓冲 extern bit Uart0_RX_Finish_Flag; #endif //extern void UART0_Init(void); extern void Uart0SendData(uint8_t Txdata); #ifdef VOX_TX extern void Uart0SendPacket(uint16_t Length,uint8_t *TransBuf); #endif #endif #endif