Skip to content

Commit

Permalink
trim firmware size
Browse files Browse the repository at this point in the history
  • Loading branch information
spidey3 committed Jan 25, 2021
1 parent 7e43ff4 commit f31eef5
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions quantum/quantum.c
Original file line number Diff line number Diff line change
Expand Up @@ -666,22 +666,25 @@ void matrix_init_quantum() {
}

void matrix_scan_quantum() {
#if defined(AUDIO_ENABLE)
// There are some tasks that need to be run a little bit
// after keyboard startup, or else they will not work correctly
// because of interaction with the USB device state, which
// may still be in flux...
//
// At the moment the only feature that needs this is the
// startup song.
static bool delayed_tasks_run = false;
static uint16_t delayed_task_timer = 0;
if (!delayed_tasks_run) {
if (!delayed_task_timer) {
delayed_task_timer = timer_read();
} else if (timer_elapsed(delayed_task_timer) > 300) {
#if defined(AUDIO_ENABLE)
audio_startup();
#endif
delayed_tasks_run = true;
}
}
#endif

#if defined(AUDIO_ENABLE) && !defined(NO_MUSIC_MODE)
matrix_scan_music();
Expand Down

0 comments on commit f31eef5

Please sign in to comment.