Commit 2f545b8e authored by Andrzej Puzdrowski's avatar Andrzej Puzdrowski Committed by David Brown
Browse files

zephyr: prefer DTS mcuboot-led0 alias over bootloader-led0 alias

bootloader-led0 alias will be deprecated and replaced by dedicated
mcuboot-led0 alias.

Signed-off-by: default avatarAndrzej Puzdrowski <andrzej.puzdrowski@nordicsemi.no>
parent b588907a
Loading
Loading
Loading
Loading
+5 −1
Changes for boot/zephyr/main.c: 5 added lines, 1 removed line.
Original line number Diff line number Diff line
@@ -127,8 +127,12 @@ BOOT_LOG_MODULE_REGISTER(mcuboot);
 * The led0 devicetree alias is optional. If present, we'll use it
 * to turn on the LED whenever the button is pressed.
 */

#if DT_NODE_EXISTS(DT_ALIAS(mcuboot_led0))
#define LED0_NODE DT_ALIAS(mcuboot_led0))
#elif DT_NODE_EXISTS(DT_ALIAS(bootloader_led0))
#warning "bootloader-led0 alias is deprecated; use mcuboot-led0 instead"
#define LED0_NODE DT_ALIAS(bootloader_led0)
#endif

#if DT_NODE_HAS_STATUS(LED0_NODE, okay) && DT_NODE_HAS_PROP(LED0_NODE, gpios)
#define LED0_GPIO_LABEL DT_GPIO_LABEL(LED0_NODE, gpios)