Relocate base WS2812 code (#24850)

This commit is contained in:
Ryan 2025-01-25 17:38:12 +11:00 committed by GitHub
parent 2dd2d4eb81
commit a6e931400e
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
4 changed files with 6 additions and 1 deletions

View file

@ -1,15 +0,0 @@
// Copyright 2024 QMK
// SPDX-License-Identifier: GPL-2.0-or-later
#include "ws2812.h"
#if defined(WS2812_RGBW)
void ws2812_rgb_to_rgbw(ws2812_led_t *led) {
// Determine lowest value in all three colors, put that into
// the white channel and then shift all colors by that amount
led->w = MIN(led->r, MIN(led->g, led->b));
led->r -= led->w;
led->g -= led->w;
led->b -= led->w;
}
#endif