From 7d07887e11cf7804ce8eb15fac666551b9a2497e Mon Sep 17 00:00:00 2001 From: Selene ToyKeeper Date: Tue, 25 Feb 2020 23:43:33 -0700 Subject: added support for boost PMIC enable pin (K1 12V has 2 pins which need to turn on/off for main LED output) --- spaghetti-monster/fsm-ramping.c | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'spaghetti-monster/fsm-ramping.c') diff --git a/spaghetti-monster/fsm-ramping.c b/spaghetti-monster/fsm-ramping.c index 20500cc..bae601e 100644 --- a/spaghetti-monster/fsm-ramping.c +++ b/spaghetti-monster/fsm-ramping.c @@ -72,6 +72,9 @@ void set_level(uint8_t level) { #ifdef LED_ENABLE_PIN LED_ENABLE_PORT &= ~(1 << LED_ENABLE_PIN); #endif + #ifdef LED_ENABLE2_PIN + LED_ENABLE2_PORT &= ~(1 << LED_ENABLE2_PIN); + #endif } else { level --; @@ -79,6 +82,9 @@ void set_level(uint8_t level) { #ifdef LED_ENABLE_PIN LED_ENABLE_PORT |= (1 << LED_ENABLE_PIN); #endif + #ifdef LED_ENABLE2_PIN + LED_ENABLE2_PORT |= (1 << LED_ENABLE2_PIN); + #endif #ifdef USE_TINT_RAMPING #ifndef TINT_RAMPING_CORRECTION -- cgit v1.2.3