From d7769b83eec1240f5b21281b8197a01e7c30c464 Mon Sep 17 00:00:00 2001 From: Tanjun <32965926@qq.com> Date: Tue, 12 Mar 2019 22:19:22 +0800 Subject: [PATCH] Fixed R and G color definition error in hal-common\include\halws2812.h --- components/hal-common/include/hal/ws2812.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/components/hal-common/include/hal/ws2812.h b/components/hal-common/include/hal/ws2812.h index 28bd642..b997aa6 100644 --- a/components/hal-common/include/hal/ws2812.h +++ b/components/hal-common/include/hal/ws2812.h @@ -14,8 +14,8 @@ typedef struct hal_ws2812_color_s { // Declared in the same order as they're sent out, // so we can avoid a copy to reorder the data in memory. - uint8_t g; uint8_t r; + uint8_t g; uint8_t b; } __attribute__((packed)) hal_ws2812_color_t; @@ -34,7 +34,7 @@ typedef struct hal_ws2812_state_s #define HAL_WS2812_RGB(red, green, blue) \ { \ - .g = green, .r = red, .b = blue \ + .r = red, .g = green, .b = blue \ } #define HAL_WS2812_RED HAL_WS2812_RGB(HAL_WS2812_COLOR_LEVEL_MAX, 0, 0)