Added mode reverse step function

This commit is contained in:
dungdung 2017-02-06 14:09:29 -08:00
parent 0e548f8b5d
commit 5a1b68d562
2 changed files with 9 additions and 0 deletions

View file

@ -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) {

View file

@ -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);