summaryrefslogtreecommitdiffstats
path: root/quantum
diff options
context:
space:
mode:
authorJack Humbert <jack.humb@gmail.com>2016-11-17 23:42:14 +0100
committerJack Humbert <jack.humb@gmail.com>2016-11-17 23:42:14 +0100
commit3774a7fcdab5544fc787f4c200be05fcd417e31f (patch)
treebb1c582d658ec7f19bce9d43f1c536b83066d40b /quantum
parent530dd3377e4d409a7ca2fee7e47b60b735ebc0fa (diff)
downloadqmk_firmware-3774a7fcdab5544fc787f4c200be05fcd417e31f.tar.gz
qmk_firmware-3774a7fcdab5544fc787f4c200be05fcd417e31f.tar.xz
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 @@
#include <util/delay.h>
#include "debug.h"
-#define RGBW_BB_TWI 1
-
#ifdef RGBW_BB_TWI
// 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) {
}
eeconfig_debug_rgblight(); // display current eeprom values
- #if !defined(AUDIO_ENABLE) && defined(RGBLIGHT_TIMER)
+ #ifdef RGBLIGHT_ANIMATIONS
rgblight_timer_init(); // setup the timer
#endif
@@ -221,7 +221,7 @@ void rgblight_mode(uint8_t mode) {
eeconfig_update_rgblight(rgblight_config.raw);
xprintf("rgblight mode: %u\n", rgblight_config.mode);
if (rgblight_config.mode == 1) {
- #if !defined(AUDIO_ENABLE) && defined(RGBLIGHT_TIMER)
+ #ifdef RGBLIGHT_ANIMATIONS
rgblight_timer_disable();
#endif
} else if (rgblight_config.mode >= 2 && rgblight_config.mode <= 23) {
@@ -231,7 +231,7 @@ void rgblight_mode(uint8_t mode) {
// MODE 15-20, snake
// MODE 21-23, knight
- #if !defined(AUDIO_ENABLE) && defined(RGBLIGHT_TIMER)
+ #ifdef RGBLIGHT_ANIMATIONS
rgblight_timer_enable();
#endif
}
@@ -245,7 +245,7 @@ void rgblight_toggle(void) {
if (rgblight_config.enable) {
rgblight_mode(rgblight_config.mode);
} else {
- #if !defined(AUDIO_ENABLE) && defined(RGBLIGHT_TIMER)
+ #ifdef RGBLIGHT_ANIMATIONS
rgblight_timer_disable();
#endif
_delay_ms(50);
@@ -371,7 +371,7 @@ void rgblight_set(void) {
}
}
-#if !defined(AUDIO_ENABLE) && defined(RGBLIGHT_TIMER)
+#ifdef RGBLIGHT_ANIMATIONS
// Animation timer -- AVR Timer3
void 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 @@
#ifndef RGBLIGHT_H
#define RGBLIGHT_H
-#if !defined(AUDIO_ENABLE) && defined(RGBLIGHT_TIMER)
+#ifdef RGBLIGHT_ANIMATIONS
#define RGBLIGHT_MODES 23
#else
#define RGBLIGHT_MODES 1