This commit is contained in:
Eric Molitor 2025-07-16 15:27:46 -07:00 committed by GitHub
commit 678eeba8d6
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 9 additions and 2 deletions

View File

@ -224,13 +224,13 @@ void shutdown_quantum(bool jump_to_bootloader) {
PLAY_SONG(goodbye_song); PLAY_SONG(goodbye_song);
shutdown_modules(jump_to_bootloader); shutdown_modules(jump_to_bootloader);
shutdown_kb(jump_to_bootloader); shutdown_kb(jump_to_bootloader);
while (timer_elapsed(timer_start) < 250) while (timer_elapsed(timer_start) < QUANTUM_WAIT_BEFORE_RESET)
wait_ms(1); wait_ms(1);
stop_all_notes(); stop_all_notes();
#else #else
shutdown_modules(jump_to_bootloader); shutdown_modules(jump_to_bootloader);
shutdown_kb(jump_to_bootloader); shutdown_kb(jump_to_bootloader);
wait_ms(250); wait_ms(QUANTUM_WAIT_BEFORE_RESET);
#endif #endif
#ifdef HAPTIC_ENABLE #ifdef HAPTIC_ENABLE
haptic_shutdown(); haptic_shutdown();

View File

@ -249,6 +249,13 @@ extern layer_state_t layer_state;
# include "community_modules.h" # include "community_modules.h"
#endif #endif
// By default shutdown_quantum waits 250ms for, among other things, to allow
// the shutdown chime to complete playing. This can be overriden by setting
// this value in your keyboards config.h
#ifndef QUANTUM_WAIT_BEFORE_RESET
# define QUANTUM_WAIT_BEFORE_RESET 250
#endif
void set_single_default_layer(uint8_t default_layer); void set_single_default_layer(uint8_t default_layer);
void set_single_persistent_default_layer(uint8_t default_layer); void set_single_persistent_default_layer(uint8_t default_layer);