added wake isr
This commit is contained in:
parent
20fe3d354f
commit
219d86f7c4
|
@ -107,11 +107,14 @@ void do_powerDown(void)
|
||||||
case 5: //now we can really power down
|
case 5: //now we can really power down
|
||||||
// lets switch everything off
|
// lets switch everything off
|
||||||
oldreg = PCMSK2;
|
oldreg = PCMSK2;
|
||||||
|
PCIFR = 0;
|
||||||
|
PCICR |= (1<<PCIE2);
|
||||||
PCMSK2 |= 3; //PCINT16 PCINT17
|
PCMSK2 |= 3; //PCINT16 PCINT17
|
||||||
set_sleep_mode(SLEEP_MODE_PWR_DOWN);
|
set_sleep_mode(SLEEP_MODE_PWR_DOWN);
|
||||||
sleep_enable();
|
sleep_enable();
|
||||||
sei();
|
sei();
|
||||||
sleep_cpu();
|
sleep_cpu();
|
||||||
|
PCICR &= ~(1<<PCIE2);
|
||||||
sleep_disable();
|
sleep_disable();
|
||||||
PCMSK2 = oldreg;
|
PCMSK2 = oldreg;
|
||||||
NextMode = 0;
|
NextMode = 0;
|
||||||
|
|
Loading…
Reference in New Issue
Block a user