#ifndef    __usart0_H
#define    __usart0_H

#include "hal_data.h"
#include <stdio.h>
#include "Ring_Buffer.h"



#define   RXBUFFLENGTH  5000


#define REV_OK		0	//接收完成标志
#define REV_WAIT	1	//接收未完成标志


extern uint8_t  U1_RxBuff[RXBUFFLENGTH];
extern uint16_t U1_Rxlen;
extern uint16_t U1_RxlencntPre;


#define BUF_SIZE 100

extern uint8_t rx_buffer[BUF_SIZE];


void UART0_Init(void);

void uart0_Send_Byte(uint8_t ch);
void uart0_Send_Bytes(uint8_t *data, uint32_t len);
void uart0_Send_String_Length(uint8_t *str,uint32_t strlen);
void uart0_Send_String(uint8_t *str);

void user_uart_clear(void);
uint8_t user_uart_wait_receive(void);



#endif
