Skip to content

Commit

Permalink
Move rgblight and backlight task to common location
Browse files Browse the repository at this point in the history
  • Loading branch information
zvecr committed Jan 13, 2020
1 parent b89e35b commit bca857a
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 @@ -634,12 +634,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 @@ -335,6 +335,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 @@ -219,9 +219,6 @@ int main(void) {
#endif
#ifdef RAW_ENABLE
raw_hid_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 @@ -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
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 bca857a

Please sign in to comment.