#ifndef _DrvUsart1_h_
#define _DrvUsart1_h_

//#include "stm32f10x_type.h"
#include <stm32f10x.h>

typedef enum {FALSE = 0, TRUE = !FALSE} BOOL;
#define USART1_BUFF_LANGTH 1048

typedef struct 
{
	u32 len;
	u16 ind;	
	u8  buf[USART1_BUFF_LANGTH];
}SerialBuffType;//发送暂存区

#define SerialBuffDefault() {\
	{0,},\
	0,\
	0,\
}

void BspUsart1Init(void);
void BspUsart1Close(void);

void USART1_SendByte(unsigned char c);//串口1发送一个字符
u16 BspUsart1Send(u8 *buf, u16 len);
u16 BspUsart1Receive(u8 *buf);

u8 Usart1ReceiveByte(void);
void BspUsart1IRQCallBack(void *fun);

#endif
