Use PHY value for LED GPIO number.

Signed-off-by: Pol Henarejos <pol.henarejos@cttc.es>
This commit is contained in:
Pol Henarejos
2024-12-16 13:10:35 +01:00
parent 1431f91281
commit 6859cedcbf
3 changed files with 18 additions and 6 deletions

View File

@@ -27,7 +27,11 @@ void led_driver_init() {
void led_driver_color(uint8_t color, uint32_t led_brightness, float progress) {
(void)led_brightness;
cyw43_arch_gpio_put(CYW43_WL_GPIO_LED_PIN, progress >= 0.5);
uint8_t gpio = CYW43_WL_GPIO_LED_PIN;
if (phy_data.led_gpio_present) {
gpio = phy_data.led_gpio;
}
cyw43_arch_gpio_put(gpio, progress >= 0.5);
}
#endif