update template
This commit is contained in:
@@ -162,10 +162,10 @@ int _execve(char *name, char **argv, char **env)
|
||||
return -1;
|
||||
}
|
||||
|
||||
// USART0 printf重定向实现
|
||||
// UART printf重定向实现
|
||||
int __io_putchar(int ch) {
|
||||
// 等待发送缓冲区空
|
||||
while (usart_flag_get(RS485_PHY, USART_FLAG_TBE) == RESET) {}
|
||||
usart_data_transmit(RS485_PHY, (uint8_t)ch);
|
||||
while (usart_flag_get(DEBUG_UART, USART_FLAG_TBE) == RESET) {}
|
||||
usart_data_transmit(DEBUG_UART, (uint8_t)ch);
|
||||
return ch;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user