From 40939c5b8a643ce40967fa0b7bdda3d47e2e759f Mon Sep 17 00:00:00 2001 From: mtei <2170248+mtei@users.noreply.github.com> Date: Sun, 12 May 2019 16:20:31 +0900 Subject: [PATCH] When RGBLIGHT_SPLIT is defined, the following function has no meaning and is invalidated. * rgblight_setrgb_master(r, g, b) * rgblight_setrgb_slave(r, g, b) * rgblight_sethsv_master(h, s, v) * rgblight_sethsv_slave(h, s, v) --- quantum/rgblight.c | 2 ++ quantum/rgblight.h | 3 +++ 2 files changed, 5 insertions(+) diff --git a/quantum/rgblight.c b/quantum/rgblight.c index 85fdfb55d8..83a4c61387 100644 --- a/quantum/rgblight.c +++ b/quantum/rgblight.c @@ -631,6 +631,7 @@ void rgblight_sethsv_range(uint8_t hue, uint8_t sat, uint8_t val, uint8_t start, rgblight_setrgb_range(tmp_led.r, tmp_led.g, tmp_led.b, start, end); } +#ifndef RGBLIGHT_SPLIT void rgblight_setrgb_master(uint8_t r, uint8_t g, uint8_t b) { rgblight_setrgb_range(r, g, b, 0 , (uint8_t) RGBLED_NUM/2); } @@ -646,6 +647,7 @@ void rgblight_sethsv_master(uint8_t hue, uint8_t sat, uint8_t val) { void rgblight_sethsv_slave(uint8_t hue, uint8_t sat, uint8_t val) { rgblight_sethsv_range(hue, sat, val, (uint8_t) RGBLED_NUM/2, (uint8_t) RGBLED_NUM); } +#endif // ifndef RGBLIGHT_SPLIT #ifndef RGBLIGHT_CUSTOM_DRIVER void rgblight_set(void) { diff --git a/quantum/rgblight.h b/quantum/rgblight.h index 425e72a3e1..a1d1a47adc 100644 --- a/quantum/rgblight.h +++ b/quantum/rgblight.h @@ -189,10 +189,13 @@ void rgblight_sethsv_at(uint8_t hue, uint8_t sat, uint8_t val, uint8_t index); void rgblight_setrgb_range(uint8_t r, uint8_t g, uint8_t b, uint8_t start, uint8_t end); void rgblight_sethsv_range(uint8_t hue, uint8_t sat, uint8_t val, uint8_t start, uint8_t end); void rgblight_setrgb(uint8_t r, uint8_t g, uint8_t b); + +#ifndef RGBLIGHT_SPLIT void rgblight_setrgb_master(uint8_t r, uint8_t g, uint8_t b); void rgblight_setrgb_slave(uint8_t r, uint8_t g, uint8_t b); void rgblight_sethsv_master(uint8_t hue, uint8_t sat, uint8_t val); void rgblight_sethsv_slave(uint8_t hue, uint8_t sat, uint8_t val); +#endif /* effect mode change */ void rgblight_mode(uint8_t mode);