some stuff

This commit is contained in:
john stone 2012-10-11 23:22:33 +02:00
parent 403314ed83
commit e51e91ce04
2 changed files with 9 additions and 2 deletions

View File

@ -8,7 +8,7 @@ FUSES = lfuse:w:0xe2:m -U hfuse:w:0xdf:m -U efuse:w:0x01:m
#########################################################################
SRC=$(wildcard lib/*.c *.c apps/*.c)
SRC=$(wildcard lib/*.c apps/*.c *.c)
OBJECTS= $(SRC:.c=.o)
LSTFILES= $(SRC:.c=.lst)
HEADERS=$(wildcard lib/*.h *.h)

View File

@ -54,6 +54,7 @@ void do_powerDown(void)
static timer_t mytimer;
static uint8_t pwdn_state;
static bool ledRon;
uint8_t oldreg;
if (mode_uninitialized) {
mode_uninitialized = false;
pwdn_state = 0;
@ -104,12 +105,14 @@ void do_powerDown(void)
break;
case 5: //now we can really power down
// lets switch everything off
oldreg = PCMSK2;
PCMSK2 |= 3; //PCINT16 PCINT17
set_sleep_mode(SLEEP_MODE_PWR_DOWN);
sleep_enable();
sei();
sleep_cpu();
sleep_disable();
PCMSK2 = oldreg;
NextMode = 0;
break;
default:
@ -120,6 +123,10 @@ void do_powerDown(void)
} //end timer expired
} // end do_powerDown
ISR(PCINT2_vect){ ; }
void __attribute__ ((noreturn)) main(void)
{
/* hardware initialisation: */