summaryrefslogtreecommitdiffstats
path: root/keyboards/keychron/bluetooth/lpm_stm32l432.c
diff options
context:
space:
mode:
authorlokher <lokher@gmail.com>2022-12-30 14:49:22 +0800
committerlokher <lokher@gmail.com>2022-12-30 14:49:22 +0800
commiteb2a2996e6eb32d3ebbc482ff35f7b1a791ef102 (patch)
tree31044fbeb23805a0194267ffabc93641f4a53ba0 /keyboards/keychron/bluetooth/lpm_stm32l432.c
parente7d97ceb0442685030e966e32680ebcca76df301 (diff)
fix USB doesn't work after waking up from low power mode
Diffstat (limited to 'keyboards/keychron/bluetooth/lpm_stm32l432.c')
-rw-r--r--keyboards/keychron/bluetooth/lpm_stm32l432.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/keyboards/keychron/bluetooth/lpm_stm32l432.c b/keyboards/keychron/bluetooth/lpm_stm32l432.c
index 10fe9f5ceb..f19bf55d68 100644
--- a/keyboards/keychron/bluetooth/lpm_stm32l432.c
+++ b/keyboards/keychron/bluetooth/lpm_stm32l432.c
@@ -183,7 +183,11 @@ static inline void enter_low_power_mode_prepare(void) {
}
static inline void lpm_wakeup(void) {
- stm32_clock_fast_init();
+ if (usb_power_connected())
+ stm32_clock_init();
+ else
+ stm32_clock_fast_init();
+
if (bluetooth_transport.init) bluetooth_transport.init(true);
chSysLock();