forked from mirrors/qmk_userspace
Stop sounds when suspended (#11553)
* fix stopping audio on suspend vs. startup sound * trim firmware size * fix stuck audio on startup (ARM)
This commit is contained in:
parent
db11a2a1fd
commit
ae4ee7553a
7 changed files with 56 additions and 4 deletions
|
@ -12,6 +12,10 @@
|
|||
#include "led.h"
|
||||
#include "wait.h"
|
||||
|
||||
#ifdef AUDIO_ENABLE
|
||||
# include "audio.h"
|
||||
#endif /* AUDIO_ENABLE */
|
||||
|
||||
#ifdef BACKLIGHT_ENABLE
|
||||
# include "backlight.h"
|
||||
#endif
|
||||
|
@ -65,6 +69,9 @@ void suspend_power_down(void) {
|
|||
#if defined(RGBLIGHT_SLEEP) && defined(RGBLIGHT_ENABLE)
|
||||
rgblight_suspend();
|
||||
#endif
|
||||
#ifdef AUDIO_ENABLE
|
||||
stop_all_notes();
|
||||
#endif /* AUDIO_ENABLE */
|
||||
|
||||
suspend_power_down_kb();
|
||||
// on AVR, this enables the watchdog for 15ms (max), and goes to
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue