summaryrefslogtreecommitdiffstats
path: root/tmk_core
diff options
context:
space:
mode:
authorStephan Bösebeck <sb@caluga.de>2016-04-19 23:07:11 +0200
committerStephan Bösebeck <sb@caluga.de>2016-04-19 23:07:11 +0200
commit6ff5e1059256cfd6ec1cb88c12e90f57c10f44ef (patch)
treefa23de88dc8b8d3f3fe6a2e353eaa3ae1e38a1b8 /tmk_core
parent04f36b36818885475c0b93046726d7e053691e7a (diff)
parenta2ee27715880616a15756e1b9f42183d9fb08051 (diff)
Merge branch 'master' of https://github.com/jackhumbert/qmk_firmware
Diffstat (limited to 'tmk_core')
-rw-r--r--tmk_core/common/avr/suspend.c12
-rw-r--r--tmk_core/common/command.c7
2 files changed, 18 insertions, 1 deletions
diff --git a/tmk_core/common/avr/suspend.c b/tmk_core/common/avr/suspend.c
index c07c2801d5..e295dbe18b 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
diff --git a/tmk_core/common/command.c b/tmk_core/common/command.c
index 7572b95979..f06abaf7f0 100644
--- a/tmk_core/common/command.c
+++ b/tmk_core/common/command.c
@@ -49,6 +49,10 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
# include "usbdrv.h"
#endif
+#ifdef AUDIO_ENABLE
+ #include "audio.h"
+#endif /* AUDIO_ENABLE */
+
static bool command_common(uint8_t code);
static void command_common_help(void);
@@ -352,6 +356,9 @@ static bool command_common(uint8_t code)
case MAGIC_KC(MAGIC_KEY_BOOTLOADER):
clear_keyboard(); // clear to prevent stuck keys
print("\n\nJumping to bootloader... ");
+ #ifdef AUDIO_ENABLE
+ play_goodbye_tone();
+ #endif
_delay_ms(1000);
bootloader_jump(); // not return
break;