
#define UART2_TX_BUF_SIZE		20
#define UART2_RX_BUF_SIZE		100
typedef struct
{
	unsigned char head;
	unsigned char tail;
}T_Buf_Info;


#ifdef _UART_C_
	T_Buf_Info xdata	uart2_send;
	T_Buf_Info xdata	uart2_rev;
	unsigned char xdata uart2_tx_buf[UART2_TX_BUF_SIZE];
	unsigned char xdata uart2_rx_buf[UART2_RX_BUF_SIZE];
	bit uart2_tx_flag;
#else
	extern T_Buf_Info xdata	uart2_send;
	extern T_Buf_Info xdata	uart2_rev;
	extern unsigned char xdata uart2_tx_buf[UART2_TX_BUF_SIZE];
	extern unsigned char xdata uart2_rx_buf[UART2_RX_BUF_SIZE];
	extern bit uart2_tx_flag;	
#endif


void Uart2_PutChar(unsigned char bdat);
void Uart2_Initial(unsigned long int baudrate);


void uart_printf(char *fmt,...);

