int fputc(int ch FILE *f) { while((USART1->SR&0X40)==0);//循环发送直到发送完毕 USART1->DR = (u8) ch; return ch; }