forked from mirrors/qmk_firmware
Added mode reverse step function
This commit is contained in:
parent
0e548f8b5d
commit
5a1b68d562
2 changed files with 9 additions and 0 deletions
|
@ -219,6 +219,14 @@ void rgblight_step(void) {
|
||||||
}
|
}
|
||||||
rgblight_mode(mode);
|
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) {
|
void rgblight_mode(uint8_t mode) {
|
||||||
if (!rgblight_config.enable) {
|
if (!rgblight_config.enable) {
|
||||||
|
|
|
@ -73,6 +73,7 @@ void rgblight_decrease(void);
|
||||||
void rgblight_toggle(void);
|
void rgblight_toggle(void);
|
||||||
void rgblight_enable(void);
|
void rgblight_enable(void);
|
||||||
void rgblight_step(void);
|
void rgblight_step(void);
|
||||||
|
void rgblight_step_reverse(void);
|
||||||
void rgblight_mode(uint8_t mode);
|
void rgblight_mode(uint8_t mode);
|
||||||
void rgblight_set(void);
|
void rgblight_set(void);
|
||||||
void rgblight_update_dword(uint32_t dword);
|
void rgblight_update_dword(uint32_t dword);
|
||||||
|
|
Loading…
Reference in a new issue