1
0
Fork 0

Fixed speaker being on during sleep.

This commit is contained in:
IBNobody 2016-04-18 18:58:37 -05:00
parent cbcf0abe62
commit 4b3358acc2
2 changed files with 231 additions and 209 deletions

View file

@ -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