typedef struct { bool R; bool G; bool B; } rgb_color; #define rgb_white (rgb_color){ .R = 0, .G = 0, .B = 0 } #define rgb_yellow (rgb_color){ .R = 0, .G = 0, .B = 1 } #define rgb_purple (rgb_color){ .R = 0, .G = 1, .B = 0 } #define rgb_red (rgb_color){ .R = 0, .G = 1, .B = 1 } #define rgb_cyan (rgb_color){ .R = 1, .G = 0, .B = 0 } #define rgb_green (rgb_color){ .R = 1, .G = 0, .B = 1 } #define rgb_blue (rgb_color){ .R = 1, .G = 1, .B = 0 } #define rgb_black (rgb_color){ .R = 1, .G = 1, .B = 1 } typedef struct { rgb_color color; int R_pin; int G_pin; int B_pin; } rgb_led; void rgb_init_LED(rgb_led *LED, int R_pin, int G_pin, int B_pin); void rgb_set_color(rgb_led *LED, rgb_color color);