Files
PX4-Autopilot/boards/corvon
Benjamin CabéandJacob Dahl 026e64b241 refactor(safety_button): use board macros for the button and LED (#29226)
* refactor(safety_button): use board macros for the button and LED

The driver read the safety button and wrote the safety LED as the GPIO pinsets GPIO_BTN_SAFETY and GPIO_LED_SAFETY of board_config.h, the LED active low. A board can now define BOARD_SAFETY_BUTTON(), true while the button is pressed, and BOARD_SAFETY_LED(on_true) instead, as the FIXMEs next to these GPIOs in the board_config.h of FMU-v5, FMU-v6X, FMU-v6XRT and 26 other boards suggest, for a button and an LED that aren't GPIO pinsets or whose polarity differs. The macros default to the GPIOs, so that the existing boards are unchanged.

Assisted-by: Claude:opus-5.5
Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>

* refactor(boards): drop the safety button and LED FIXMEs

The safety_button driver now takes either the GPIO pinsets or the
BOARD_SAFETY_BUTTON()/BOARD_SAFETY_LED() macros, so the GPIO
definitions are no longer something to replace.

Assisted-by: Claude:claude-opus-5-5

---------

Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
Co-authored-by: Jacob Dahl <dahl.jakejacob@gmail.com>
2026-10-29 18:34:36 -06:00
..