X-Git-Url: https://git.donarmstrong.com/?a=blobdiff_plain;f=tmk_core%2Fcommon%2Favr%2Fsuspend.c;h=8a7272bbc5298612bc935f51116d5e44973cddf2;hb=b25dbc484d639210c53d8e13f79cf5a77f2faaaa;hp=c07c2801d5ef75e277ab1b460f0fcac826b13568;hpb=f7f4f1725e3d9551c8b7660475ef076bcb8ecbf2;p=qmk_firmware.git diff --git a/tmk_core/common/avr/suspend.c b/tmk_core/common/avr/suspend.c index c07c2801d..8a7272bbc 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,11 @@ static void power_down(uint8_t wdto) // Turn off LED indicators led_set(0); + #ifdef AUDIO_ENABLE + // This sometimes disables the start-up noise, so it's been disabled + // stop_all_notes(); + #endif /* AUDIO_ENABLE */ + // TODO: more power saving // See PicoPower application note // - I/O port input with pullup @@ -106,7 +117,7 @@ bool suspend_wakeup_condition(void) for (uint8_t r = 0; r < MATRIX_ROWS; r++) { if (matrix_get_row(r)) return true; } - return false; + return false; } // run immediately after wakeup @@ -135,4 +146,3 @@ ISR(WDT_vect) } } #endif -