aboutsummaryrefslogtreecommitdiff
path: root/quantum/quantum.c
diff options
context:
space:
mode:
Diffstat (limited to 'quantum/quantum.c')
-rw-r--r--quantum/quantum.c16
1 files changed, 12 insertions, 4 deletions
diff --git a/quantum/quantum.c b/quantum/quantum.c
index bd3715c80..0e605d4cb 100644
--- a/quantum/quantum.c
+++ b/quantum/quantum.c
@@ -1031,7 +1031,11 @@ void matrix_init_quantum() {
1031 eeconfig_init(); 1031 eeconfig_init();
1032 } 1032 }
1033 #ifdef BACKLIGHT_ENABLE 1033 #ifdef BACKLIGHT_ENABLE
1034 backlight_init_ports(); 1034 #ifdef LED_MATRIX_ENABLE
1035 led_matrix_init();
1036 #else
1037 backlight_init_ports();
1038 #endif
1035 #endif 1039 #endif
1036 #ifdef AUDIO_ENABLE 1040 #ifdef AUDIO_ENABLE
1037 audio_init(); 1041 audio_init();
@@ -1067,8 +1071,12 @@ void matrix_scan_quantum() {
1067 matrix_scan_combo(); 1071 matrix_scan_combo();
1068 #endif 1072 #endif
1069 1073
1070 #if defined(BACKLIGHT_ENABLE) && defined(BACKLIGHT_PIN) 1074 #if defined(BACKLIGHT_ENABLE)
1071 backlight_task(); 1075 #if defined(LED_MATRIX_ENABLE)
1076 led_matrix_task();
1077 #elif defined(BACKLIGHT_PIN)
1078 backlight_task();
1079 #endif
1072 #endif 1080 #endif
1073 1081
1074 #ifdef RGB_MATRIX_ENABLE 1082 #ifdef RGB_MATRIX_ENABLE
@@ -1198,7 +1206,7 @@ static inline void set_pwm(uint16_t val) {
1198 OCRxx = val; 1206 OCRxx = val;
1199} 1207}
1200 1208
1201#ifndef BACKLIGHT_CUSTOM_DRIVER 1209#ifndef BACKLIGHT_CUSTOM_DRIVER || LED_MATRIX_ENABLE
1202__attribute__ ((weak)) 1210__attribute__ ((weak))
1203void backlight_set(uint8_t level) { 1211void backlight_set(uint8_t level) {
1204 if (level > BACKLIGHT_LEVELS) 1212 if (level > BACKLIGHT_LEVELS)