fix keyboards/mxss/rgblight.h (#8388)

Since #7773 caused a build error for `mxss:default`, I made similar changes to 'keyboards/mxss/rgblight.h' as #7773 did to 'quantum/rgblight.h'.

**This commit does not change the build result.**

Testing script
```shell
 # build on versions earlier than PR #7773
 git checkout 0.8.24
 echo master > /tmp/master_md5.txt

 make mxss:default:clean
 make mxss:default
 md5 mxss_default.hex >> /tmp/master_md5.txt

 # build on this commit
 git checkout fix-keyboards-mxss-rgblight.h
 echo fix-keyboards-mxss-rgblight.h > /tmp/branch_md5.txt

 make mxss:default:clean
 make mxss:default
 md5 mxss_default.hex >> /tmp/branch_md5.txt

 diff -u /tmp/master_md5.txt /tmp/branch_md5.txt
```

Test result:
```
--- /tmp/master_md5.txt 2020-03-12 05:51:39.000000000 +0900
+++ /tmp/branch_md5.txt 2020-03-12 05:51:49.000000000 +0900
@@ -1,2 +1,2 @@
-master
+fix-keyboards-mxss-rgblight.h
MD5 (mxss_default.hex) = 3034b2504d0c7fc6bd8bf1dffb6b8486
```
master
Takeshi ISHII 2020-03-12 06:23:31 +09:00 committed by GitHub
parent e72562fe6f
commit f3afc716cb
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 41 additions and 3 deletions

View File

@ -16,8 +16,6 @@
#ifndef RGBLIGHT_H #ifndef RGBLIGHT_H
#define RGBLIGHT_H #define RGBLIGHT_H
#include "rgblight_reconfig.h"
/***** rgblight_mode(mode)/rgblight_mode_noeeprom(mode) **** /***** rgblight_mode(mode)/rgblight_mode_noeeprom(mode) ****
old mode number (before 0.6.117) to new mode name table old mode number (before 0.6.117) to new mode name table
@ -64,6 +62,39 @@
|-----------------|-----------------------------------| |-----------------|-----------------------------------|
*****/ *****/
#ifdef RGBLIGHT_ANIMATIONS
// for backward compatibility
# define RGBLIGHT_EFFECT_BREATHING
# define RGBLIGHT_EFFECT_RAINBOW_MOOD
# define RGBLIGHT_EFFECT_RAINBOW_SWIRL
# define RGBLIGHT_EFFECT_SNAKE
# define RGBLIGHT_EFFECT_KNIGHT
# define RGBLIGHT_EFFECT_CHRISTMAS
# define RGBLIGHT_EFFECT_STATIC_GRADIENT
# define RGBLIGHT_EFFECT_RGB_TEST
# define RGBLIGHT_EFFECT_ALTERNATING
#endif
#ifdef RGBLIGHT_STATIC_PATTERNS
# define RGBLIGHT_EFFECT_STATIC_GRADIENT
#endif
// clang-format off
// check dynamic animation effects chose ?
#if defined(RGBLIGHT_EFFECT_BREATHING) \
|| defined(RGBLIGHT_EFFECT_RAINBOW_MOOD) \
|| defined(RGBLIGHT_EFFECT_RAINBOW_SWIRL) \
|| defined(RGBLIGHT_EFFECT_SNAKE) \
|| defined(RGBLIGHT_EFFECT_KNIGHT) \
|| defined(RGBLIGHT_EFFECT_CHRISTMAS) \
|| defined(RGBLIGHT_EFFECT_RGB_TEST) \
|| defined(RGBLIGHT_EFFECT_ALTERNATING)
# define RGBLIGHT_USE_TIMER
#endif
// clang-format on
#define _RGBM_SINGLE_STATIC(sym) RGBLIGHT_MODE_##sym, #define _RGBM_SINGLE_STATIC(sym) RGBLIGHT_MODE_##sym,
#define _RGBM_SINGLE_DYNAMIC(sym) RGBLIGHT_MODE_##sym, #define _RGBM_SINGLE_DYNAMIC(sym) RGBLIGHT_MODE_##sym,
#define _RGBM_MULTI_STATIC(sym) RGBLIGHT_MODE_##sym, #define _RGBM_MULTI_STATIC(sym) RGBLIGHT_MODE_##sym,
@ -263,12 +294,19 @@ void rgblight_mode_eeprom_helper(uint8_t mode, bool write_to_eeprom);
# define EZ_RGB(val) rgblight_show_solid_color((val >> 16) & 0xFF, (val >> 8) & 0xFF, val & 0xFF) # define EZ_RGB(val) rgblight_show_solid_color((val >> 16) & 0xFF, (val >> 8) & 0xFF, val & 0xFF)
void rgblight_show_solid_color(uint8_t r, uint8_t g, uint8_t b); void rgblight_show_solid_color(uint8_t r, uint8_t g, uint8_t b);
# ifdef RGBLIGHT_USE_TIMER
void rgblight_task(void); void rgblight_task(void);
void rgblight_timer_init(void); void rgblight_timer_init(void);
void rgblight_timer_enable(void); void rgblight_timer_enable(void);
void rgblight_timer_disable(void); void rgblight_timer_disable(void);
void rgblight_timer_toggle(void); void rgblight_timer_toggle(void);
# else
# define rgblight_task()
# define rgblight_timer_init()
# define rgblight_timer_enable()
# define rgblight_timer_disable()
# define rgblight_timer_toggle()
# endif
# ifdef RGBLIGHT_SPLIT # ifdef RGBLIGHT_SPLIT
# define RGBLIGHT_STATUS_CHANGE_MODE (1 << 0) # define RGBLIGHT_STATUS_CHANGE_MODE (1 << 0)