aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLeon Rinkel <[email protected]>2023-11-04 14:59:50 +0100
committerLeon Rinkel <[email protected]>2023-11-04 14:59:50 +0100
commitabe76c0c1cb799db5122adc82462b0005ad1df93 (patch)
treede58a1db31fa4d3fb1e34c990e2e086c61faeab2
parentfb2e4369d0854384287e7c0406f1df8fbb1db606 (diff)
Switch RGBW conversion algo
-rw-r--r--drivers/ws2812/ws2812_gpio.c2
-rw-r--r--drivers/ws2812/ws2812_i2s.c2
-rw-r--r--drivers/ws2812/ws2812_spi.c2
3 files changed, 3 insertions, 3 deletions
diff --git a/drivers/ws2812/ws2812_gpio.c b/drivers/ws2812/ws2812_gpio.c
index fa875b9..7f9b718 100644
--- a/drivers/ws2812/ws2812_gpio.c
+++ b/drivers/ws2812/ws2812_gpio.c
@@ -162,7 +162,7 @@ static int ws2812_gpio_update_rgb(const struct device *dev,
rgbw_conversion(
/* outs: */ &ro, &go, &bo, &wo,
/* ins: */ pixels[i].r, pixels[i].g, pixels[i].b,
- /* algo: */ 1
+ /* algo: */ 4
);
for (j = 0; j < config->num_colors; j++) {
diff --git a/drivers/ws2812/ws2812_i2s.c b/drivers/ws2812/ws2812_i2s.c
index 64f6df7..8e59c90 100644
--- a/drivers/ws2812/ws2812_i2s.c
+++ b/drivers/ws2812/ws2812_i2s.c
@@ -113,7 +113,7 @@ static int ws2812_strip_update_rgb(const struct device *dev, struct led_rgb *pix
rgbw_conversion(
/* outs: */ &ro, &go, &bo, &wo,
/* ins: */ pixels[i].r, pixels[i].g, pixels[i].b,
- /* algo: */ 1
+ /* algo: */ 4
);
for (uint16_t j = 0; j < cfg->num_colors; j++) {
diff --git a/drivers/ws2812/ws2812_spi.c b/drivers/ws2812/ws2812_spi.c
index 71f3c95..f05a64a 100644
--- a/drivers/ws2812/ws2812_spi.c
+++ b/drivers/ws2812/ws2812_spi.c
@@ -127,7 +127,7 @@ static int ws2812_strip_update_rgb(const struct device *dev,
rgbw_conversion(
/* outs: */ &ro, &go, &bo, &wo,
/* ins: */ pixels[i].r, pixels[i].g, pixels[i].b,
- /* algo: */ 1
+ /* algo: */ 4
);
for (j = 0; j < cfg->num_colors; j++) {