五、添加printf的输出定向函数(刚开始我就是没有添加此函数导致printf函数不能正常工作)
int fputc(int ch, FILE *f)
{
/* Place your implementation of fputc here */
/* e.g. write a character to the USART */
USART1->DR = (u8)ch;
/* Loop until the end of transmission */
while (USART_GetFlagStatus(USART1, USART_FLAG_TC) == RESET);