This commit is contained in:
2025-08-11 00:37:12 +08:00
parent c13a7abc84
commit 63d3c30607
5 changed files with 37 additions and 29 deletions

View File

@@ -9,4 +9,15 @@
/******************************************************************************/
#define RS485_RCU RCU_USART0
#define RS485_GPIO_RCU RCU_GPIOA
#define RS485_GPIO_PORT GPIOA
#define RS485_TX_PIN GPIO_PIN_2
#define RS485_RX_PIN GPIO_PIN_3
#define RS485_PHY USART0
#define RS485_BAUDRATE 115200U
#define RS485_EN_PIN GPIO_PIN_1
/******************************************************************************/
#endif //BOARD_CONFIG_H

View File

@@ -9,8 +9,7 @@ typedef enum {
UART_PRINTF_BOTH = 2
} uart_printf_port_t;
void uart0_init(uint32_t baudrate);
void uart1_init(uint32_t baudrate);
void uart0_init(void);
void uart_set_printf_port(uart_printf_port_t port);
#endif // UART_H