Tell me #2
Labels
No labels
bug
documentation
duplicate
enhancement
good first issue
help wanted
invalid
question
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference: okhsunrog/esp_ws28xx#2
Loading…
Add table
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Hi, I'm looking at your code and would like to ask what it means to you

typedef struct {
union {
struct {
union {
uint8_t r;
uint8_t red;
};
} CRGB;
@mironov1338 hi. Actually I copied the type from the lib I forked mine from: https://github.com/8-DK/ESP32_SPI_WS2812_idf
I can explain to you, what it means. It's union, so it's just another handy way to address the fields of the struct. You can call then by names of colors, .red or .r, or you can call them by index, if you want, for example, for some reason iterate over them in an array. uint32_t num could be handy for "serialization", when you want so save the pixel as one integer value. Unions in C give you a way to access bytes of data in a different way. It has no overhead, doesn't increase size of CRGB struct and it's there because I thought it might be handy sometimes in the feature.
Thx bro>< you a monster!