Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Change declared order in which red and green on ws2812 color's definition #47

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions components/hal-common/include/hal/ws2812.h
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand All @@ -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)
Expand Down