summaryrefslogtreecommitdiff
path: root/quantum/rgblight.c
diff options
context:
space:
mode:
authorJoshua Diamond <josh@windowoffire.com>2020-05-13 16:39:05 -0400
committerFlorian Didron <fdidron@users.noreply.github.com>2020-06-12 17:00:27 +0900
commitb50d24a323a353037fe8fc0368cc54242f988eef (patch)
tree8587aaf4846a4223dba1730c43b1ec89f70983d7 /quantum/rgblight.c
parent7b720d9ff142bc80590f22c3251dd7d53212596b (diff)
Allow expanding from 8 to 32 RGB Lighting Layers (#8941)
* Allow 16 lighting layers * Require #define RGBLIGHT_LAYERS_16 to enable 16 layers * Override RGBLIGHT_MAX_LAYERS to set maximum number of lighting layers * Enforce lower bound on RGBLIGHT_MAX_LAYERS Co-Authored-By: Takeshi ISHII <2170248+mtei@users.noreply.github.com> * Fix an error in the check for valid RGBLIGHT_MAX_LAYERS * Don't use bitfield / PACKED, as it causes bloat * Update documentation re: up to 32 lighting layers * Run cformat * Add note about increasing FW size in docs/config_options.md Co-authored-by: Drashna Jaelre <drashna@live.com> * Remove no-longer-valid comment * Add doc note that split sync will be slower Co-authored-by: Takeshi ISHII <2170248+mtei@users.noreply.github.com> Co-authored-by: Drashna Jaelre <drashna@live.com>
Diffstat (limited to 'quantum/rgblight.c')
-rw-r--r--quantum/rgblight.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/quantum/rgblight.c b/quantum/rgblight.c
index e00623341c..5e53f47445 100644
--- a/quantum/rgblight.c
+++ b/quantum/rgblight.c
@@ -613,7 +613,7 @@ void rgblight_sethsv_slave(uint8_t hue, uint8_t sat, uint8_t val) { rgblight_set
#ifdef RGBLIGHT_LAYERS
void rgblight_set_layer_state(uint8_t layer, bool enabled) {
- uint8_t mask = 1 << layer;
+ rgblight_layer_mask_t mask = 1 << layer;
if (enabled) {
rgblight_status.enabled_layer_mask |= mask;
} else {
@@ -627,7 +627,7 @@ void rgblight_set_layer_state(uint8_t layer, bool enabled) {
}
bool rgblight_get_layer_state(uint8_t layer) {
- uint8_t mask = 1 << layer;
+ rgblight_layer_mask_t mask = 1 << layer;
return (rgblight_status.enabled_layer_mask & mask) != 0;
}