summaryrefslogtreecommitdiff
path: root/quantum
diff options
context:
space:
mode:
authorRyan <fauxpark@gmail.com>2024-04-28 00:36:54 +1000
committerGitHub <noreply@github.com>2024-04-28 00:36:54 +1000
commit0ff53b24984e88f385638e47ea076b4d2945c0c6 (patch)
tree73c0e43df640c132507cb146447adfb7d0ed4b49 /quantum
parent8f8fffc1740be81fbfe4a07a74e9f03962c1062a (diff)
Rename `RGBW` define to `WS2812_RGBW` (#23585)
Diffstat (limited to 'quantum')
-rw-r--r--quantum/color.c2
-rw-r--r--quantum/color.h4
-rw-r--r--quantum/rgb_matrix/rgb_matrix_drivers.c2
-rw-r--r--quantum/rgblight/rgblight.c18
4 files changed, 13 insertions, 13 deletions
diff --git a/quantum/color.c b/quantum/color.c
index 395383f428..96d548a33c 100644
--- a/quantum/color.c
+++ b/quantum/color.c
@@ -109,7 +109,7 @@ RGB hsv_to_rgb_nocie(HSV hsv) {
109 return hsv_to_rgb_impl(hsv, false); 109 return hsv_to_rgb_impl(hsv, false);
110} 110}
111 111
112#ifdef RGBW 112#ifdef WS2812_RGBW
113void convert_rgb_to_rgbw(rgb_led_t *led) { 113void convert_rgb_to_rgbw(rgb_led_t *led) {
114 // Determine lowest value in all three colors, put that into 114 // Determine lowest value in all three colors, put that into
115 // the white channel and then shift all colors by that amount 115 // the white channel and then shift all colors by that amount
diff --git a/quantum/color.h b/quantum/color.h
index 00a3bfb3f8..b6a9dd0641 100644
--- a/quantum/color.h
+++ b/quantum/color.h
@@ -96,7 +96,7 @@ typedef struct PACKED rgb_led_t {
96 uint8_t g; 96 uint8_t g;
97 uint8_t r; 97 uint8_t r;
98#endif 98#endif
99#ifdef RGBW 99#ifdef WS2812_RGBW
100 uint8_t w; 100 uint8_t w;
101#endif 101#endif
102} rgb_led_t; 102} rgb_led_t;
@@ -111,6 +111,6 @@ typedef struct PACKED HSV {
111 111
112RGB hsv_to_rgb(HSV hsv); 112RGB hsv_to_rgb(HSV hsv);
113RGB hsv_to_rgb_nocie(HSV hsv); 113RGB hsv_to_rgb_nocie(HSV hsv);
114#ifdef RGBW 114#ifdef WS2812_RGBW
115void convert_rgb_to_rgbw(rgb_led_t *led); 115void convert_rgb_to_rgbw(rgb_led_t *led);
116#endif 116#endif
diff --git a/quantum/rgb_matrix/rgb_matrix_drivers.c b/quantum/rgb_matrix/rgb_matrix_drivers.c
index 4370996d0e..db3a2ef9e0 100644
--- a/quantum/rgb_matrix/rgb_matrix_drivers.c
+++ b/quantum/rgb_matrix/rgb_matrix_drivers.c
@@ -185,7 +185,7 @@ static inline void setled(int i, uint8_t r, uint8_t g, uint8_t b) {
185 rgb_matrix_ws2812_array[i].r = r; 185 rgb_matrix_ws2812_array[i].r = r;
186 rgb_matrix_ws2812_array[i].g = g; 186 rgb_matrix_ws2812_array[i].g = g;
187 rgb_matrix_ws2812_array[i].b = b; 187 rgb_matrix_ws2812_array[i].b = b;
188# ifdef RGBW 188# ifdef WS2812_RGBW
189 convert_rgb_to_rgbw(&rgb_matrix_ws2812_array[i]); 189 convert_rgb_to_rgbw(&rgb_matrix_ws2812_array[i]);
190# endif 190# endif
191} 191}
diff --git a/quantum/rgblight/rgblight.c b/quantum/rgblight/rgblight.c
index 62137c020b..b0f2dfdc1d 100644
--- a/quantum/rgblight/rgblight.c
+++ b/quantum/rgblight/rgblight.c
@@ -149,7 +149,7 @@ void setrgb(uint8_t r, uint8_t g, uint8_t b, rgb_led_t *led1) {
149 led1->r = r; 149 led1->r = r;
150 led1->g = g; 150 led1->g = g;
151 led1->b = b; 151 led1->b = b;
152#ifdef RGBW 152#ifdef WS2812_RGBW
153 led1->w = 0; 153 led1->w = 0;
154#endif 154#endif
155} 155}
@@ -652,7 +652,7 @@ void rgblight_setrgb(uint8_t r, uint8_t g, uint8_t b) {
652 led[i].r = r; 652 led[i].r = r;
653 led[i].g = g; 653 led[i].g = g;
654 led[i].b = b; 654 led[i].b = b;
655#ifdef RGBW 655#ifdef WS2812_RGBW
656 led[i].w = 0; 656 led[i].w = 0;
657#endif 657#endif
658 } 658 }
@@ -667,7 +667,7 @@ void rgblight_setrgb_at(uint8_t r, uint8_t g, uint8_t b, uint8_t index) {
667 led[index].r = r; 667 led[index].r = r;
668 led[index].g = g; 668 led[index].g = g;
669 led[index].b = b; 669 led[index].b = b;
670#ifdef RGBW 670#ifdef WS2812_RGBW
671 led[index].w = 0; 671 led[index].w = 0;
672#endif 672#endif
673 rgblight_set(); 673 rgblight_set();
@@ -704,7 +704,7 @@ void rgblight_setrgb_range(uint8_t r, uint8_t g, uint8_t b, uint8_t start, uint8
704 led[i].r = r; 704 led[i].r = r;
705 led[i].g = g; 705 led[i].g = g;
706 led[i].b = b; 706 led[i].b = b;
707#ifdef RGBW 707#ifdef WS2812_RGBW
708 led[i].w = 0; 708 led[i].w = 0;
709#endif 709#endif
710 } 710 }
@@ -905,7 +905,7 @@ void rgblight_set(void) {
905 led[i].r = 0; 905 led[i].r = 0;
906 led[i].g = 0; 906 led[i].g = 0;
907 led[i].b = 0; 907 led[i].b = 0;
908#ifdef RGBW 908#ifdef WS2812_RGBW
909 led[i].w = 0; 909 led[i].w = 0;
910#endif 910#endif
911 } 911 }
@@ -933,7 +933,7 @@ void rgblight_set(void) {
933 start_led = led + rgblight_ranges.clipping_start_pos; 933 start_led = led + rgblight_ranges.clipping_start_pos;
934#endif 934#endif
935 935
936#ifdef RGBW 936#ifdef WS2812_RGBW
937 for (uint8_t i = 0; i < num_leds; i++) { 937 for (uint8_t i = 0; i < num_leds; i++) {
938 convert_rgb_to_rgbw(&start_led[i]); 938 convert_rgb_to_rgbw(&start_led[i]);
939 } 939 }
@@ -1263,7 +1263,7 @@ void rgblight_effect_snake(animation_status_t *anim) {
1263 ledp->r = 0; 1263 ledp->r = 0;
1264 ledp->g = 0; 1264 ledp->g = 0;
1265 ledp->b = 0; 1265 ledp->b = 0;
1266# ifdef RGBW 1266# ifdef WS2812_RGBW
1267 ledp->w = 0; 1267 ledp->w = 0;
1268# endif 1268# endif
1269 for (j = 0; j < RGBLIGHT_EFFECT_SNAKE_LENGTH; j++) { 1269 for (j = 0; j < RGBLIGHT_EFFECT_SNAKE_LENGTH; j++) {
@@ -1323,7 +1323,7 @@ void rgblight_effect_knight(animation_status_t *anim) {
1323 led[i].r = 0; 1323 led[i].r = 0;
1324 led[i].g = 0; 1324 led[i].g = 0;
1325 led[i].b = 0; 1325 led[i].b = 0;
1326# ifdef RGBW 1326# ifdef WS2812_RGBW
1327 led[i].w = 0; 1327 led[i].w = 0;
1328# endif 1328# endif
1329 } 1329 }
@@ -1337,7 +1337,7 @@ void rgblight_effect_knight(animation_status_t *anim) {
1337 led[cur].r = 0; 1337 led[cur].r = 0;
1338 led[cur].g = 0; 1338 led[cur].g = 0;
1339 led[cur].b = 0; 1339 led[cur].b = 0;
1340# ifdef RGBW 1340# ifdef WS2812_RGBW
1341 led[cur].w = 0; 1341 led[cur].w = 0;
1342# endif 1342# endif
1343 } 1343 }