mirror of https://github.com/MLXXXp/Arduboy2.git
Refactor idle() to reduce code size
This commit is contained in:
parent
bd726fc112
commit
6e1c47cbe0
|
@ -261,8 +261,9 @@ void Arduboy2Core::safeMode()
|
|||
|
||||
void Arduboy2Core::idle()
|
||||
{
|
||||
set_sleep_mode(SLEEP_MODE_IDLE);
|
||||
sleep_mode();
|
||||
SMCR = _BV(SE); // select idle mode and enable sleeping
|
||||
sleep_cpu();
|
||||
SMCR = 0; // disable sleeping
|
||||
}
|
||||
|
||||
void Arduboy2Core::bootPowerSaving()
|
||||
|
|
Loading…
Reference in New Issue