diff options
| author | Selene ToyKeeper | 2018-10-07 19:20:19 -0600 |
|---|---|---|
| committer | Selene ToyKeeper | 2018-10-07 19:20:19 -0600 |
| commit | 7c3fe5878da90e1b5f540ebb2547e974715a6f98 (patch) | |
| tree | e27af9a10511bdae9e318ac4870e944fac7383b2 /spaghetti-monster/fsm-misc.c | |
| parent | Added option to skip "low" mode for aux LEDs. (diff) | |
| download | anduril-7c3fe5878da90e1b5f540ebb2547e974715a6f98.tar.gz anduril-7c3fe5878da90e1b5f540ebb2547e974715a6f98.tar.bz2 anduril-7c3fe5878da90e1b5f540ebb2547e974715a6f98.zip | |
Made second aux LED copy the behavior of the first.
(to make the PL47 switch LEDs mirror the front-facing aux LEDs)
Diffstat (limited to 'spaghetti-monster/fsm-misc.c')
| -rw-r--r-- | spaghetti-monster/fsm-misc.c | 12 |
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; } } |
