Skip to content

Commit

Permalink
Move rgblight and backlight task to common location (qmk#7733)
Browse files Browse the repository at this point in the history
  • Loading branch information
zvecr authored and fdidron committed Feb 14, 2020
1 parent 6bae1bc commit 7029d8a
Show file tree
Hide file tree
Showing 5 changed files with 11 additions and 16 deletions.
6 changes: 1 addition & 5 deletions quantum/quantum.c
Original file line number Diff line number Diff line change
Expand Up @@ -635,12 +635,8 @@ void matrix_scan_quantum() {
matrix_scan_combo();
#endif

#if defined(BACKLIGHT_ENABLE)
# if defined(LED_MATRIX_ENABLE)
#ifdef LED_MATRIX_ENABLE
led_matrix_task();
# elif defined(BACKLIGHT_PIN) || defined(BACKLIGHT_PINS)
backlight_task();
# endif
#endif

#ifdef RGB_MATRIX_ENABLE
Expand Down
10 changes: 10 additions & 0 deletions tmk_core/common/keyboard.c
Original file line number Diff line number Diff line change
Expand Up @@ -330,6 +330,16 @@ void keyboard_task(void) {
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
Expand Down
3 changes: 0 additions & 3 deletions tmk_core/protocol/chibios/main.c
Original file line number Diff line number Diff line change
Expand Up @@ -234,8 +234,5 @@ int main(void) {
webusb_task();
#endif

#if defined(RGBLIGHT_ANIMATIONS) && defined(RGBLIGHT_ENABLE)
rgblight_task();
#endif
}
}
4 changes: 0 additions & 4 deletions tmk_core/protocol/lufa/lufa.c
Original file line number Diff line number Diff line change
Expand Up @@ -1110,10 +1110,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
Expand Down
4 changes: 0 additions & 4 deletions tmk_core/protocol/vusb/main.c
Original file line number Diff line number Diff line change
Expand Up @@ -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();
}
Expand Down

0 comments on commit 7029d8a

Please sign in to comment.