summaryrefslogtreecommitdiff
path: root/platforms/chibios/bootloaders/gd32v_dfu.c
diff options
context:
space:
mode:
authorDrashna Jael're <drashna@live.com>2022-05-29 15:38:33 -0700
committerDrashna Jael're <drashna@live.com>2022-05-29 15:38:33 -0700
commit30aac80d5a6d8c6f7c06efb49189d748e70edc4a (patch)
treeceb11968ae41228e4b110c07467cdca7cc9cff22 /platforms/chibios/bootloaders/gd32v_dfu.c
parent67f4e5f34489abf986dedb4984b256692086c615 (diff)
parente22a183329fd05d39f88bb9dfebe98cfa7cd8402 (diff)
Merge remote-tracking branch 'qmk 0.17.0' into firmware21
Diffstat (limited to 'platforms/chibios/bootloaders/gd32v_dfu.c')
-rw-r--r--platforms/chibios/bootloaders/gd32v_dfu.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/platforms/chibios/bootloaders/gd32v_dfu.c b/platforms/chibios/bootloaders/gd32v_dfu.c
index baa7d1f882..100fc472f8 100644
--- a/platforms/chibios/bootloaders/gd32v_dfu.c
+++ b/platforms/chibios/bootloaders/gd32v_dfu.c
@@ -36,5 +36,12 @@ __attribute__((weak)) void bootloader_jump(void) {
*DBGMCU_CMD = DBGMCU_CMD_RESET;
}
+__attribute__((weak)) void mcu_reset(void) {
+ // Confirmed by karlk90, there is no actual reset to bootloader.
+ // This just resets the controller.
+ *DBGMCU_KEY = DBGMCU_KEY_UNLOCK;
+ *DBGMCU_CMD = DBGMCU_CMD_RESET;
+}
+
/* Jumping to bootloader is not possible from user code. */
void enter_bootloader_mode_if_requested(void) {}