From 97f8f378761506914b69d4fd2d5661bfcae28295 Mon Sep 17 00:00:00 2001 From: skullY Date: Sun, 10 Apr 2016 21:16:49 -0700 Subject: Fixup RGBLIGHT support for clueboard2 --- quantum/rgblight.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'quantum/rgblight.c') diff --git a/quantum/rgblight.c b/quantum/rgblight.c index 2215cf5cdf..6adc9e2784 100644 --- a/quantum/rgblight.c +++ b/quantum/rgblight.c @@ -190,7 +190,7 @@ void rgblight_mode(uint8_t mode) { rgblight_config.mode = mode; } eeconfig_write_rgblight(rgblight_config.raw); - dprintf("rgblight mode: %u\n", rgblight_config.mode); + xprintf("rgblight mode: %u\n", rgblight_config.mode); if (rgblight_config.mode == 1) { rgblight_timer_disable(); } else if (rgblight_config.mode >=2 && rgblight_config.mode <=23) { @@ -207,7 +207,7 @@ void rgblight_mode(uint8_t mode) { void rgblight_toggle(void) { rgblight_config.enable ^= 1; eeconfig_write_rgblight(rgblight_config.raw); - dprintf("rgblight toggle: rgblight_config.enable = %u\n", rgblight_config.enable); + xprintf("rgblight toggle: rgblight_config.enable = %u\n", rgblight_config.enable); if (rgblight_config.enable) { rgblight_mode(rgblight_config.mode); } else { @@ -300,7 +300,7 @@ void rgblight_sethsv(uint16_t hue, uint8_t sat, uint8_t val){ rgblight_config.sat = sat; rgblight_config.val = val; eeconfig_write_rgblight(rgblight_config.raw); - dprintf("rgblight set hsv [EEPROM]: %u,%u,%u\n", rgblight_config.hue, rgblight_config.sat, rgblight_config.val); + xprintf("rgblight set hsv [EEPROM]: %u,%u,%u\n", rgblight_config.hue, rgblight_config.sat, rgblight_config.val); } } -- cgit v1.2.3 From 620ac4b260fa663d12b11a0b15ac50379523c125 Mon Sep 17 00:00:00 2001 From: Eric Tang Date: Thu, 21 Apr 2016 19:35:18 -0700 Subject: Update functions used to write to EEPROM --- quantum/rgblight.c | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) (limited to 'quantum/rgblight.c') diff --git a/quantum/rgblight.c b/quantum/rgblight.c index 2215cf5cdf..5623c65de7 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) { uint32_t eeconfig_read_rgblight(void) { return eeprom_read_dword(EECONFIG_RGBLIGHT); } -void eeconfig_write_rgblight(uint32_t val) { - eeprom_write_dword(EECONFIG_RGBLIGHT, val); +void eeconfig_update_rgblight(uint32_t val) { + eeprom_update_dword(EECONFIG_RGBLIGHT, val); } -void eeconfig_write_rgblight_default(void) { - dprintf("eeconfig_write_rgblight_default\n"); +void eeconfig_update_rgblight_default(void) { + dprintf("eeconfig_update_rgblight_default\n"); rgblight_config.enable = 1; rgblight_config.mode = 1; rgblight_config.hue = 200; rgblight_config.sat = 204; rgblight_config.val = 204; - eeconfig_write_rgblight(rgblight_config.raw); + eeconfig_update_rgblight(rgblight_config.raw); } void eeconfig_debug_rgblight(void) { dprintf("rgblight_config eprom\n"); @@ -136,12 +136,12 @@ void rgblight_init(void) { if (!eeconfig_is_enabled()) { dprintf("rgblight_init eeconfig is not enabled.\n"); eeconfig_init(); - eeconfig_write_rgblight_default(); + eeconfig_update_rgblight_default(); } rgblight_config.raw = eeconfig_read_rgblight(); if (!rgblight_config.mode) { dprintf("rgblight_init rgblight_config.mode = 0. Write default values to EEPROM.\n"); - eeconfig_write_rgblight_default(); + eeconfig_update_rgblight_default(); rgblight_config.raw = eeconfig_read_rgblight(); } eeconfig_debug_rgblight(); // display current eeprom values @@ -189,7 +189,7 @@ void rgblight_mode(uint8_t mode) { } else { rgblight_config.mode = mode; } - eeconfig_write_rgblight(rgblight_config.raw); + eeconfig_update_rgblight(rgblight_config.raw); dprintf("rgblight mode: %u\n", rgblight_config.mode); if (rgblight_config.mode == 1) { rgblight_timer_disable(); @@ -206,7 +206,7 @@ void rgblight_mode(uint8_t mode) { void rgblight_toggle(void) { rgblight_config.enable ^= 1; - eeconfig_write_rgblight(rgblight_config.raw); + eeconfig_update_rgblight(rgblight_config.raw); dprintf("rgblight toggle: rgblight_config.enable = %u\n", rgblight_config.enable); if (rgblight_config.enable) { rgblight_mode(rgblight_config.mode); @@ -299,7 +299,7 @@ void rgblight_sethsv(uint16_t hue, uint8_t sat, uint8_t val){ rgblight_config.hue = hue; rgblight_config.sat = sat; rgblight_config.val = val; - eeconfig_write_rgblight(rgblight_config.raw); + eeconfig_update_rgblight(rgblight_config.raw); dprintf("rgblight set hsv [EEPROM]: %u,%u,%u\n", rgblight_config.hue, rgblight_config.sat, rgblight_config.val); } } -- cgit v1.2.3 From e024c11f7a849a38e478cda9fb9939a838cfa2e0 Mon Sep 17 00:00:00 2001 From: Jack Humbert Date: Tue, 26 Apr 2016 13:50:04 -0400 Subject: actually resolves conflicts in rgblight.c --- quantum/rgblight.c | 5 ----- 1 file changed, 5 deletions(-) (limited to 'quantum/rgblight.c') diff --git a/quantum/rgblight.c b/quantum/rgblight.c index 789af73d80..8c9ad77364 100644 --- a/quantum/rgblight.c +++ b/quantum/rgblight.c @@ -189,13 +189,8 @@ void rgblight_mode(uint8_t mode) { } else { rgblight_config.mode = mode; } -<<<<<<< HEAD eeconfig_update_rgblight(rgblight_config.raw); - dprintf("rgblight mode: %u\n", rgblight_config.mode); -======= - eeconfig_write_rgblight(rgblight_config.raw); xprintf("rgblight mode: %u\n", rgblight_config.mode); ->>>>>>> pr/286 if (rgblight_config.mode == 1) { rgblight_timer_disable(); } else if (rgblight_config.mode >=2 && rgblight_config.mode <=23) { -- cgit v1.2.3