Skip to content

Commit 631d2fd

Browse files
authored
fixes boards that don't RGB_BUILTIN
1 parent 0567715 commit 631d2fd

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

cores/esp32/esp32-hal-rgb-led.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,9 @@ void neopixelWrite(uint8_t pin, uint8_t red_val, uint8_t green_val, uint8_t blue
55
rmt_data_t led_data[24];
66

77
// Verify if the pin used is RGB_BUILTIN and fix GPIO number
8+
#ifdef RGB_BUILTIN
89
pin = pin == RGB_BUILTIN ? pin - SOC_GPIO_PIN_COUNT : pin;
10+
#endif
911
if (!rmtInit(pin, RMT_TX_MODE, RMT_MEM_NUM_BLOCKS_1, 10000000)) {
1012
log_e("RGB LED driver initialization failed for GPIO%d!", pin);
1113
return;

0 commit comments

Comments
 (0)