From 3ef06aa732ce8063e11b2f983592529883f7ecbc Mon Sep 17 00:00:00 2001 From: Drashna Jaelre Date: Sun, 26 Nov 2023 03:59:18 -0800 Subject: Improve and Cleanup Shutdown callbacks (#21060) Co-authored-by: Dasky <32983009+daskygit@users.noreply.github.com> --- keyboards/matrix/abelx/abelx.c | 7 +------ keyboards/matrix/m20add/m20add.c | 8 ++------ 2 files changed, 3 insertions(+), 12 deletions(-) (limited to 'keyboards/matrix') diff --git a/keyboards/matrix/abelx/abelx.c b/keyboards/matrix/abelx/abelx.c index ea3e57aeaf..a05934238a 100644 --- a/keyboards/matrix/abelx/abelx.c +++ b/keyboards/matrix/abelx/abelx.c @@ -92,13 +92,8 @@ bool led_update_kb(led_t led_state) { } #define REBOOT_MAGIC 0x41544B42 -void shutdown_user(void) -{ - // set the magic number for resetting to the bootloader - *(uint32_t *)(&(RTCD1.rtc->BKP0R)) = REBOOT_MAGIC; -} void bootloader_jump(void) { - shutdown_user(); + *(uint32_t *)(&(RTCD1.rtc->BKP0R)) = REBOOT_MAGIC; NVIC_SystemReset(); } diff --git a/keyboards/matrix/m20add/m20add.c b/keyboards/matrix/m20add/m20add.c index cdcafb9779..ac483e8aab 100644 --- a/keyboards/matrix/m20add/m20add.c +++ b/keyboards/matrix/m20add/m20add.c @@ -54,13 +54,9 @@ bool led_update_kb(led_t led_state) { } #define REBOOT_MAGIC 0x41544B42 -void shutdown_user(void) -{ - // set the magic number for resetting to the bootloader - *(uint32_t *)(&(RTCD1.rtc->BKP0R)) = REBOOT_MAGIC; -} void bootloader_jump(void) { - shutdown_user(); + // set the magic number for resetting to the bootloader + *(uint32_t *)(&(RTCD1.rtc->BKP0R)) = REBOOT_MAGIC; NVIC_SystemReset(); } -- cgit v1.2.3