764,6 → 764,7 |
s16 UART1_Putchar(char c) |
{ |
u32 timeout = 10000; |
if(DebugUART != UART1) return(0); |
if (c == '\n') UART1_Putchar('\r'); |
// wait until txd fifo is not full |
while(UART_GetFlagStatus(UART1, UART_FLAG_TxFIFOFull) != RESET) if(--timeout == 0) return(0); |
780,8 → 781,9 |
/*****************************************************/ |
void UART1_PutString(u8 *s) |
{ |
if(DebugUART != UART1) return; |
if(s == NULL) return; |
while (*s != '\0' && DebugUART == UART1) |
while (*s != '\0') |
{ |
UART1_Putchar(*s); |
s ++; |