From fdcd7eb467cf26493b25f31a81bcd19bb7ba530b Mon Sep 17 00:00:00 2001 From: Andy Piper Date: Wed, 11 Oct 2023 16:18:22 +0100 Subject: [PATCH] hwdef: adjust serial protocol defaults on various boards for 4.4 naming scheme --- .../AP_HAL_ChibiOS/hwdef/BETAFPV-F405/hwdef.dat | 4 +++- .../AP_HAL_ChibiOS/hwdef/MambaF405v2/hwdef.dat | 2 +- .../hwdef/SpeedyBeeF405Mini/hwdef.dat | 14 ++++++++------ .../AP_HAL_ChibiOS/hwdef/TMotorH743/hwdef.dat | 13 ++++++++----- 4 files changed, 20 insertions(+), 13 deletions(-) diff --git a/libraries/AP_HAL_ChibiOS/hwdef/BETAFPV-F405/hwdef.dat b/libraries/AP_HAL_ChibiOS/hwdef/BETAFPV-F405/hwdef.dat index b35a98796b..0cda372cde 100644 --- a/libraries/AP_HAL_ChibiOS/hwdef/BETAFPV-F405/hwdef.dat +++ b/libraries/AP_HAL_ChibiOS/hwdef/BETAFPV-F405/hwdef.dat @@ -58,10 +58,12 @@ PA12 OTG_FS_DP OTG1 PA10 USART1_RX USART1 PA9 USART1_TX USART1 +HAL_SERIAL2_PROTOCOL SerialProtocol_None + # USART3 (ELRS) PB10 USART3_TX USART3 PB11 USART3_RX USART3 -DEFAULT_SERIAL3_PROTOCOL SerialProtocol_RCIN +HAL_SERIAL3_PROTOCOL SerialProtocol_RCIN # UART4 (DJI) PA0 UART4_TX UART4 NODMA diff --git a/libraries/AP_HAL_ChibiOS/hwdef/MambaF405v2/hwdef.dat b/libraries/AP_HAL_ChibiOS/hwdef/MambaF405v2/hwdef.dat index 255dc70ea0..e0823b5dbc 100644 --- a/libraries/AP_HAL_ChibiOS/hwdef/MambaF405v2/hwdef.dat +++ b/libraries/AP_HAL_ChibiOS/hwdef/MambaF405v2/hwdef.dat @@ -41,7 +41,7 @@ PA9 USART1_TX USART1 # Alt config to allow RCIN on UART PA10 USART1_RX USART1 ALT(1) -define DEFAULT_SERIAL1_PROTOCOL SerialProtocol_RCIN +define HAL_SERIAL1_PROTOCOL SerialProtocol_RCIN # SBUS inversion control pin, active low PC0 USART1_RXINV OUTPUT HIGH GPIO(78) POL(0) diff --git a/libraries/AP_HAL_ChibiOS/hwdef/SpeedyBeeF405Mini/hwdef.dat b/libraries/AP_HAL_ChibiOS/hwdef/SpeedyBeeF405Mini/hwdef.dat index 9717ab8d56..0ef295e46d 100644 --- a/libraries/AP_HAL_ChibiOS/hwdef/SpeedyBeeF405Mini/hwdef.dat +++ b/libraries/AP_HAL_ChibiOS/hwdef/SpeedyBeeF405Mini/hwdef.dat @@ -55,31 +55,33 @@ PA12 OTG_FS_DP OTG1 # USART1 (DJI) PA10 USART1_RX USART1 PA9 USART1_TX USART1 -define DEFAULT_SERIAL1_PROTOCOL SerialProtocol_DJI_FPV +define HAL_SERIAL1_PROTOCOL SerialProtocol_DJI_FPV # USART2 (RX/SBUS) PA2 USART2_TX USART2 PA3 USART2_RX USART2 -define DEFAULT_SERIAL2_PROTOCOL SerialProtocol_RCIN +define HAL_SERIAL2_PROTOCOL SerialProtocol_RCIN # USART3 PC10 USART3_TX USART3 PC11 USART3_RX USART3 -define DEFAULT_SERIAL3_PROTOCOL SerialProtocol_None +define HAL_SERIAL3_PROTOCOL SerialProtocol_None # UART4 (Bluetooth) PA0 UART4_TX UART4 NODMA PA1 UART4_RX UART4 NODMA -define DEFAULT_SERIAL4_PROTOCOL SerialProtocol_None +define HAL_SERIAL4_PROTOCOL SerialProtocol_None # UART5 (ESC) PD2 UART5_RX UART5 NODMA -define DEFAULT_SERIAL5_PROTOCOL SerialProtocol_ESCTelemetry +define HAL_SERIAL5_PROTOCOL SerialProtocol_ESCTelemetry +define HAL_SERIAL5_BAUD 19200 # USART6 (GPS) PC6 USART6_TX USART6 PC7 USART6_RX USART6 -define DEFAULT_SERIAL6_PROTOCOL SerialProtocol_GPS +define HAL_SERIAL6_PROTOCOL SerialProtocol_GPS +define HAL_SERIAL6_BAUD 115200 # I2C ports I2C_ORDER I2C1 diff --git a/libraries/AP_HAL_ChibiOS/hwdef/TMotorH743/hwdef.dat b/libraries/AP_HAL_ChibiOS/hwdef/TMotorH743/hwdef.dat index b0c90310bd..e4adca8145 100644 --- a/libraries/AP_HAL_ChibiOS/hwdef/TMotorH743/hwdef.dat +++ b/libraries/AP_HAL_ChibiOS/hwdef/TMotorH743/hwdef.dat @@ -64,27 +64,30 @@ PA12 OTG_FS_DP OTG1 # USART1 (ESC Telemetry) PA10 USART1_RX USART1 NODMA -DEFAULT_SERIAL1_PROTOCOL SerialProtocol_ESCTelemetry +HAL_SERIAL1_PROTOCOL SerialProtocol_ESCTelemetry # UART3 PD8 USART3_TX USART3 NODMA PD9 USART3_RX USART3 NODMA -DEFAULT_SERIAL3_PROTOCOL SerialProtocol_None +HAL_SERIAL3_PROTOCOL SerialProtocol_None + +HAL_SERIAL4_PROTOCOL SerialProtocol_None # UART5 (GPS) PC12 UART5_TX UART5 PD2 UART5_RX UART5 -DEFAULT_SERIAL5_PROTOCOL SerialProtocol_GPS +HAL_SERIAL5_PROTOCOL SerialProtocol_GPS # USART6 (RX) PC6 USART6_TX USART6 PC7 USART6_RX USART6 -DEFAULT_SERIAL6_PROTOCOL SerialProtocol_RCIN +HAL_SERIAL6_PROTOCOL SerialProtocol_RCIN # UART7 (DJI) PE7 UART7_RX UART7 PE8 UART7_TX UART7 -define DEFAULT_SERIAL7_PROTOCOL SerialProtocol_DJI_FPV +define HAL_SERIAL7_PROTOCOL SerialProtocol_DJI_FPV +define HAL_SERIAL7_BAUD 115200 # UART8 (SBUS/SmartAudio) PE0 UART8_RX UART8 # no suitable timer for RCININT