1
0
mirror of https://github.com/RIOT-OS/RIOT.git synced 2024-12-29 04:50:03 +01:00

sys/riotboot: use BTN0_MODE for default value of BTN_BOOTLOADER_INVERTED

This commit is contained in:
Gunar Schorcht 2022-11-24 11:01:33 +01:00
parent 09e94b3e15
commit 1d9e2cc4f6

View File

@ -61,12 +61,17 @@ extern "C" {
* Set to true for active-low buttons (go to DFU if the pin is low), otherwise
* to false (go to DFU if the pin is high).
*
* The default value for all boards is inverted (active-low).
*
* */
* The default value for all boards is inverted (active-low), except if
* BTN0_MODE is defined as GPIO_IN_PD. In this case the value is not
* inverted (high-active).
*/
#ifndef BTN_BOOTLOADER_INVERTED
#if (BTN0_MODE == GPIO_IN_PD)
#define BTN_BOOTLOADER_INVERTED false
#else
#define BTN_BOOTLOADER_INVERTED true
#endif
#endif
/** @brief LED pin for bootloader indication
*