Both_Way_Comm_SY8833/UsrInc/uart/uart.h

73 lines
1.3 KiB
C

/*
******************************************************************************
*
* @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