summaryrefslogtreecommitdiffstats
path: root/tmk_core/common/chibios/bootloader.c
diff options
context:
space:
mode:
Diffstat (limited to 'tmk_core/common/chibios/bootloader.c')
-rw-r--r--tmk_core/common/chibios/bootloader.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/tmk_core/common/chibios/bootloader.c b/tmk_core/common/chibios/bootloader.c
index 2dd3ade34..f9895237b 100644
--- a/tmk_core/common/chibios/bootloader.c
+++ b/tmk_core/common/chibios/bootloader.c
@@ -13,11 +13,19 @@ extern uint32_t __ram0_end__;
#define MAGIC_ADDR (unsigned long*)(SYMVAL(__ram0_end__) - 4)
+/** \brief Jump to the bootloader
+ *
+ * FIXME: needs doc
+ */
void bootloader_jump(void) {
*MAGIC_ADDR = BOOTLOADER_MAGIC; // set magic flag => reset handler will jump into boot loader
NVIC_SystemReset();
}
+/** \brief Enter bootloader mode if requested
+ *
+ * FIXME: needs doc
+ */
void enter_bootloader_mode_if_requested(void) {
unsigned long* check = MAGIC_ADDR;
if(*check == BOOTLOADER_MAGIC) {