core: Fix for ATtiny85
This commit is contained in:
parent
9d66875636
commit
956f806644
2 changed files with 6 additions and 0 deletions
|
|
@ -72,11 +72,13 @@ static void power_down(uint8_t wdto)
|
||||||
|
|
||||||
static void standby(void)
|
static void standby(void)
|
||||||
{
|
{
|
||||||
|
#ifdef SLEEP_MODE_STANDBY
|
||||||
set_sleep_mode(SLEEP_MODE_STANDBY);
|
set_sleep_mode(SLEEP_MODE_STANDBY);
|
||||||
sleep_enable();
|
sleep_enable();
|
||||||
sei();
|
sei();
|
||||||
sleep_cpu();
|
sleep_cpu();
|
||||||
sleep_disable();
|
sleep_disable();
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
static void idle(void)
|
static void idle(void)
|
||||||
|
|
|
||||||
|
|
@ -46,7 +46,11 @@ void timer_init(void)
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
OCR0A = TIMER_RAW_TOP;
|
OCR0A = TIMER_RAW_TOP;
|
||||||
|
#ifdef TIMSK0
|
||||||
TIMSK0 = (1<<OCIE0A);
|
TIMSK0 = (1<<OCIE0A);
|
||||||
|
#else
|
||||||
|
TIMSK = (1<<OCIE0A);
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
inline
|
inline
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue