From 81f24b0a273e4c876dbfd2a9e77e2c990a5f3a85 Mon Sep 17 00:00:00 2001 From: Jukka Laitinen Date: Tue, 6 Oct 2020 15:37:45 +0300 Subject: [PATCH] px4_fmuv5: Remove BOARD_INDICATE_EXTERNAL_LOCKOUT_STATE in protected/kernel build Gpios are not directly accessible from userspace, so it should not be controlled from within Commander directly There is a need for a proper userspace interface via /dev/leds or such Signed-off-by: Jukka Laitinen --- boards/px4/fmu-v5/src/board_config.h | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/boards/px4/fmu-v5/src/board_config.h b/boards/px4/fmu-v5/src/board_config.h index cd1398f585..f81b942ff3 100644 --- a/boards/px4/fmu-v5/src/board_config.h +++ b/boards/px4/fmu-v5/src/board_config.h @@ -235,7 +235,13 @@ #define GPIO_nARMED_INIT /* PI0 */ (GPIO_INPUT|GPIO_PULLUP|GPIO_PORTI|GPIO_PIN0) #define GPIO_nARMED /* PI0 */ (GPIO_OUTPUT|GPIO_PUSHPULL|GPIO_SPEED_2MHz|GPIO_OUTPUT_CLEAR|GPIO_PORTI|GPIO_PIN0) +#ifdef CONFIG_BUILD_FLAT #define BOARD_INDICATE_EXTERNAL_LOCKOUT_STATE(enabled) px4_arch_configgpio((enabled) ? GPIO_nARMED : GPIO_nARMED_INIT) +#else +/* TODO: indicate armed state in protected & kernel build; + * this will need some kernel side driver and user-space interface + */ +#endif /* PWM */