aboutsummaryrefslogtreecommitdiffstats
path: root/tmk_core
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 /tmk_core
parenta1452db98abc2a95bac30a5f36d514748cc9851d (diff)
downloadfirmware-ba628a28bcf09421739922d8eeef05e6ca9e9b6b.tar.gz
firmware-ba628a28bcf09421739922d8eeef05e6ca9e9b6b.tar.bz2
firmware-ba628a28bcf09421739922d8eeef05e6ca9e9b6b.zip
Move rgblight and backlight task to common location (#7733)
Diffstat (limited to 'tmk_core')
-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
4 files changed, 10 insertions, 11 deletions
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:
matrix_scan_perf_task();
#endif
+#if defined(RGBLIGHT_ANIMATIONS) && defined(RGBLIGHT_ENABLE)
+ rgblight_task();
+#endif
+
+#if defined(BACKLIGHT_ENABLE)
+# if defined(BACKLIGHT_PIN) || defined(BACKLIGHT_PINS)
+ backlight_task();
+# endif
+#endif
+
#ifdef QWIIC_ENABLE
qwiic_task();
#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) {
#ifdef RAW_ENABLE
raw_hid_task();
#endif
-#if defined(RGBLIGHT_ANIMATIONS) && defined(RGBLIGHT_ENABLE)
- rgblight_task();
-#endif
}
}
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) {
MIDI_Device_USBTask(&USB_MIDI_Interface);
#endif
-#if defined(RGBLIGHT_ANIMATIONS) && defined(RGBLIGHT_ENABLE)
- rgblight_task();
-#endif
-
#ifdef MODULE_ADAFRUIT_BLE
adafruit_ble_task();
#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) {
// To prevent failing to configure NOT scan keyboard during configuration
if (usbConfiguration && usbInterruptIsReady()) {
keyboard_task();
-
-#if defined(RGBLIGHT_ANIMATIONS) && defined(RGBLIGHT_ENABLE)
- rgblight_task();
-#endif
}
vusb_transfer_keyboard();
}