boot: zephyr: adding indication LED and detect pin debounce
Setting LED to initial level before beginning.
Making comment about BOOT_SERIAL_DETECT_DELAY more clear in Kconfig.
Signed-off-by: Jared Wolff <hello@jaredwolff.com>
diff --git a/boot/zephyr/Kconfig b/boot/zephyr/Kconfig
index cfbdd5e..91247c4 100644
--- a/boot/zephyr/Kconfig
+++ b/boot/zephyr/Kconfig
@@ -475,7 +475,7 @@
mode.
config BOOT_SERIAL_DETECT_DELAY
- int "Prevents immediate boot into MCUBoot firmware."
+ int "Serial detect pin detection delay time [ms]"
default 0
help
Used to prevent the bootloader from loading on button press.
diff --git a/boot/zephyr/main.c b/boot/zephyr/main.c
index 3f17358..f0ef3e5 100644
--- a/boot/zephyr/main.c
+++ b/boot/zephyr/main.c
@@ -137,13 +137,13 @@
{
led = device_get_binding(LED0_GPIO_LABEL);
- if (led == NULL)
- {
+ if (led == NULL) {
BOOT_LOG_ERR("Didn't find LED device %s\n", LED0_GPIO_LABEL);
return;
}
gpio_pin_configure(led, LED0_GPIO_PIN, LED0_GPIO_FLAGS);
+ gpio_pin_set(led, LED0_GPIO_PIN, 0);
}
#endif