aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--quantum/rgblight.c8
-rw-r--r--quantum/rgblight.h1
2 files changed, 9 insertions, 0 deletions
diff --git a/quantum/rgblight.c b/quantum/rgblight.c
index f91f3caff..7e057b63e 100644
--- a/quantum/rgblight.c
+++ b/quantum/rgblight.c
@@ -219,6 +219,14 @@ void rgblight_step(void) {
}
rgblight_mode(mode);
}
+void rgblight_step_reverse(void) {
+ uint8_t mode = 0;
+ mode = rgblight_config.mode - 1;
+ if (mode < 1) {
+ mode = RGBLIGHT_MODES;
+ }
+ rgblight_mode(mode);
+}
void rgblight_mode(uint8_t mode) {
if (!rgblight_config.enable) {
diff --git a/quantum/rgblight.h b/quantum/rgblight.h
index 12e858305..a63b24604 100644
--- a/quantum/rgblight.h
+++ b/quantum/rgblight.h
@@ -73,6 +73,7 @@ void rgblight_decrease(void);
void rgblight_toggle(void);
void rgblight_enable(void);
void rgblight_step(void);
+void rgblight_step_reverse(void);
void rgblight_mode(uint8_t mode);
void rgblight_set(void);
void rgblight_update_dword(uint32_t dword);