update template

This commit is contained in:
2026-02-18 17:44:38 +08:00
parent d324d5f92a
commit 7419dec1b5
14 changed files with 1076 additions and 281 deletions

View File

@@ -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;
}