From e51e91ce0494512fb454def36de08b1eceb20bf1 Mon Sep 17 00:00:00 2001 From: john stone Date: Thu, 11 Oct 2012 23:22:33 +0200 Subject: [PATCH] some stuff --- firmware/Makefile | 2 +- firmware/main.c | 9 ++++++++- 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/firmware/Makefile b/firmware/Makefile index 4a13800..9f0f3b1 100644 --- a/firmware/Makefile +++ b/firmware/Makefile @@ -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) diff --git a/firmware/main.c b/firmware/main.c index 402618d..d57ba4a 100644 --- a/firmware/main.c +++ b/firmware/main.c @@ -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: */