From 5d4883dae408e096b5cd404d388f06006b409139 Mon Sep 17 00:00:00 2001 From: Alessio Caiazza Date: Mon, 20 Mar 2023 16:40:29 +0100 Subject: [PATCH] cantor: fix LT(layer, kc) do not work after waking up PC #16406 Refactor of the orignal Philong's workaround. Instead of a user function in the keymap this commit applies the workarund at the keyboard level to make it available to every cantor user. Co-authored-by: Philong --- keyboards/cantor/cantor.c | 11 +++++++++++ keyboards/cantor/rules.mk | 2 ++ 2 files changed, 13 insertions(+) create mode 100644 keyboards/cantor/cantor.c diff --git a/keyboards/cantor/cantor.c b/keyboards/cantor/cantor.c new file mode 100644 index 000000000000..bc5569b1b908 --- /dev/null +++ b/keyboards/cantor/cantor.c @@ -0,0 +1,11 @@ +// Copyright 2023 Alessio Caiazza (@nolith) +// SPDX-License-Identifier: GPL-2.0-or-later + +#include "quantum.h" + +// Workaround for https://github.com/qmk/qmk_firmware/issues/16406 +__attribute__ ((weak)) +void suspend_wakeup_init_kb(void) { + NVIC_SystemReset(); + suspend_wakeup_init_user(); +} diff --git a/keyboards/cantor/rules.mk b/keyboards/cantor/rules.mk index 6bd8b9bf770e..818a6dadb584 100644 --- a/keyboards/cantor/rules.mk +++ b/keyboards/cantor/rules.mk @@ -1,2 +1,4 @@ SPLIT_KEYBOARD = yes SERIAL_DRIVER = usart + +SRC += cantor.c