aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKevin O'Connor <kevin@koconnor.net>2022-12-19 12:11:43 -0500
committerKevin O'Connor <kevin@koconnor.net>2022-12-30 21:28:32 -0500
commit1ff0a5494aba59cffb3a912c82e474aa5eebdd03 (patch)
tree905fa704c280ec3b9fdfe429e0ab914cf8cb3018
parentb51b06844213b3aede71fa3de2100e82ec7d35dc (diff)
downloadkutter-1ff0a5494aba59cffb3a912c82e474aa5eebdd03.tar.gz
kutter-1ff0a5494aba59cffb3a912c82e474aa5eebdd03.tar.xz
kutter-1ff0a5494aba59cffb3a912c82e474aa5eebdd03.zip
stm32: Check for CONFIG_HAVE_BOOTLOADER_REQUEST in dfu_reboot.c
Support disabling dfu_reboot if HAVE_BOOTLOADER_REQUEST is disabled in the Kconfig rules. Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
-rw-r--r--src/stm32/dfu_reboot.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/stm32/dfu_reboot.c b/src/stm32/dfu_reboot.c
index 04952a48..68f023d1 100644
--- a/src/stm32/dfu_reboot.c
+++ b/src/stm32/dfu_reboot.c
@@ -31,7 +31,7 @@
void
dfu_reboot(void)
{
- if (!CONFIG_STM32_DFU_ROM_ADDRESS)
+ if (!CONFIG_STM32_DFU_ROM_ADDRESS || !CONFIG_HAVE_BOOTLOADER_REQUEST)
return;
irq_disable();
uint64_t *bflag = (void*)USB_BOOT_FLAG_ADDR;
@@ -46,7 +46,7 @@ dfu_reboot(void)
void
dfu_reboot_check(void)
{
- if (!CONFIG_STM32_DFU_ROM_ADDRESS)
+ if (!CONFIG_STM32_DFU_ROM_ADDRESS || !CONFIG_HAVE_BOOTLOADER_REQUEST)
return;
if (*(uint64_t*)USB_BOOT_FLAG_ADDR != USB_BOOT_FLAG)
return;