Skip to content

Commit 347b7c7

Browse files
authored
fix(rgbled): add guard for rgb_led_color_order_t
If RGB_BUILTIN_LED_COLOR_ORDER is not defined, the type rgb_led_color_order_t won't be declared.
1 parent 2814861 commit 347b7c7

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

Diff for: cores/esp32/esp32-hal-rgb-led.h

+2
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ extern "C" {
1111
#define RGB_BRIGHTNESS 64
1212
#endif
1313

14+
#if defined RGB_BUILTIN_LED_COLOR_ORDER
1415
typedef enum {
1516
LED_COLOR_ORDER_RGB,
1617
LED_COLOR_ORDER_BGR,
@@ -19,6 +20,7 @@ typedef enum {
1920
LED_COLOR_ORDER_GBR,
2021
LED_COLOR_ORDER_GRB
2122
} rgb_led_color_order_t;
23+
#endif
2224

2325
void neopixelWrite(uint8_t pin, uint8_t red_val, uint8_t green_val, uint8_t blue_val);
2426

0 commit comments

Comments
 (0)