feature(rs485):添加RS485驱动支持

This commit is contained in:
2026-07-28 19:45:46 +08:00
parent f6ba273aff
commit 37232c617f
2 changed files with 23 additions and 0 deletions
+8
View File
@@ -51,6 +51,8 @@
#define RTT_PutChar(ch, c)
#endif
#define RS485_MODE CFG_ENABLE // CFG_DISABLE: RS485 off; CFG_ENABLE: RS485 on
/******************************************************************************/
/* Dynamic USART Configuration Structure */
@@ -129,6 +131,12 @@ typedef enum {
#define UART_RX_PIN GPIO_PIN_3
#define UART_BAUDRATE 115200U
#if RS485_MODE == CFG_ENABLE
#define RS485_DE_RCU RCU_GPIOA
#define RS485_DE_PORT GPIOA
#define RS485_DE_PIN GPIO_PIN_1
#endif
/******************************************************************************/
#define DEBUG_UART USART0