forked from mirror/qmk_firmware
Move shutdown delay to audio feature (#25859)
This commit is contained in:
@@ -94,10 +94,6 @@
|
||||
#endif
|
||||
|
||||
#ifdef AUDIO_ENABLE
|
||||
# ifndef GOODBYE_SONG
|
||||
# define GOODBYE_SONG SONG(GOODBYE_SOUND)
|
||||
# endif
|
||||
float goodbye_song[][2] = GOODBYE_SONG;
|
||||
# ifdef DEFAULT_LAYER_SONGS
|
||||
float default_layer_songs[][16][2] = DEFAULT_LAYER_SONGS;
|
||||
# endif
|
||||
@@ -218,18 +214,16 @@ void shutdown_quantum(bool jump_to_bootloader) {
|
||||
# ifndef NO_MUSIC_MODE
|
||||
music_all_notes_off();
|
||||
# endif
|
||||
uint16_t timer_start = timer_read();
|
||||
PLAY_SONG(goodbye_song);
|
||||
shutdown_modules(jump_to_bootloader);
|
||||
shutdown_kb(jump_to_bootloader);
|
||||
while (timer_elapsed(timer_start) < 250)
|
||||
wait_ms(1);
|
||||
stop_all_notes();
|
||||
#else
|
||||
shutdown_modules(jump_to_bootloader);
|
||||
shutdown_kb(jump_to_bootloader);
|
||||
wait_ms(250);
|
||||
audio_shutdown();
|
||||
#endif
|
||||
|
||||
shutdown_modules(jump_to_bootloader);
|
||||
shutdown_kb(jump_to_bootloader);
|
||||
|
||||
#if SHUTDOWN_DELAY > 0
|
||||
wait_ms(SHUTDOWN_DELAY);
|
||||
#endif
|
||||
|
||||
#ifdef HAPTIC_ENABLE
|
||||
haptic_shutdown();
|
||||
#endif
|
||||
|
||||
Reference in New Issue
Block a user