Add support for ESP32-S2 build.

Signed-off-by: Pol Henarejos <pol.henarejos@cttc.es>
This commit is contained in:
Pol Henarejos 2025-02-19 11:17:02 +01:00
parent f06cb3a96d
commit 90fb86be64
No known key found for this signature in database
GPG key ID: C0095B7870A4CCD3

View file

@ -36,7 +36,13 @@ tNeopixel pixel[] = {
};
void led_driver_init() {
#ifdef GPIO_NUM_48
// ESP32-S3 uses GPIO48
uint8_t gpio = GPIO_NUM_48;
#else
// Other ESP32 (ESP32-S2) may use another GPIO. GPIO15 is used by Mini S2
uint8_t gpio = GPIO_NUM_15;
#endif
if (phy_data.led_gpio_present) {
gpio = phy_data.led_gpio;
}