chore(radio): save some ram in radios with RGB LEDs (#5973)

Co-authored-by: 3djc <3djc@gh.com>
Co-authored-by: Risto <rotorman@users.noreply.github.com>
This commit is contained in:
3djc
2025-03-11 12:04:12 +10:00
committed by GitHub
co-authored by 3djc Risto
parent 538c5fcf40
commit 5bb7612040
8 changed files with 50 additions and 60 deletions
+2 -10
View File
@@ -62,10 +62,6 @@
HardwareOptions hardwareOptions;
#if defined(LED_STRIP_GPIO)
extern const stm32_pulse_timer_t _led_timer;
#endif
#if !defined(BOOT)
#if defined(FUNCTION_SWITCHES)
@@ -104,7 +100,7 @@ uint16_t getSixPosAnalogValue(uint16_t adcValue)
else
ws2812_set_color(i, 0, 0, 0);
}
ws2812_update(&_led_timer);
rgbLedColorApply();
}
return (4096/5)*(sixPosState);
}
@@ -244,11 +240,7 @@ void boardInit()
usbInit();
#if defined(LED_STRIP_GPIO)
ws2812_init(&_led_timer, LED_STRIP_LENGTH, WS2812_GRB);
for (uint8_t i = 0; i < LED_STRIP_LENGTH; i++) {
ws2812_set_color(i, 0, 0, 50);
}
ws2812_update(&_led_timer);
rgbLedInit();
#endif
#if defined(HAPTIC)
+5 -5
View File
@@ -1963,11 +1963,11 @@
// LED Strip
#if defined(RGBLEDS)
#if defined(RADIO_GX12)
#define LED_STRIP_LENGTH 8
#else
#define LED_STRIP_LENGTH 7
#endif
#if defined(RADIO_GX12)
#define LED_STRIP_LENGTH 8
#else
#define LED_STRIP_LENGTH 7
#endif
#define LED_STRIP_GPIO GPIO_PIN(GPIOA, 8) // PA.08 / TIM1_CH1
#define LED_STRIP_GPIO_AF LL_GPIO_AF_1 // TIM1 / TIM2
#define LED_STRIP_TIMER TIM1