From d34d0e7acb1f1e49d21af7cf1c9e08161ce95dd4 Mon Sep 17 00:00:00 2001 From: Selene ToyKeeper Date: Sun, 17 Sep 2023 04:37:25 -0600 Subject: fixed builds which weren't using set_level_zero() yet... - emisar-d4 - emisar-d4v2 - emisar-d4v2-nofet - emisar-d4sv2 - emisar-2ch - emisar-2ch-fet - noctigon-dm11-boost - noctigon-k1 - noctigon-kr4 - noctigon-kr4-nofet - sofirn-lt1s-pro ... and removed old build targets for d4sv2-tintramp, because it was replaced by emisar-2ch a while ago. --- hwdef-noctigon-k1.c | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) (limited to 'hwdef-noctigon-k1.c') diff --git a/hwdef-noctigon-k1.c b/hwdef-noctigon-k1.c index 5063fd5..5d61860 100644 --- a/hwdef-noctigon-k1.c +++ b/hwdef-noctigon-k1.c @@ -6,6 +6,8 @@ #include "chan-rgbaux.c" +void set_level_zero(); + void set_level_main(uint8_t level); bool gradual_tick_main(uint8_t gt); @@ -19,19 +21,17 @@ Channel channels[] = { }; -// single set of LEDs with 2 stacked power channels, linear + DD FET -void set_level_main(uint8_t level) { - if (level == 0) { - CH1_PWM = 0; - //CH2_PWM = 0; - //PWM_CNT = 0; // reset phase - CH1_ENABLE_PORT &= ~(1 << CH1_ENABLE_PIN); // disable opamp - return; - } +void set_level_zero() { + CH1_PWM = 0; + //CH2_PWM = 0; + //PWM_CNT = 0; // reset phase + CH1_ENABLE_PORT &= ~(1 << CH1_ENABLE_PIN); // disable opamp +} +// single LED with 1 power channels, linear +void set_level_main(uint8_t level) { CH1_ENABLE_PORT |= (1 << CH1_ENABLE_PIN); // enable opamp - level --; // PWM array index = level - 1 PWM_DATATYPE ch1_pwm = PWM_GET(pwm1_levels, level); //PWM_DATATYPE ch2_pwm = PWM_GET(pwm2_levels, level); // pulse frequency modulation, a.k.a. dynamic PWM -- cgit v1.2.3