From be2265d0d173ac347f0ee9ed809c2a689bf835a2 Mon Sep 17 00:00:00 2001 From: QMK Bot Date: Mon, 27 Dec 2021 02:20:52 -0800 Subject: Format code according to conventions (#15593) --- platforms/chibios/bootloaders/stm32_dfu.c | 14 ++++++-------- 1 file changed, 6 insertions(+), 8 deletions(-) (limited to 'platforms/chibios/bootloaders/stm32_dfu.c') diff --git a/platforms/chibios/bootloaders/stm32_dfu.c b/platforms/chibios/bootloaders/stm32_dfu.c index f4bd8554bf..0a113570f7 100644 --- a/platforms/chibios/bootloaders/stm32_dfu.c +++ b/platforms/chibios/bootloaders/stm32_dfu.c @@ -41,8 +41,7 @@ extern uint32_t __ram0_end__; # define STM32_BOOTLOADER_DUAL_BANK_DELAY 100000 # endif -__attribute__((weak)) -void bootloader_jump(void) { +__attribute__((weak)) void bootloader_jump(void) { // For STM32 MCUs with dual-bank flash, and we're incapable of jumping to the bootloader. The first valid flash // bank is executed unconditionally after a reset, so it doesn't enter DFU unless BOOT0 is high. Instead, we do // it with hardware...in this case, we pull a GPIO high/low depending on the configuration, connects 3.3V to @@ -63,17 +62,16 @@ void bootloader_jump(void) { } // not needed at all, but if anybody attempts to invoke it.... -void enter_bootloader_mode_if_requested(void) { } +void enter_bootloader_mode_if_requested(void) {} #else /* This code should be checked whether it runs correctly on platforms */ -#define SYMVAL(sym) (uint32_t)(((uint8_t *)&(sym)) - ((uint8_t *)0)) -#define BOOTLOADER_MAGIC 0xDEADBEEF -#define MAGIC_ADDR (unsigned long *)(SYMVAL(__ram0_end__) - 4) +# define SYMVAL(sym) (uint32_t)(((uint8_t *)&(sym)) - ((uint8_t *)0)) +# define BOOTLOADER_MAGIC 0xDEADBEEF +# define MAGIC_ADDR (unsigned long *)(SYMVAL(__ram0_end__) - 4) -__attribute__((weak)) -void bootloader_jump(void) { +__attribute__((weak)) void bootloader_jump(void) { *MAGIC_ADDR = BOOTLOADER_MAGIC; // set magic flag => reset handler will jump into boot loader NVIC_SystemReset(); } -- cgit v1.2.3