源码/核心板/Src/OnChipDevices/Usart.c
@@ -288,7 +288,24 @@ m_EUART_TxFrm_Head = EUART_TX_FRM_SIZE-1; m_EUART_TxFrm_FreeFrmLen++; } void USART_putc(char c) { //while(!(USART2->SR & 0x00000040)); //USART_SendData(USART2,c); /* e.g. write a character to the USART */ USART_SendData(USART1, c); /* Loop until the end of transmission */ while (USART_GetFlagStatus(USART1, USART_FLAG_TC) == RESET) ; } void USART_puts(uint8_t *s,uint8_t len) { int i; for(i=0; i<len; i++) { USART_putc(s[i]); } } int fputc(int ch, FILE *f) {