You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@mynewt.apache.org by je...@apache.org on 2022/05/16 08:33:08 UTC
[mynewt-core] branch master updated: bsp/p-nucleo-wb55-dongle: Update BUTTON_1 in bootloader
This is an automated email from the ASF dual-hosted git repository.
jerzy pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/mynewt-core.git
The following commit(s) were added to refs/heads/master by this push:
new e17c0aa74 bsp/p-nucleo-wb55-dongle: Update BUTTON_1 in bootloader
e17c0aa74 is described below
commit e17c0aa74d717aa50d8c4728ca60a0a03c6a6995
Author: Jerzy Kasenberg <je...@codecoup.pl>
AuthorDate: Mon May 9 10:54:38 2022 +0200
bsp/p-nucleo-wb55-dongle: Update BUTTON_1 in bootloader
When BUTTON_1_AS_STM32_DFU is set (that should be used only in bootloaer)
hal_bsp redirect execution to STM32 DFU bootloader to allow writing
bootloader or application.
Function boot_preboot was defined always even if functionality was not enabled.
This prevented alternative boot_preboot() functionality that can be provided
by other package.
Now hal_bsp.c only provides boot_preboot() when BUTTON_1_AS_STM32_DFU is set.
---
hw/bsp/p-nucleo-wb55-usbdongle/src/hal_bsp.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/hw/bsp/p-nucleo-wb55-usbdongle/src/hal_bsp.c b/hw/bsp/p-nucleo-wb55-usbdongle/src/hal_bsp.c
index ec338e587..f93192996 100644
--- a/hw/bsp/p-nucleo-wb55-usbdongle/src/hal_bsp.c
+++ b/hw/bsp/p-nucleo-wb55-usbdongle/src/hal_bsp.c
@@ -91,10 +91,10 @@ hal_bsp_core_dump(int *area_cnt)
return dump_cfg;
}
+#if MYNEWT_VAL(BUTTON_1_AS_STM32_DFU)
void
boot_preboot(void)
{
-#if MYNEWT_VAL(BUTTON_1_AS_STM32_DFU) >= 0
hal_gpio_init_in(BUTTON_1, HAL_GPIO_PULL_UP);
os_cputime_delay_usecs(100);
if (hal_gpio_read(BUTTON_1) == 0) {
@@ -102,8 +102,8 @@ boot_preboot(void)
stm32_start_bootloader();
}
hal_gpio_deinit(BUTTON_1);
-#endif
}
+#endif
static void
dongle_soft_reset(void *arg)