From 1ff0a5494aba59cffb3a912c82e474aa5eebdd03 Mon Sep 17 00:00:00 2001 From: Kevin O'Connor Date: Mon, 19 Dec 2022 12:11:43 -0500 Subject: [PATCH] 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 --- src/stm32/dfu_reboot.c | 4 ++-- 1 file 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;