1
0
Fork 0

[Core] Add Reboot keycode to core (#15990)

This commit is contained in:
Drashna Jael're 2022-05-13 20:35:49 -07:00 committed by GitHub
parent 425c54cf8c
commit 787a68948f
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
25 changed files with 124 additions and 5 deletions

View file

@ -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) {}