diff options
| author | Selene ToyKeeper | 2021-09-15 01:40:06 -0600 |
|---|---|---|
| committer | Selene ToyKeeper | 2021-09-15 01:40:06 -0600 |
| commit | b2d963efd4bcbc83a310c26d31c306176e21b1f6 (patch) | |
| tree | f2f01f6545dac54f9b23bbc2fa14c6dfd84950b7 /spaghetti-monster/fsm-main.c | |
| parent | documented "hold" action in number entry state (diff) | |
| parent | added Noctigon K9.3-tintramp build targets for FET, reduced FET, and noFET (diff) | |
| download | anduril-b2d963efd4bcbc83a310c26d31c306176e21b1f6.tar.gz anduril-b2d963efd4bcbc83a310c26d31c306176e21b1f6.tar.bz2 anduril-b2d963efd4bcbc83a310c26d31c306176e21b1f6.zip | |
merged K9.3-tintramp / D4Sv2-tintramp branch
(which also changed the way tint ramping is implemented,
to make things generally cleaner and more flexible)
Diffstat (limited to 'spaghetti-monster/fsm-main.c')
| -rw-r--r-- | spaghetti-monster/fsm-main.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/spaghetti-monster/fsm-main.c b/spaghetti-monster/fsm-main.c index f3c319c..7031009 100644 --- a/spaghetti-monster/fsm-main.c +++ b/spaghetti-monster/fsm-main.c @@ -47,7 +47,9 @@ static inline void hw_setup() { TCCR0B = 0x01; // pre-scaler for timer (1 => 1, 2 => 8, 3 => 64...) TCCR0A = PHASE; #endif - #if PWM_CHANNELS >= 2 + // tint ramping needs second channel enabled, + // despite PWM_CHANNELS being only 1 + #if (PWM_CHANNELS >= 2) || defined(USE_TINT_RAMPING) DDRB |= (1 << PWM2_PIN); #endif #if PWM_CHANNELS >= 3 |
