diff --git a/quantum/quantum.c b/quantum/quantum.c index 09e5fe1dac6..be2afd393a8 100644 --- a/quantum/quantum.c +++ b/quantum/quantum.c @@ -224,13 +224,13 @@ void shutdown_quantum(bool jump_to_bootloader) { PLAY_SONG(goodbye_song); shutdown_modules(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); stop_all_notes(); #else shutdown_modules(jump_to_bootloader); shutdown_kb(jump_to_bootloader); - wait_ms(250); + wait_ms(QUANTUM_WAIT_BEFORE_RESET); #endif #ifdef HAPTIC_ENABLE haptic_shutdown(); diff --git a/quantum/quantum.h b/quantum/quantum.h index 0036cd784b2..c4fed4e1166 100644 --- a/quantum/quantum.h +++ b/quantum/quantum.h @@ -249,6 +249,13 @@ extern layer_state_t layer_state; # include "community_modules.h" #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_persistent_default_layer(uint8_t default_layer);