diff options
Diffstat (limited to 'quantum/rgblight.c')
| -rw-r--r-- | quantum/rgblight.c | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/quantum/rgblight.c b/quantum/rgblight.c index 2215cf5cd..5623c65de 100644 --- a/quantum/rgblight.c +++ b/quantum/rgblight.c | |||
| @@ -107,17 +107,17 @@ void setrgb(uint8_t r, uint8_t g, uint8_t b, struct cRGB *led1) { | |||
| 107 | uint32_t eeconfig_read_rgblight(void) { | 107 | uint32_t eeconfig_read_rgblight(void) { |
| 108 | return eeprom_read_dword(EECONFIG_RGBLIGHT); | 108 | return eeprom_read_dword(EECONFIG_RGBLIGHT); |
| 109 | } | 109 | } |
| 110 | void eeconfig_write_rgblight(uint32_t val) { | 110 | void eeconfig_update_rgblight(uint32_t val) { |
| 111 | eeprom_write_dword(EECONFIG_RGBLIGHT, val); | 111 | eeprom_update_dword(EECONFIG_RGBLIGHT, val); |
| 112 | } | 112 | } |
| 113 | void eeconfig_write_rgblight_default(void) { | 113 | void eeconfig_update_rgblight_default(void) { |
| 114 | dprintf("eeconfig_write_rgblight_default\n"); | 114 | dprintf("eeconfig_update_rgblight_default\n"); |
| 115 | rgblight_config.enable = 1; | 115 | rgblight_config.enable = 1; |
| 116 | rgblight_config.mode = 1; | 116 | rgblight_config.mode = 1; |
| 117 | rgblight_config.hue = 200; | 117 | rgblight_config.hue = 200; |
| 118 | rgblight_config.sat = 204; | 118 | rgblight_config.sat = 204; |
| 119 | rgblight_config.val = 204; | 119 | rgblight_config.val = 204; |
| 120 | eeconfig_write_rgblight(rgblight_config.raw); | 120 | eeconfig_update_rgblight(rgblight_config.raw); |
| 121 | } | 121 | } |
| 122 | void eeconfig_debug_rgblight(void) { | 122 | void eeconfig_debug_rgblight(void) { |
| 123 | dprintf("rgblight_config eprom\n"); | 123 | dprintf("rgblight_config eprom\n"); |
| @@ -136,12 +136,12 @@ void rgblight_init(void) { | |||
| 136 | if (!eeconfig_is_enabled()) { | 136 | if (!eeconfig_is_enabled()) { |
| 137 | dprintf("rgblight_init eeconfig is not enabled.\n"); | 137 | dprintf("rgblight_init eeconfig is not enabled.\n"); |
| 138 | eeconfig_init(); | 138 | eeconfig_init(); |
| 139 | eeconfig_write_rgblight_default(); | 139 | eeconfig_update_rgblight_default(); |
| 140 | } | 140 | } |
| 141 | rgblight_config.raw = eeconfig_read_rgblight(); | 141 | rgblight_config.raw = eeconfig_read_rgblight(); |
| 142 | if (!rgblight_config.mode) { | 142 | if (!rgblight_config.mode) { |
| 143 | dprintf("rgblight_init rgblight_config.mode = 0. Write default values to EEPROM.\n"); | 143 | dprintf("rgblight_init rgblight_config.mode = 0. Write default values to EEPROM.\n"); |
| 144 | eeconfig_write_rgblight_default(); | 144 | eeconfig_update_rgblight_default(); |
| 145 | rgblight_config.raw = eeconfig_read_rgblight(); | 145 | rgblight_config.raw = eeconfig_read_rgblight(); |
| 146 | } | 146 | } |
| 147 | eeconfig_debug_rgblight(); // display current eeprom values | 147 | eeconfig_debug_rgblight(); // display current eeprom values |
| @@ -189,7 +189,7 @@ void rgblight_mode(uint8_t mode) { | |||
| 189 | } else { | 189 | } else { |
| 190 | rgblight_config.mode = mode; | 190 | rgblight_config.mode = mode; |
| 191 | } | 191 | } |
| 192 | eeconfig_write_rgblight(rgblight_config.raw); | 192 | eeconfig_update_rgblight(rgblight_config.raw); |
| 193 | dprintf("rgblight mode: %u\n", rgblight_config.mode); | 193 | dprintf("rgblight mode: %u\n", rgblight_config.mode); |
| 194 | if (rgblight_config.mode == 1) { | 194 | if (rgblight_config.mode == 1) { |
| 195 | rgblight_timer_disable(); | 195 | rgblight_timer_disable(); |
| @@ -206,7 +206,7 @@ void rgblight_mode(uint8_t mode) { | |||
| 206 | 206 | ||
| 207 | void rgblight_toggle(void) { | 207 | void rgblight_toggle(void) { |
| 208 | rgblight_config.enable ^= 1; | 208 | rgblight_config.enable ^= 1; |
| 209 | eeconfig_write_rgblight(rgblight_config.raw); | 209 | eeconfig_update_rgblight(rgblight_config.raw); |
| 210 | dprintf("rgblight toggle: rgblight_config.enable = %u\n", rgblight_config.enable); | 210 | dprintf("rgblight toggle: rgblight_config.enable = %u\n", rgblight_config.enable); |
| 211 | if (rgblight_config.enable) { | 211 | if (rgblight_config.enable) { |
| 212 | rgblight_mode(rgblight_config.mode); | 212 | rgblight_mode(rgblight_config.mode); |
| @@ -299,7 +299,7 @@ void rgblight_sethsv(uint16_t hue, uint8_t sat, uint8_t val){ | |||
| 299 | rgblight_config.hue = hue; | 299 | rgblight_config.hue = hue; |
| 300 | rgblight_config.sat = sat; | 300 | rgblight_config.sat = sat; |
| 301 | rgblight_config.val = val; | 301 | rgblight_config.val = val; |
| 302 | eeconfig_write_rgblight(rgblight_config.raw); | 302 | eeconfig_update_rgblight(rgblight_config.raw); |
| 303 | dprintf("rgblight set hsv [EEPROM]: %u,%u,%u\n", rgblight_config.hue, rgblight_config.sat, rgblight_config.val); | 303 | dprintf("rgblight set hsv [EEPROM]: %u,%u,%u\n", rgblight_config.hue, rgblight_config.sat, rgblight_config.val); |
| 304 | } | 304 | } |
| 305 | } | 305 | } |
