diff options
| author | Gabriel Hart | 2021-04-14 14:10:14 -0500 |
|---|---|---|
| committer | Gabriel Hart | 2021-04-14 14:10:14 -0500 |
| commit | 9dddc98863af8987c671d978d2ce8bc7e67c2e89 (patch) | |
| tree | bbc9d3df42e9d8b366fefea45ad15700c001153e /spaghetti-monster/fsm-pcint.c | |
| parent | Merge TKs changes from 2021-01-25 (diff) | |
| parent | fixed missing ifdef for simple UI (diff) | |
| download | anduril-9dddc98863af8987c671d978d2ce8bc7e67c2e89.tar.gz anduril-9dddc98863af8987c671d978d2ce8bc7e67c2e89.tar.bz2 anduril-9dddc98863af8987c671d978d2ce8bc7e67c2e89.zip | |
Merge from main branch
Diffstat (limited to 'spaghetti-monster/fsm-pcint.c')
| -rw-r--r-- | spaghetti-monster/fsm-pcint.c | 26 |
1 files changed, 10 insertions, 16 deletions
diff --git a/spaghetti-monster/fsm-pcint.c b/spaghetti-monster/fsm-pcint.c index 4a3c193..4ada5b8 100644 --- a/spaghetti-monster/fsm-pcint.c +++ b/spaghetti-monster/fsm-pcint.c @@ -69,24 +69,20 @@ inline void PCINT_off() { //void button_change_interrupt() { #if (ATTINY == 25) || (ATTINY == 45) || (ATTINY == 85) || (ATTINY == 1634) -//EMPTY_INTERRUPT(PCINT0_vect); -#ifdef PCINT_vect -ISR(PCINT_vect) { -#else -ISR(PCINT0_vect) { -#endif - irq_pcint = 1; -} + #ifdef PCINT_vect + ISR(PCINT_vect) { + #else + ISR(PCINT0_vect) { + #endif #elif defined(AVRXMEGA3) // ATTINY816, 817, etc) -ISR(SWITCH_VECT) { - SWITCH_INTFLG |= (1 << SWITCH_PIN); // Write a '1' to clear the interrupt flag - irq_pcint = 1; -} + ISR(SWITCH_VECT) { + // Write a '1' to clear the interrupt flag + SWITCH_INTFLG |= (1 << SWITCH_PIN); #else #error Unrecognized MCU type #endif -/* -ISR(PCINT0_vect) { + + irq_pcint = 1; // let deferred code know an interrupt happened //DEBUG_FLASH; @@ -95,9 +91,7 @@ ISR(PCINT0_vect) { // noisy / bouncy switch (so the content of this function has been // moved to a separate function, called from WDT only) // PCINT_inner(button_is_pressed()); - } -*/ // should only be called from PCINT and/or WDT // (is a separate function to reduce code duplication) |
