aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJoel Challis <git@zvecr.com>2020-01-19 00:59:09 +0000
committerGitHub <noreply@github.com>2020-01-19 00:59:09 +0000
commitba628a28bcf09421739922d8eeef05e6ca9e9b6b (patch)
tree75ef0b111a6f7f33026cab285a318dca56c0c992
parenta1452db98abc2a95bac30a5f36d514748cc9851d (diff)
downloadqmk_firmware-ba628a28bcf09421739922d8eeef05e6ca9e9b6b.tar.gz
qmk_firmware-ba628a28bcf09421739922d8eeef05e6ca9e9b6b.zip
Move rgblight and backlight task to common location (#7733)
-rw-r--r--quantum/quantum.c6
-rw-r--r--tmk_core/common/keyboard.c10
-rw-r--r--tmk_core/protocol/chibios/main.c3
-rw-r--r--tmk_core/protocol/lufa/lufa.c4
-rw-r--r--tmk_core/protocol/vusb/main.c4
5 files changed, 11 insertions, 16 deletions
diff --git a/quantum/quantum.c b/quantum/quantum.c
index bf159644a..9cd50b11d 100644
--- a/quantum/quantum.c
+++ b/quantum/quantum.c
@@ -634,12 +634,8 @@ void matrix_scan_quantum() {
634 matrix_scan_combo(); 634 matrix_scan_combo();
635#endif 635#endif
636 636
637#if defined(BACKLIGHT_ENABLE) 637#ifdef LED_MATRIX_ENABLE
638# if defined(LED_MATRIX_ENABLE)
639 led_matrix_task(); 638 led_matrix_task();
640# elif defined(BACKLIGHT_PIN) || defined(BACKLIGHT_PINS)
641 backlight_task();
642# endif
643#endif 639#endif
644 640
645#ifdef RGB_MATRIX_ENABLE 641#ifdef RGB_MATRIX_ENABLE
diff --git a/tmk_core/common/keyboard.c b/tmk_core/common/keyboard.c
index 794a9152f..cb4e7637f 100644
--- a/tmk_core/common/keyboard.c
+++ b/tmk_core/common/keyboard.c
@@ -335,6 +335,16 @@ MATRIX_LOOP_END:
335 matrix_scan_perf_task(); 335 matrix_scan_perf_task();
336#endif 336#endif
337 337
338#if defined(RGBLIGHT_ANIMATIONS) && defined(RGBLIGHT_ENABLE)
339 rgblight_task();
340#endif
341
342#if defined(BACKLIGHT_ENABLE)
343# if defined(BACKLIGHT_PIN) || defined(BACKLIGHT_PINS)
344 backlight_task();
345# endif
346#endif
347
338#ifdef QWIIC_ENABLE 348#ifdef QWIIC_ENABLE
339 qwiic_task(); 349 qwiic_task();
340#endif 350#endif
diff --git a/tmk_core/protocol/chibios/main.c b/tmk_core/protocol/chibios/main.c
index c304f4d79..4b66bc522 100644
--- a/tmk_core/protocol/chibios/main.c
+++ b/tmk_core/protocol/chibios/main.c
@@ -220,8 +220,5 @@ int main(void) {
220#ifdef RAW_ENABLE 220#ifdef RAW_ENABLE
221 raw_hid_task(); 221 raw_hid_task();
222#endif 222#endif
223#if defined(RGBLIGHT_ANIMATIONS) && defined(RGBLIGHT_ENABLE)
224 rgblight_task();
225#endif
226 } 223 }
227} 224}
diff --git a/tmk_core/protocol/lufa/lufa.c b/tmk_core/protocol/lufa/lufa.c
index 8319b34e9..7d325a9ba 100644
--- a/tmk_core/protocol/lufa/lufa.c
+++ b/tmk_core/protocol/lufa/lufa.c
@@ -998,10 +998,6 @@ int main(void) {
998 MIDI_Device_USBTask(&USB_MIDI_Interface); 998 MIDI_Device_USBTask(&USB_MIDI_Interface);
999#endif 999#endif
1000 1000
1001#if defined(RGBLIGHT_ANIMATIONS) && defined(RGBLIGHT_ENABLE)
1002 rgblight_task();
1003#endif
1004
1005#ifdef MODULE_ADAFRUIT_BLE 1001#ifdef MODULE_ADAFRUIT_BLE
1006 adafruit_ble_task(); 1002 adafruit_ble_task();
1007#endif 1003#endif
diff --git a/tmk_core/protocol/vusb/main.c b/tmk_core/protocol/vusb/main.c
index e6291900e..06dc8ae67 100644
--- a/tmk_core/protocol/vusb/main.c
+++ b/tmk_core/protocol/vusb/main.c
@@ -99,10 +99,6 @@ int main(void) {
99 // To prevent failing to configure NOT scan keyboard during configuration 99 // To prevent failing to configure NOT scan keyboard during configuration
100 if (usbConfiguration && usbInterruptIsReady()) { 100 if (usbConfiguration && usbInterruptIsReady()) {
101 keyboard_task(); 101 keyboard_task();
102
103#if defined(RGBLIGHT_ANIMATIONS) && defined(RGBLIGHT_ENABLE)
104 rgblight_task();
105#endif
106 } 102 }
107 vusb_transfer_keyboard(); 103 vusb_transfer_keyboard();
108 } 104 }