aboutsummaryrefslogtreecommitdiff
path: root/quantum/rgblight.c
diff options
context:
space:
mode:
Diffstat (limited to 'quantum/rgblight.c')
-rw-r--r--quantum/rgblight.c20
1 files changed, 14 insertions, 6 deletions
diff --git a/quantum/rgblight.c b/quantum/rgblight.c
index 4e2671d24..2490a1d9f 100644
--- a/quantum/rgblight.c
+++ b/quantum/rgblight.c
@@ -14,9 +14,11 @@
14 * along with this program. If not, see <http://www.gnu.org/licenses/>. 14 * along with this program. If not, see <http://www.gnu.org/licenses/>.
15 */ 15 */
16#include <math.h> 16#include <math.h>
17#include <avr/eeprom.h> 17#ifdef __AVR__
18#include <avr/interrupt.h> 18 #include <avr/eeprom.h>
19#include <util/delay.h> 19 #include <avr/interrupt.h>
20#endif
21#include "wait.h"
20#include "progmem.h" 22#include "progmem.h"
21#include "timer.h" 23#include "timer.h"
22#include "rgblight.h" 24#include "rgblight.h"
@@ -113,10 +115,16 @@ void setrgb(uint8_t r, uint8_t g, uint8_t b, LED_TYPE *led1) {
113 115
114 116
115uint32_t eeconfig_read_rgblight(void) { 117uint32_t eeconfig_read_rgblight(void) {
116 return eeprom_read_dword(EECONFIG_RGBLIGHT); 118 #ifdef __AVR__
119 return eeprom_read_dword(EECONFIG_RGBLIGHT);
120 #else
121 return 0;
122 #endif
117} 123}
118void eeconfig_update_rgblight(uint32_t val) { 124void eeconfig_update_rgblight(uint32_t val) {
119 eeprom_update_dword(EECONFIG_RGBLIGHT, val); 125 #ifdef __AVR__
126 eeprom_update_dword(EECONFIG_RGBLIGHT, val);
127 #endif
120} 128}
121void eeconfig_update_rgblight_default(void) { 129void eeconfig_update_rgblight_default(void) {
122 dprintf("eeconfig_update_rgblight_default\n"); 130 dprintf("eeconfig_update_rgblight_default\n");
@@ -311,7 +319,7 @@ void rgblight_disable(void) {
311 #ifdef RGBLIGHT_ANIMATIONS 319 #ifdef RGBLIGHT_ANIMATIONS
312 rgblight_timer_disable(); 320 rgblight_timer_disable();
313 #endif 321 #endif
314 _delay_ms(50); 322 wait_ms(50);
315 rgblight_set(); 323 rgblight_set();
316} 324}
317 325