You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
void suspend_power_down(void) {
suspend_power_down_quantum();
// on AVR, this enables the watchdog for 15ms (max), and goes to
// SLEEP_MODE_PWR_DOWN
wait_ms(17);
}
quantum/quantum.c:
void suspend_power_down_quantum(void) {
#ifndef NO_SUSPEND_POWER_DOWN
// Turn off backlight
# ifdef BACKLIGHT_ENABLE
backlight_set(0);
# endif
# ifdef LED_MATRIX_ENABLE
led_matrix_task();
# endif
# ifdef RGB_MATRIX_ENABLE
rgb_matrix_task();
# endif
// Turn off LED indicators
uint8_t leds_off = 0;
# if defined(BACKLIGHT_CAPS_LOCK) && defined(BACKLIGHT_ENABLE)
if (is_backlight_enabled()) {
// Don't try to turn off Caps Lock indicator as it is backlight and backlight is already off
leds_off |= (1 << USB_LED_CAPS_LOCK);
}
# endif
led_set(leds_off);
// Turn off audio
# ifdef AUDIO_ENABLE
stop_all_notes();
# endif
// Turn off underglow
# if defined(RGBLIGHT_SLEEP) && defined(RGBLIGHT_ENABLE)
rgblight_suspend();
# endif
# if defined(LED_MATRIX_ENABLE)
led_matrix_set_suspend_state(true);
# endif
# if defined(RGB_MATRIX_ENABLE)
rgb_matrix_set_suspend_state(true);
# endif
# ifdef OLED_ENABLE
oled_off();
# endif
# ifdef ST7565_ENABLE
st7565_off();
# endif
# if defined(POINTING_DEVICE_ENABLE)
// run to ensure scanning occurs while suspended
pointing_device_task();
# endif
#endif
}
But suspend_wakeup_init_quantum() calls suspend_wakeup_init_kb().
__attribute__((weak)) void suspend_wakeup_init_quantum(void) {
// Turn on backlight
#ifdef BACKLIGHT_ENABLE
backlight_init();
#endif
// Restore LED indicators
led_set(host_keyboard_leds());
// Wake up underglow
#if defined(RGBLIGHT_SLEEP) && defined(RGBLIGHT_ENABLE)
rgblight_wakeup();
#endif
#if defined(LED_MATRIX_ENABLE)
led_matrix_set_suspend_state(false);
#endif
#if defined(RGB_MATRIX_ENABLE)
rgb_matrix_set_suspend_state(false);
#endif
suspend_wakeup_init_kb();
}
The text was updated successfully, but these errors were encountered:
In qmk#14210, all previous calls to `suspend_power_down_kb()` were replaced
with calls to `suspend_power_down_quantum()`, together with some much
needed deduplication. However, the `_kb` function was never called from
the `_quantum` one (unlike `suspend_power_down_kb()`).
I followed the example of how it was implemented for AVR before qmk#14210,
i.e. called before the rest of the suspend functions, regardless of the
`NO_SUSPEND_POWER_DOWN` setting.
Fixesqmk#16279.
In qmk#14210, all previous calls to `suspend_power_down_kb()` were replaced
with calls to `suspend_power_down_quantum()`, together with some much
needed deduplication. However, the `_kb` function was never called from
the `_quantum` one (unlike `suspend_wakeup_init_kb()`).
I followed the example of how it was implemented for AVR before qmk#14210,
i.e. called before the rest of the suspend functions, regardless of the
`NO_SUSPEND_POWER_DOWN` setting.
Fixesqmk#16279.
I guess
suspend_power_down_kb()
should be called fromsuspend_power_down()
orsuspend_power_down_quantum()
but neither on ChibiOS platform.System Information
Commit e26778c
platforms/chibios/suspend.c
:quantum/quantum.c
:But
suspend_wakeup_init_quantum()
callssuspend_wakeup_init_kb()
.The text was updated successfully, but these errors were encountered: