70 lines
1.8 KiB
C
70 lines
1.8 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__
|
|
|
|
/*_____ I N C L U D E S ____________________________________________________*/
|
|
|
|
#include "define.h"
|
|
|
|
/******************************************************************************\
|
|
Macro definitions
|
|
\******************************************************************************/
|
|
#define Baud_Rate0 9600//9600//19200//38400//93750
|
|
#define S0REL_VALUE (1024-345600/Baud_Rate0)
|
|
|
|
#if UART0_ENABLE
|
|
|
|
|
|
#define COM0_Data_Lenth 11
|
|
|
|
/******************************************************************************\
|
|
Variables definitions
|
|
\******************************************************************************/
|
|
|
|
extern idata uint8_t RX0_Buffer[COM0_Data_Lenth]; //½ÓÊÕ»º³å
|
|
|
|
extern bit Uart0_RX_Finish_Flag;
|
|
|
|
/******************************************************************************\
|
|
Functions definitions
|
|
\******************************************************************************/
|
|
#ifdef _DEBUG_ALL
|
|
|
|
extern char putchar (char ch);
|
|
|
|
#endif
|
|
|
|
//extern void UART0_Init(void);
|
|
|
|
extern void Uart0SendData(uint8_t Txdata);
|
|
|
|
#ifdef VOX_TX
|
|
extern void Uart0SendPacket(uint8_t Length,uint8_t *TransBuf);
|
|
#endif
|
|
|
|
extern void HandleVoxCommMsg(void);
|
|
|
|
#endif
|
|
|
|
#endif
|
|
|