summaryrefslogtreecommitdiff
path: root/tmk_core/common/avr
diff options
context:
space:
mode:
Diffstat (limited to 'tmk_core/common/avr')
-rw-r--r--tmk_core/common/avr/bootloader.c10
-rw-r--r--tmk_core/common/avr/suspend.c5
2 files changed, 7 insertions, 8 deletions
diff --git a/tmk_core/common/avr/bootloader.c b/tmk_core/common/avr/bootloader.c
index a1db55da93..4e3a27022d 100644
--- a/tmk_core/common/avr/bootloader.c
+++ b/tmk_core/common/avr/bootloader.c
@@ -77,7 +77,7 @@ uint32_t reset_key __attribute__((section(".noinit,\"aw\",@nobits;")));
*
* FIXME: needs doc
*/
-void bootloader_jump(void) {
+__attribute__((weak)) void bootloader_jump(void) {
#if !defined(BOOTLOADER_SIZE)
uint8_t high_fuse = boot_lock_fuse_bits_get(GET_HIGH_FUSE_BITS);
@@ -237,13 +237,13 @@ void bootloader_jump(void) {
"bootloader_startup_loop%=: \n\t"
"rjmp bootloader_startup_loop%= \n\t"
:
- : [mcucsrio] "I"(_SFR_IO_ADDR(MCUCSR)),
+ : [ mcucsrio ] "I"(_SFR_IO_ADDR(MCUCSR)),
# if (FLASHEND > 131071)
- [ramendhi] "M"(((RAMEND - 2) >> 8) & 0xff), [ramendlo] "M"(((RAMEND - 2) >> 0) & 0xff), [bootaddrhi] "M"((((FLASH_SIZE - BOOTLOADER_SIZE) >> 1) >> 16) & 0xff),
+ [ ramendhi ] "M"(((RAMEND - 2) >> 8) & 0xff), [ ramendlo ] "M"(((RAMEND - 2) >> 0) & 0xff), [ bootaddrhi ] "M"((((FLASH_SIZE - BOOTLOADER_SIZE) >> 1) >> 16) & 0xff),
# else
- [ramendhi] "M"(((RAMEND - 1) >> 8) & 0xff), [ramendlo] "M"(((RAMEND - 1) >> 0) & 0xff),
+ [ ramendhi ] "M"(((RAMEND - 1) >> 8) & 0xff), [ ramendlo ] "M"(((RAMEND - 1) >> 0) & 0xff),
# endif
- [bootaddrme] "M"((((FLASH_SIZE - BOOTLOADER_SIZE) >> 1) >> 8) & 0xff), [bootaddrlo] "M"((((FLASH_SIZE - BOOTLOADER_SIZE) >> 1) >> 0) & 0xff));
+ [ bootaddrme ] "M"((((FLASH_SIZE - BOOTLOADER_SIZE) >> 1) >> 8) & 0xff), [ bootaddrlo ] "M"((((FLASH_SIZE - BOOTLOADER_SIZE) >> 1) >> 0) & 0xff));
#else // Assume remaining boards are DFU, even if the flag isn't set
diff --git a/tmk_core/common/avr/suspend.c b/tmk_core/common/avr/suspend.c
index 86c3df040a..b784a0835d 100644
--- a/tmk_core/common/avr/suspend.c
+++ b/tmk_core/common/avr/suspend.c
@@ -97,13 +97,11 @@ static void power_down(uint8_t wdto) {
led_set(leds_off);
# ifdef AUDIO_ENABLE
- // This sometimes disables the start-up noise, so it's been disabled
- // stop_all_notes();
+ stop_all_notes();
# endif /* AUDIO_ENABLE */
# if defined(RGBLIGHT_SLEEP) && defined(RGBLIGHT_ENABLE)
rgblight_suspend();
# endif
- suspend_power_down_kb();
// TODO: more power saving
// See PicoPower application note
@@ -157,6 +155,7 @@ __attribute__((weak)) void suspend_wakeup_init_user(void) {}
* FIXME: needs doc
*/
__attribute__((weak)) void suspend_wakeup_init_kb(void) { suspend_wakeup_init_user(); }
+
/** \brief run immediately after wakeup
*
* FIXME: needs doc