summaryrefslogtreecommitdiffstats
path: root/tmk_core/common/avr/suspend.c
diff options
context:
space:
mode:
authorJack Humbert <jack.humb@gmail.com>2016-04-19 03:04:29 +0200
committerJack Humbert <jack.humb@gmail.com>2016-04-19 03:04:29 +0200
commit78b3a88154914591d2c3433b123d4b80e70f511d (patch)
treecfbbdf10c9008269c86f0756623a99e71ff085bf /tmk_core/common/avr/suspend.c
parente49712b5593b887c8af18aeb7196513f1c7b7bcf (diff)
parentf2c1e9ddd40573f4b44ffc2ec7df1fb76346f627 (diff)
downloadqmk_firmware-78b3a88154914591d2c3433b123d4b80e70f511d.tar.gz
qmk_firmware-78b3a88154914591d2c3433b123d4b80e70f511d.tar.xz
merging in #262
Diffstat (limited to 'tmk_core/common/avr/suspend.c')
-rw-r--r--tmk_core/common/avr/suspend.c12
1 files changed, 11 insertions, 1 deletions
diff --git a/tmk_core/common/avr/suspend.c b/tmk_core/common/avr/suspend.c
index c07c2801d..e295dbe18 100644
--- a/tmk_core/common/avr/suspend.c
+++ b/tmk_core/common/avr/suspend.c
@@ -9,10 +9,16 @@
#include "suspend.h"
#include "timer.h"
#include "led.h"
+
#ifdef PROTOCOL_LUFA
-#include "lufa.h"
+ #include "lufa.h"
#endif
+#ifdef AUDIO_ENABLE
+ #include "audio.h"
+#endif /* AUDIO_ENABLE */
+
+
#define wdt_intr_enable(value) \
__asm__ __volatile__ ( \
@@ -72,6 +78,10 @@ static void power_down(uint8_t wdto)
// Turn off LED indicators
led_set(0);
+ #ifdef AUDIO_ENABLE
+ stop_all_notes();
+ #endif /* AUDIO_ENABLE */
+
// TODO: more power saving
// See PicoPower application note
// - I/O port input with pullup