//USART1发送数据 --------------------------------------------------------------/
void USART1_Putchar(u8 ch)
{
USART_SendData(USART1, ch);
//等待数据发送完毕
while(USART_GetFlagStatus(USART1, USART_FLAG_TC) == RESET);
}
//USART1接收数据
u8 USART1_Getchar(void)
{
//while(USART_GetFlagStatus(USART1, USART_FLAG_RXNE)== RESET);
while(USART_GetITStatus(USART1, USART_IT_RXNE) == RESET);
//返回接收数据
return(USART_ReceiveData(USART1));
}