diff --git a/libraries/AP_BoardConfig/AP_BoardConfig.cpp b/libraries/AP_BoardConfig/AP_BoardConfig.cpp index a802f9e13897a5..b3af55da949d32 100644 --- a/libraries/AP_BoardConfig/AP_BoardConfig.cpp +++ b/libraries/AP_BoardConfig/AP_BoardConfig.cpp @@ -281,7 +281,7 @@ const AP_Param::GroupInfo AP_BoardConfig::var_info[] = { // @Param: OPTIONS // @DisplayName: Board options // @Description: Board specific option flags - // @Bitmask: 0:Enable hardware watchdog, 1:Disable MAVftp, 2:Enable set of internal parameters, 3:Enable Debug Pins, 4:Unlock flash on reboot, 5:Write protect firmware flash on reboot, 6:Write protect bootloader flash on reboot, 7:Skip board validation, 8:Disable board arming gpio output change on arm/disarm + // @Bitmask: 0:Enable hardware watchdog, 1:Disable MAVftp, 2:Enable set of internal parameters, 3:Enable Debug Pins, 4:Unlock flash on reboot, 5:Write protect firmware flash on reboot, 6:Write protect bootloader flash on reboot, 7:Skip board validation, 8:Disable board arming gpio output change on arm/disarm, 9:Use safety pins as profiled // @User: Advanced AP_GROUPINFO("OPTIONS", 19, AP_BoardConfig, _options, HAL_BRD_OPTIONS_DEFAULT), diff --git a/libraries/AP_BoardConfig/AP_BoardConfig.h b/libraries/AP_BoardConfig/AP_BoardConfig.h index 3f6401d6249f97..33fc96427d9cf8 100644 --- a/libraries/AP_BoardConfig/AP_BoardConfig.h +++ b/libraries/AP_BoardConfig/AP_BoardConfig.h @@ -11,6 +11,8 @@ #include #endif +#include + extern "C" typedef int (*main_fn_t)(int argc, char **); class AP_BoardConfig { @@ -158,7 +160,8 @@ class AP_BoardConfig { WRITE_PROTECT_FLASH = (1<<5), WRITE_PROTECT_BOOTLOADER = (1<<6), SKIP_BOARD_VALIDATION = (1<<7), - DISABLE_ARMING_GPIO = (1<<8) + DISABLE_ARMING_GPIO = (1<<8), + IO_SAFETY_PINS_AS_PROFILED = (1<<9), }; //return true if arming gpio output is disabled @@ -229,6 +232,12 @@ class AP_BoardConfig { } #endif +#if HAL_WITH_IO_MCU && AP_IOMCU_PROFILED_SUPPORT_ENABLED + bool use_safety_as_led() { + return _singleton? (_singleton->_options & IO_SAFETY_PINS_AS_PROFILED) : false; + } +#endif + private: static AP_BoardConfig *_singleton;