#ifndef _UART2_HEAD_H
#define _UART2_HEAD_H

#include "../comm/AI8051U.h"
#include	"intrins.h"
#include "../comm/usb.h"     //USB调试及复位所需头文件
#include <stdio.h>
#include <stdlib.h>

#define Baudrate2   115200UL

#define UART2_BUF_LENGTH    64
#define FOSC			22118400L		//定义主时钟
#define MAIN_Fosc  FOSC

extern u8  RX2_Buffer[UART2_BUF_LENGTH]; //接收缓冲
extern u8  TX2_Cnt;    //发送计数
extern u8  RX2_Cnt;    //接收计数
extern bit B_TX2_Busy; //发送忙标志
extern u8 RX2_TimeOut;

void UART2_TxByte(u8 dat);
void PrintString2(u8 *puts);
void SetTimer2Baudraye(u32 dat);
void UART2_config();

#endif
