diff options
author | Joel Challis <git@zvecr.com> | 2023-03-23 00:37:13 +0000 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-03-23 00:37:13 +0000 |
commit | 6540b31d71a13a1b612cc31bad4c081f1a178630 (patch) | |
tree | a4c1dfc9aa07e8a65d0545c1320c65206eb0d8fc /quantum/rgblight | |
parent | 9c3c159286d20b05c3526ddb96661b10f706f222 (diff) |
Add some helpers to tidy up XAP (#20235)
Diffstat (limited to 'quantum/rgblight')
-rw-r--r-- | quantum/rgblight/rgblight.c | 4 | ||||
-rw-r--r-- | quantum/rgblight/rgblight.h | 1 |
2 files changed, 5 insertions, 0 deletions
diff --git a/quantum/rgblight/rgblight.c b/quantum/rgblight/rgblight.c index 19d80e0097..4c476f924f 100644 --- a/quantum/rgblight/rgblight.c +++ b/quantum/rgblight/rgblight.c @@ -422,6 +422,10 @@ void rgblight_disable_noeeprom(void) { rgblight_set(); } +void rgblight_enabled_noeeprom(bool state) { + state ? rgblight_enable_noeeprom() : rgblight_disable_noeeprom(); +} + bool rgblight_is_enabled(void) { return rgblight_config.enable; } diff --git a/quantum/rgblight/rgblight.h b/quantum/rgblight/rgblight.h index 7693888462..c71da29332 100644 --- a/quantum/rgblight/rgblight.h +++ b/quantum/rgblight/rgblight.h @@ -321,6 +321,7 @@ void rgblight_enable(void); void rgblight_enable_noeeprom(void); void rgblight_disable(void); void rgblight_disable_noeeprom(void); +void rgblight_enabled_noeeprom(bool state); /* hue, sat, val change */ void rgblight_increase_hue(void); |