本帖最后由 dbayj 于 2010-11-20 19:55 编辑
int fputc(int ch, FILE *f)
{
/* Write a character to the USART */
USART_SendData(USART1, (u8) ch);
/* Loop until the end of transmission */
while(!(USART_GetFlagStatus(USART1, USART_FLAG_TXE) == SET))
{
}
return ch;
}
|