diff options
Diffstat (limited to 'quantum/rgblight.h')
| -rw-r--r-- | quantum/rgblight.h | 27 |
1 files changed, 14 insertions, 13 deletions
diff --git a/quantum/rgblight.h b/quantum/rgblight.h index 748d009dc..9ccb3135c 100644 --- a/quantum/rgblight.h +++ b/quantum/rgblight.h | |||
| @@ -113,7 +113,7 @@ enum RGBLIGHT_EFFECT_MODE { | |||
| 113 | #endif | 113 | #endif |
| 114 | 114 | ||
| 115 | #ifndef RGBLIGHT_HUE_STEP | 115 | #ifndef RGBLIGHT_HUE_STEP |
| 116 | #define RGBLIGHT_HUE_STEP 10 | 116 | #define RGBLIGHT_HUE_STEP 8 |
| 117 | #endif | 117 | #endif |
| 118 | #ifndef RGBLIGHT_SAT_STEP | 118 | #ifndef RGBLIGHT_SAT_STEP |
| 119 | #define RGBLIGHT_SAT_STEP 17 | 119 | #define RGBLIGHT_SAT_STEP 17 |
| @@ -151,12 +151,13 @@ extern const uint8_t RGBLED_KNIGHT_INTERVALS[3] PROGMEM; | |||
| 151 | extern const uint16_t RGBLED_RGBTEST_INTERVALS[1] PROGMEM; | 151 | extern const uint16_t RGBLED_RGBTEST_INTERVALS[1] PROGMEM; |
| 152 | extern bool is_rgblight_initialized; | 152 | extern bool is_rgblight_initialized; |
| 153 | 153 | ||
| 154 | // Should stay in sycn with rgb matrix config as we reuse eeprom storage for both (for now) | ||
| 154 | typedef union { | 155 | typedef union { |
| 155 | uint32_t raw; | 156 | uint32_t raw; |
| 156 | struct { | 157 | struct { |
| 157 | bool enable :1; | 158 | bool enable :1; |
| 158 | uint8_t mode :6; | 159 | uint8_t mode :7; |
| 159 | uint16_t hue :9; | 160 | uint8_t hue :8; |
| 160 | uint8_t sat :8; | 161 | uint8_t sat :8; |
| 161 | uint8_t val :8; | 162 | uint8_t val :8; |
| 162 | uint8_t speed :8;//EECONFIG needs to be increased to support this | 163 | uint8_t speed :8;//EECONFIG needs to be increased to support this |
| @@ -211,19 +212,19 @@ void rgblight_increase_val(void); | |||
| 211 | void rgblight_decrease_val(void); | 212 | void rgblight_decrease_val(void); |
| 212 | void rgblight_increase_speed(void); | 213 | void rgblight_increase_speed(void); |
| 213 | void rgblight_decrease_speed(void); | 214 | void rgblight_decrease_speed(void); |
| 214 | void rgblight_sethsv(uint16_t hue, uint8_t sat, uint8_t val); | 215 | void rgblight_sethsv(uint8_t hue, uint8_t sat, uint8_t val); |
| 215 | uint16_t rgblight_get_hue(void); | 216 | uint8_t rgblight_get_hue(void); |
| 216 | uint8_t rgblight_get_sat(void); | 217 | uint8_t rgblight_get_sat(void); |
| 217 | uint8_t rgblight_get_val(void); | 218 | uint8_t rgblight_get_val(void); |
| 218 | void rgblight_setrgb(uint8_t r, uint8_t g, uint8_t b); | 219 | void rgblight_setrgb(uint8_t r, uint8_t g, uint8_t b); |
| 219 | void rgblight_setrgb_at(uint8_t r, uint8_t g, uint8_t b, uint8_t index); | 220 | void rgblight_setrgb_at(uint8_t r, uint8_t g, uint8_t b, uint8_t index); |
| 220 | void rgblight_sethsv_at(uint16_t hue, uint8_t sat, uint8_t val, uint8_t index); | 221 | void rgblight_sethsv_at(uint8_t hue, uint8_t sat, uint8_t val, uint8_t index); |
| 221 | void rgblight_setrgb_range(uint8_t r, uint8_t g, uint8_t b, uint8_t start, uint8_t end); | 222 | void rgblight_setrgb_range(uint8_t r, uint8_t g, uint8_t b, uint8_t start, uint8_t end); |
| 222 | void rgblight_sethsv_range(uint16_t hue, uint8_t sat, uint8_t val, uint8_t start, uint8_t end); | 223 | void rgblight_sethsv_range(uint8_t hue, uint8_t sat, uint8_t val, uint8_t start, uint8_t end); |
| 223 | void rgblight_setrgb_master(uint8_t r, uint8_t g, uint8_t b); | 224 | void rgblight_setrgb_master(uint8_t r, uint8_t g, uint8_t b); |
| 224 | void rgblight_setrgb_slave(uint8_t r, uint8_t g, uint8_t b); | 225 | void rgblight_setrgb_slave(uint8_t r, uint8_t g, uint8_t b); |
| 225 | void rgblight_sethsv_master(uint16_t hue, uint8_t sat, uint8_t val); | 226 | void rgblight_sethsv_master(uint8_t hue, uint8_t sat, uint8_t val); |
| 226 | void rgblight_sethsv_slave(uint16_t hue, uint8_t sat, uint8_t val); | 227 | void rgblight_sethsv_slave(uint8_t hue, uint8_t sat, uint8_t val); |
| 227 | void rgblight_set_clipping_range(uint8_t start_pos, uint8_t num_leds); | 228 | void rgblight_set_clipping_range(uint8_t start_pos, uint8_t num_leds); |
| 228 | 229 | ||
| 229 | uint32_t eeconfig_read_rgblight(void); | 230 | uint32_t eeconfig_read_rgblight(void); |
| @@ -234,10 +235,10 @@ void eeconfig_debug_rgblight(void); | |||
| 234 | void rgb_matrix_increase(void); | 235 | void rgb_matrix_increase(void); |
| 235 | void rgb_matrix_decrease(void); | 236 | void rgb_matrix_decrease(void); |
| 236 | 237 | ||
| 237 | void sethsv(uint16_t hue, uint8_t sat, uint8_t val, LED_TYPE *led1); | 238 | void sethsv(uint8_t hue, uint8_t sat, uint8_t val, LED_TYPE *led1); |
| 238 | void setrgb(uint8_t r, uint8_t g, uint8_t b, LED_TYPE *led1); | 239 | void setrgb(uint8_t r, uint8_t g, uint8_t b, LED_TYPE *led1); |
| 239 | 240 | ||
| 240 | void rgblight_sethsv_noeeprom(uint16_t hue, uint8_t sat, uint8_t val); | 241 | void rgblight_sethsv_noeeprom(uint8_t hue, uint8_t sat, uint8_t val); |
| 241 | void rgblight_mode_noeeprom(uint8_t mode); | 242 | void rgblight_mode_noeeprom(uint8_t mode); |
| 242 | void rgblight_toggle_noeeprom(void); | 243 | void rgblight_toggle_noeeprom(void); |
| 243 | void rgblight_enable_noeeprom(void); | 244 | void rgblight_enable_noeeprom(void); |
| @@ -251,7 +252,7 @@ void rgblight_decrease_sat_noeeprom(void); | |||
| 251 | void rgblight_increase_val_noeeprom(void); | 252 | void rgblight_increase_val_noeeprom(void); |
| 252 | void rgblight_decrease_val_noeeprom(void); | 253 | void rgblight_decrease_val_noeeprom(void); |
| 253 | 254 | ||
| 254 | void rgblight_sethsv_eeprom_helper(uint16_t hue, uint8_t sat, uint8_t val, bool write_to_eeprom); | 255 | void rgblight_sethsv_eeprom_helper(uint8_t hue, uint8_t sat, uint8_t val, bool write_to_eeprom); |
| 255 | void rgblight_mode_eeprom_helper(uint8_t mode, bool write_to_eeprom); | 256 | void rgblight_mode_eeprom_helper(uint8_t mode, bool write_to_eeprom); |
| 256 | 257 | ||
| 257 | 258 | ||
| @@ -274,7 +275,7 @@ typedef struct _animation_status_t { | |||
| 274 | union { | 275 | union { |
| 275 | uint16_t pos16; | 276 | uint16_t pos16; |
| 276 | uint8_t pos; | 277 | uint8_t pos; |
| 277 | int16_t current_hue; | 278 | int8_t current_hue; |
| 278 | uint16_t current_offset; | 279 | uint16_t current_offset; |
| 279 | }; | 280 | }; |
| 280 | } animation_status_t; | 281 | } animation_status_t; |
