aboutsummaryrefslogtreecommitdiff
path: root/quantum
diff options
context:
space:
mode:
authorRyan <[email protected]>2024-04-28 00:36:54 +1000
committerGitHub <[email protected]>2024-04-28 00:36:54 +1000
commit0ff53b24984e88f385638e47ea076b4d2945c0c6 (patch)
tree73c0e43df640c132507cb146447adfb7d0ed4b49 /quantum
parent8f8fffc1740be81fbfe4a07a74e9f03962c1062a (diff)
downloadqmk_firmware-0ff53b24984e88f385638e47ea076b4d2945c0c6.tar.gz
qmk_firmware-0ff53b24984e88f385638e47ea076b4d2945c0c6.zip
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) {
return hsv_to_rgb_impl(hsv, false);
}
-#ifdef RGBW
+#ifdef WS2812_RGBW
void convert_rgb_to_rgbw(rgb_led_t *led) {
// Determine lowest value in all three colors, put that into
// 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 {
uint8_t g;
uint8_t r;
#endif
-#ifdef RGBW
+#ifdef WS2812_RGBW
uint8_t w;
#endif
} rgb_led_t;
@@ -111,6 +111,6 @@ typedef struct PACKED HSV {
RGB hsv_to_rgb(HSV hsv);
RGB hsv_to_rgb_nocie(HSV hsv);
-#ifdef RGBW
+#ifdef WS2812_RGBW
void convert_rgb_to_rgbw(rgb_led_t *led);
#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) {
rgb_matrix_ws2812_array[i].r = r;
rgb_matrix_ws2812_array[i].g = g;
rgb_matrix_ws2812_array[i].b = b;
-# ifdef RGBW
+# ifdef WS2812_RGBW
convert_rgb_to_rgbw(&rgb_matrix_ws2812_array[i]);
# endif
}
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) {
led1->r = r;
led1->g = g;
led1->b = b;
-#ifdef RGBW
+#ifdef WS2812_RGBW
led1->w = 0;
#endif
}
@@ -652,7 +652,7 @@ void rgblight_setrgb(uint8_t r, uint8_t g, uint8_t b) {
led[i].r = r;
led[i].g = g;
led[i].b = b;
-#ifdef RGBW
+#ifdef WS2812_RGBW
led[i].w = 0;
#endif
}
@@ -667,7 +667,7 @@ void rgblight_setrgb_at(uint8_t r, uint8_t g, uint8_t b, uint8_t index) {
led[index].r = r;
led[index].g = g;
led[index].b = b;
-#ifdef RGBW
+#ifdef WS2812_RGBW
led[index].w = 0;
#endif
rgblight_set();
@@ -704,7 +704,7 @@ void rgblight_setrgb_range(uint8_t r, uint8_t g, uint8_t b, uint8_t start, uint8
led[i].r = r;
led[i].g = g;
led[i].b = b;
-#ifdef RGBW
+#ifdef WS2812_RGBW
led[i].w = 0;
#endif
}
@@ -905,7 +905,7 @@ void rgblight_set(void) {
led[i].r = 0;
led[i].g = 0;
led[i].b = 0;
-#ifdef RGBW
+#ifdef WS2812_RGBW
led[i].w = 0;
#endif
}
@@ -933,7 +933,7 @@ void rgblight_set(void) {
start_led = led + rgblight_ranges.clipping_start_pos;
#endif
-#ifdef RGBW
+#ifdef WS2812_RGBW
for (uint8_t i = 0; i < num_leds; i++) {
convert_rgb_to_rgbw(&start_led[i]);
}
@@ -1263,7 +1263,7 @@ void rgblight_effect_snake(animation_status_t *anim) {
ledp->r = 0;
ledp->g = 0;
ledp->b = 0;
-# ifdef RGBW
+# ifdef WS2812_RGBW
ledp->w = 0;
# endif
for (j = 0; j < RGBLIGHT_EFFECT_SNAKE_LENGTH; j++) {
@@ -1323,7 +1323,7 @@ void rgblight_effect_knight(animation_status_t *anim) {
led[i].r = 0;
led[i].g = 0;
led[i].b = 0;
-# ifdef RGBW
+# ifdef WS2812_RGBW
led[i].w = 0;
# endif
}
@@ -1337,7 +1337,7 @@ void rgblight_effect_knight(animation_status_t *anim) {
led[cur].r = 0;
led[cur].g = 0;
led[cur].b = 0;
-# ifdef RGBW
+# ifdef WS2812_RGBW
led[cur].w = 0;
# endif
}