aboutsummaryrefslogtreecommitdiff
path: root/spaghetti-monster/fsm-misc.c
diff options
context:
space:
mode:
authorSelene ToyKeeper2018-10-07 19:37:22 -0600
committerSelene ToyKeeper2018-10-07 19:37:22 -0600
commita7750407f2722d20773b294ba26a5ff1f0cb6650 (patch)
treee27af9a10511bdae9e318ac4870e944fac7383b2 /spaghetti-monster/fsm-misc.c
parentmerged FF ROT66 updates (supports both 7x7135 and 14x7135 now) (diff)
parentMade second aux LED copy the behavior of the first. (diff)
downloadanduril-a7750407f2722d20773b294ba26a5ff1f0cb6650.tar.gz
anduril-a7750407f2722d20773b294ba26a5ff1f0cb6650.tar.bz2
anduril-a7750407f2722d20773b294ba26a5ff1f0cb6650.zip
merged FF PL47 branch (first rev, may not be final)
Diffstat (limited to 'spaghetti-monster/fsm-misc.c')
-rw-r--r--spaghetti-monster/fsm-misc.c12
1 files changed, 12 insertions, 0 deletions
diff --git a/spaghetti-monster/fsm-misc.c b/spaghetti-monster/fsm-misc.c
index e60909e..e61fe00 100644
--- a/spaghetti-monster/fsm-misc.c
+++ b/spaghetti-monster/fsm-misc.c
@@ -113,14 +113,26 @@ void indicator_led(uint8_t lvl) {
case 0: // indicator off
DDRB &= 0xff ^ (1 << AUXLED_PIN);
PORTB &= 0xff ^ (1 << AUXLED_PIN);
+ #ifdef AUXLED2_PIN // second LED mirrors the first
+ DDRB &= 0xff ^ (1 << AUXLED2_PIN);
+ PORTB &= 0xff ^ (1 << AUXLED2_PIN);
+ #endif
break;
case 1: // indicator low
DDRB &= 0xff ^ (1 << AUXLED_PIN);
PORTB |= (1 << AUXLED_PIN);
+ #ifdef AUXLED2_PIN // second LED mirrors the first
+ DDRB &= 0xff ^ (1 << AUXLED2_PIN);
+ PORTB |= (1 << AUXLED2_PIN);
+ #endif
break;
default: // indicator high
DDRB |= (1 << AUXLED_PIN);
PORTB |= (1 << AUXLED_PIN);
+ #ifdef AUXLED2_PIN // second LED mirrors the first
+ DDRB |= (1 << AUXLED2_PIN);
+ PORTB |= (1 << AUXLED2_PIN);
+ #endif
break;
}
}