aboutsummaryrefslogtreecommitdiff
path: root/quantum
diff options
context:
space:
mode:
authorJack Humbert <jack.humb@gmail.com>2016-11-17 17:42:14 -0500
committerJack Humbert <jack.humb@gmail.com>2016-11-17 17:42:14 -0500
commit3774a7fcdab5544fc787f4c200be05fcd417e31f (patch)
treebb1c582d658ec7f19bce9d43f1c536b83066d40b /quantum
parent530dd3377e4d409a7ca2fee7e47b60b735ebc0fa (diff)
downloadqmk_firmware-3774a7fcdab5544fc787f4c200be05fcd417e31f.tar.gz
qmk_firmware-3774a7fcdab5544fc787f4c200be05fcd417e31f.zip
rgb light through midi
Diffstat (limited to 'quantum')
-rwxr-xr-xquantum/light_ws2812.c2
-rw-r--r--quantum/rgblight.c10
-rw-r--r--quantum/rgblight.h2
3 files changed, 6 insertions, 8 deletions
diff --git a/quantum/light_ws2812.c b/quantum/light_ws2812.c
index aac058f53..a883b1388 100755
--- a/quantum/light_ws2812.c
+++ b/quantum/light_ws2812.c
@@ -16,8 +16,6 @@
16#include <util/delay.h> 16#include <util/delay.h>
17#include "debug.h" 17#include "debug.h"
18 18
19#define RGBW_BB_TWI 1
20
21#ifdef RGBW_BB_TWI 19#ifdef RGBW_BB_TWI
22 20
23// Port for the I2C 21// Port for the I2C
diff --git a/quantum/rgblight.c b/quantum/rgblight.c
index 1901010bf..6b58f6654 100644
--- a/quantum/rgblight.c
+++ b/quantum/rgblight.c
@@ -174,7 +174,7 @@ void rgblight_init(void) {
174 } 174 }
175 eeconfig_debug_rgblight(); // display current eeprom values 175 eeconfig_debug_rgblight(); // display current eeprom values
176 176
177 #if !defined(AUDIO_ENABLE) && defined(RGBLIGHT_TIMER) 177 #ifdef RGBLIGHT_ANIMATIONS
178 rgblight_timer_init(); // setup the timer 178 rgblight_timer_init(); // setup the timer
179 #endif 179 #endif
180 180
@@ -221,7 +221,7 @@ void rgblight_mode(uint8_t mode) {
221 eeconfig_update_rgblight(rgblight_config.raw); 221 eeconfig_update_rgblight(rgblight_config.raw);
222 xprintf("rgblight mode: %u\n", rgblight_config.mode); 222 xprintf("rgblight mode: %u\n", rgblight_config.mode);
223 if (rgblight_config.mode == 1) { 223 if (rgblight_config.mode == 1) {
224 #if !defined(AUDIO_ENABLE) && defined(RGBLIGHT_TIMER) 224 #ifdef RGBLIGHT_ANIMATIONS
225 rgblight_timer_disable(); 225 rgblight_timer_disable();
226 #endif 226 #endif
227 } else if (rgblight_config.mode >= 2 && rgblight_config.mode <= 23) { 227 } else if (rgblight_config.mode >= 2 && rgblight_config.mode <= 23) {
@@ -231,7 +231,7 @@ void rgblight_mode(uint8_t mode) {
231 // MODE 15-20, snake 231 // MODE 15-20, snake
232 // MODE 21-23, knight 232 // MODE 21-23, knight
233 233
234 #if !defined(AUDIO_ENABLE) && defined(RGBLIGHT_TIMER) 234 #ifdef RGBLIGHT_ANIMATIONS
235 rgblight_timer_enable(); 235 rgblight_timer_enable();
236 #endif 236 #endif
237 } 237 }
@@ -245,7 +245,7 @@ void rgblight_toggle(void) {
245 if (rgblight_config.enable) { 245 if (rgblight_config.enable) {
246 rgblight_mode(rgblight_config.mode); 246 rgblight_mode(rgblight_config.mode);
247 } else { 247 } else {
248 #if !defined(AUDIO_ENABLE) && defined(RGBLIGHT_TIMER) 248 #ifdef RGBLIGHT_ANIMATIONS
249 rgblight_timer_disable(); 249 rgblight_timer_disable();
250 #endif 250 #endif
251 _delay_ms(50); 251 _delay_ms(50);
@@ -371,7 +371,7 @@ void rgblight_set(void) {
371 } 371 }
372} 372}
373 373
374#if !defined(AUDIO_ENABLE) && defined(RGBLIGHT_TIMER) 374#ifdef RGBLIGHT_ANIMATIONS
375 375
376// Animation timer -- AVR Timer3 376// Animation timer -- AVR Timer3
377void rgblight_timer_init(void) { 377void rgblight_timer_init(void) {
diff --git a/quantum/rgblight.h b/quantum/rgblight.h
index d16ba24e5..330c2fe1b 100644
--- a/quantum/rgblight.h
+++ b/quantum/rgblight.h
@@ -1,7 +1,7 @@
1#ifndef RGBLIGHT_H 1#ifndef RGBLIGHT_H
2#define RGBLIGHT_H 2#define RGBLIGHT_H
3 3
4#if !defined(AUDIO_ENABLE) && defined(RGBLIGHT_TIMER) 4#ifdef RGBLIGHT_ANIMATIONS
5 #define RGBLIGHT_MODES 23 5 #define RGBLIGHT_MODES 23
6#else 6#else
7 #define RGBLIGHT_MODES 1 7 #define RGBLIGHT_MODES 1