diff options
author | Drashna Jaelre <drashna@live.com> | 2022-05-13 20:35:49 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-05-14 13:35:49 +1000 |
commit | 787a68948fa0d5e251e22a623071082c8c0561b1 (patch) | |
tree | cc28d2caa680b8eef62e4cfdd232dde66e43416a /platforms/chibios/bootloaders/gd32v_dfu.c | |
parent | 425c54cf8c459b1cc33deaa53955e2db41aa0b01 (diff) |
[Core] Add Reboot keycode to core (#15990)
Diffstat (limited to 'platforms/chibios/bootloaders/gd32v_dfu.c')
-rw-r--r-- | platforms/chibios/bootloaders/gd32v_dfu.c | 7 |
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) {} |