From f303e5b659da2da0be17be660f0d7d7d4d17f0c8 Mon Sep 17 00:00:00 2001 From: Andrew Tridgell Date: Sat, 29 Dec 2018 15:00:39 +1100 Subject: [PATCH] HAL_ChibiOS: fixed safety switch and LEDs on PH4-mini fixes #10127 --- .../AP_HAL_ChibiOS/hwdef/PH4-mini/hwdef.dat | 4 ++++ libraries/AP_HAL_ChibiOS/hwdef/fmuv5/hwdef.dat | 16 ++++++++++++++++ 2 files changed, 20 insertions(+) diff --git a/libraries/AP_HAL_ChibiOS/hwdef/PH4-mini/hwdef.dat b/libraries/AP_HAL_ChibiOS/hwdef/PH4-mini/hwdef.dat index 00bb363d9d..ea0a56d7a8 100644 --- a/libraries/AP_HAL_ChibiOS/hwdef/PH4-mini/hwdef.dat +++ b/libraries/AP_HAL_ChibiOS/hwdef/PH4-mini/hwdef.dat @@ -17,3 +17,7 @@ undef HAL_BATT_VOLT_SCALE define HAL_BATT_VOLT_SCALE 18.182 undef HAL_BATT_CURR_SCALE define HAL_BATT_CURR_SCALE 36.364 + +# setup safety switch +PE12 LED_SAFETY OUTPUT +PE10 SAFETY_IN INPUT PULLDOWN diff --git a/libraries/AP_HAL_ChibiOS/hwdef/fmuv5/hwdef.dat b/libraries/AP_HAL_ChibiOS/hwdef/fmuv5/hwdef.dat index 60c13b4f9e..73977188ee 100644 --- a/libraries/AP_HAL_ChibiOS/hwdef/fmuv5/hwdef.dat +++ b/libraries/AP_HAL_ChibiOS/hwdef/fmuv5/hwdef.dat @@ -241,6 +241,22 @@ PC11 SDMMC_D3 SDMMC1 PC12 SDMMC_CK SDMMC1 PD2 SDMMC_CMD SDMMC1 +# red LED marked as B/E +PB1 LED_RED OUTPUT GPIO(90) + +# green LED marked as PWR. We leave this solid on, but allow +# for it to be controlled as a relay if needed +PC6 LED_GREEN OUTPUT GPIO(91) LOW + +# blue LED marked as ACT +PC7 LED_BLUE OUTPUT GPIO(92) HIGH + +# setup for BoardLED2 +define HAL_GPIO_A_LED_PIN 90 +define HAL_GPIO_B_LED_PIN 92 +define HAL_GPIO_LED_ON 0 + + # enable RAMTROM parameter storage define HAL_STORAGE_SIZE 16384 define HAL_WITH_RAMTRON 1