From 956f806644cda07abfd08b0ff6c9b14e36bf15db Mon Sep 17 00:00:00 2001 From: tmk Date: Thu, 14 Sep 2017 12:56:35 +0900 Subject: [PATCH] core: Fix for ATtiny85 --- tmk_core/common/avr/suspend.c | 2 ++ tmk_core/common/avr/timer.c | 4 ++++ 2 files changed, 6 insertions(+) diff --git a/tmk_core/common/avr/suspend.c b/tmk_core/common/avr/suspend.c index 02d7e4c9..0e13eb69 100644 --- a/tmk_core/common/avr/suspend.c +++ b/tmk_core/common/avr/suspend.c @@ -72,11 +72,13 @@ static void power_down(uint8_t wdto) static void standby(void) { +#ifdef SLEEP_MODE_STANDBY set_sleep_mode(SLEEP_MODE_STANDBY); sleep_enable(); sei(); sleep_cpu(); sleep_disable(); +#endif } static void idle(void) diff --git a/tmk_core/common/avr/timer.c b/tmk_core/common/avr/timer.c index 292b41c3..1aa4a6a8 100644 --- a/tmk_core/common/avr/timer.c +++ b/tmk_core/common/avr/timer.c @@ -46,7 +46,11 @@ void timer_init(void) #endif OCR0A = TIMER_RAW_TOP; +#ifdef TIMSK0 TIMSK0 = (1<