From dcf17e5bc2033cd51ebca7c0e94210348f3f6481 Mon Sep 17 00:00:00 2001 From: Siddharth Purohit Date: Mon, 8 Apr 2019 18:58:29 +0530 Subject: [PATCH] HAL_ChibiOS: hwdef: add support for dual cdc on CubeYellow and CubeOrange --- libraries/AP_HAL_ChibiOS/hwdef/CubeOrange/hwdef.dat | 3 ++- libraries/AP_HAL_ChibiOS/hwdef/CubeYellow/hwdef.dat | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/libraries/AP_HAL_ChibiOS/hwdef/CubeOrange/hwdef.dat b/libraries/AP_HAL_ChibiOS/hwdef/CubeOrange/hwdef.dat index 647ab20ca6..4be9244066 100644 --- a/libraries/AP_HAL_ChibiOS/hwdef/CubeOrange/hwdef.dat +++ b/libraries/AP_HAL_ChibiOS/hwdef/CubeOrange/hwdef.dat @@ -32,7 +32,7 @@ define HAL_STORAGE_SIZE 16384 I2C_ORDER I2C2 I2C1 # order of UARTs (and USB) -UART_ORDER OTG1 UART4 USART2 USART3 UART8 UART7 +UART_ORDER OTG1 UART4 USART2 USART3 UART8 UART7 OTG2 # If the board has an IOMCU connected via a UART then this defines the # UART to talk to that MCU. Leave it out for boards with no IOMCU. @@ -299,6 +299,7 @@ define HAL_BATT_CURR_PIN 15 define HAL_BATT_VOLT_SCALE 10.1 define HAL_BATT_CURR_SCALE 17.0 define HAL_GPIO_PWM_VOLT_PIN 3 +define HAL_HAVE_DUAL_USB_CDC 1 # List of files to put in ROMFS. For fmuv3 we need an IO firmware so # we can automatically update the IOMCU firmware on boot. The format diff --git a/libraries/AP_HAL_ChibiOS/hwdef/CubeYellow/hwdef.dat b/libraries/AP_HAL_ChibiOS/hwdef/CubeYellow/hwdef.dat index 1394605f5b..bc6a4faf5d 100644 --- a/libraries/AP_HAL_ChibiOS/hwdef/CubeYellow/hwdef.dat +++ b/libraries/AP_HAL_ChibiOS/hwdef/CubeYellow/hwdef.dat @@ -110,7 +110,7 @@ I2C_ORDER I2C2 I2C1 # 6) SERIAL5: extra UART (usually RTOS debug console) # order of UARTs (and USB) -UART_ORDER OTG1 UART4 USART2 USART3 UART8 UART7 +UART_ORDER OTG1 UART4 USART2 USART3 UART8 UART7 OTG2 # if the board has an IOMCU connected via a UART then this defines the # UART to talk to that MCU. Leave it out for boards with no IOMCU @@ -471,6 +471,7 @@ define HAL_BATT_CURR_PIN 3 define HAL_BATT_VOLT_SCALE 10.1 define HAL_BATT_CURR_SCALE 17.0 define HAL_GPIO_PWM_VOLT_PIN 3 +define HAL_HAVE_DUAL_USB_CDC 1 # this defines the default maximum clock on I2C devices. define HAL_I2C_MAX_CLOCK 100000