generated from hulk/gd32e23x_template_cmake_vscode
emmm
This commit is contained in:
29
Src/uart.c
29
Src/uart.c
@@ -70,32 +70,3 @@ void rs485_init(void) {
|
||||
|
||||
#endif // RS485_MAX13487
|
||||
}
|
||||
|
||||
// static uart_printf_port_t g_printf_port = UART_PRINTF_USART0;
|
||||
|
||||
// void uart_set_printf_port(uart_printf_port_t port) {
|
||||
// g_printf_port = port;
|
||||
// }
|
||||
|
||||
// // printf 重定向,支持多串口
|
||||
// int __io_putchar(int ch) {
|
||||
// switch (g_printf_port) {
|
||||
// case UART_PRINTF_USART0:
|
||||
// while (usart_flag_get(USART0, USART_FLAG_TBE) == RESET) {}
|
||||
// usart_data_transmit(USART0, (uint8_t)ch);
|
||||
// break;
|
||||
// case UART_PRINTF_USART1:
|
||||
// while (usart_flag_get(USART1, USART_FLAG_TBE) == RESET) {}
|
||||
// usart_data_transmit(USART1, (uint8_t)ch);
|
||||
// break;
|
||||
// case UART_PRINTF_BOTH:
|
||||
// while (usart_flag_get(USART0, USART_FLAG_TBE) == RESET) {}
|
||||
// usart_data_transmit(USART0, (uint8_t)ch);
|
||||
// while (usart_flag_get(USART1, USART_FLAG_TBE) == RESET) {}
|
||||
// usart_data_transmit(USART1, (uint8_t)ch);
|
||||
// break;
|
||||
// default:
|
||||
// break;
|
||||
// }
|
||||
// return ch;
|
||||
// }
|
||||
|
Reference in New Issue
Block a user