mirror of https://github.com/ArduPilot/ardupilot
AP_BoardConfig: add arm/disarm controlled GPIO for module power control
This commit is contained in:
parent
fffe3afb28
commit
176a4aa51a
|
@ -289,7 +289,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
|
||||
// @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
|
||||
// @User: Advanced
|
||||
AP_GROUPINFO("OPTIONS", 19, AP_BoardConfig, _options, HAL_BRD_OPTIONS_DEFAULT),
|
||||
|
||||
|
|
|
@ -155,9 +155,19 @@ public:
|
|||
UNLOCK_FLASH = (1<<4),
|
||||
WRITE_PROTECT_FLASH = (1<<5),
|
||||
WRITE_PROTECT_BOOTLOADER = (1<<6),
|
||||
SKIP_BOARD_VALIDATION = (1<<7)
|
||||
SKIP_BOARD_VALIDATION = (1<<7),
|
||||
DISABLE_ARMING_GPIO = (1<<8)
|
||||
};
|
||||
|
||||
//return true if arming gpio output is disabled
|
||||
static bool arming_gpio_disabled(void) {
|
||||
return _singleton?(_singleton->_options & DISABLE_ARMING_GPIO)!=0:1;
|
||||
}
|
||||
|
||||
#ifndef HAL_ARM_GPIO_POL_INVERT
|
||||
#define HAL_ARM_GPIO_POL_INVERT 0
|
||||
#endif
|
||||
|
||||
// return true if ftp is disabled
|
||||
static bool ftp_disabled(void) {
|
||||
return _singleton?(_singleton->_options & DISABLE_FTP)!=0:1;
|
||||
|
|
Loading…
Reference in New Issue