Change DRIVER_LED_COUNT
to {LED,RGB}_MATRIX_LED_COUNT
(#18399)
This commit is contained in:
parent
d967de0df7
commit
36c410592d
577 changed files with 836 additions and 831 deletions
|
@ -135,14 +135,17 @@ void IS31FL_common_update_pwm_register(uint8_t addr, uint8_t index) {
|
|||
void IS31FL_set_manual_scaling_buffer(void) {
|
||||
for (int i = 0; i < ISSI_MANUAL_SCALING; i++) {
|
||||
is31_led scale = g_is31_scaling[i];
|
||||
if (scale.driver >= 0 && scale.driver < DRIVER_LED_TOTAL) {
|
||||
# ifdef RGB_MATRIX_ENABLE
|
||||
if (scale.driver >= 0 && scale.driver < RGB_MATRIX_LED_COUNT) {
|
||||
is31_led led = g_is31_leds[scale.driver];
|
||||
|
||||
# ifdef RGB_MATRIX_ENABLE
|
||||
g_scaling_buffer[led.driver][led.r] = scale.r;
|
||||
g_scaling_buffer[led.driver][led.g] = scale.g;
|
||||
g_scaling_buffer[led.driver][led.b] = scale.b;
|
||||
# elif defined(LED_MATRIX_ENABLE)
|
||||
if (scale.driver >= 0 && scale.driver < LED_MATRIX_LED_COUNT) {
|
||||
is31_led led = g_is31_leds[scale.driver];
|
||||
|
||||
g_scaling_buffer[led.driver][led.v] = scale.v;
|
||||
# endif
|
||||
g_scaling_buffer_update_required[led.driver] = true;
|
||||
|
@ -165,7 +168,7 @@ void IS31FL_common_update_scaling_register(uint8_t addr, uint8_t index) {
|
|||
#ifdef RGB_MATRIX_ENABLE
|
||||
// Colour is set by adjusting PWM register
|
||||
void IS31FL_RGB_set_color(int index, uint8_t red, uint8_t green, uint8_t blue) {
|
||||
if (index >= 0 && index < DRIVER_LED_TOTAL) {
|
||||
if (index >= 0 && index < RGB_MATRIX_LED_COUNT) {
|
||||
is31_led led = g_is31_leds[index];
|
||||
|
||||
g_pwm_buffer[led.driver][led.r] = red;
|
||||
|
@ -176,7 +179,7 @@ void IS31FL_RGB_set_color(int index, uint8_t red, uint8_t green, uint8_t blue) {
|
|||
}
|
||||
|
||||
void IS31FL_RGB_set_color_all(uint8_t red, uint8_t green, uint8_t blue) {
|
||||
for (int i = 0; i < DRIVER_LED_TOTAL; i++) {
|
||||
for (int i = 0; i < RGB_MATRIX_LED_COUNT; i++) {
|
||||
IS31FL_RGB_set_color(i, red, green, blue);
|
||||
}
|
||||
}
|
||||
|
@ -215,7 +218,7 @@ void IS31FL_simple_set_scaling_buffer(uint8_t index, bool value) {
|
|||
}
|
||||
|
||||
void IS31FL_simple_set_brightness(int index, uint8_t value) {
|
||||
if (index >= 0 && index < DRIVER_LED_TOTAL) {
|
||||
if (index >= 0 && index < LED_MATRIX_LED_COUNT) {
|
||||
is31_led led = g_is31_leds[index];
|
||||
g_pwm_buffer[led.driver][led.v] = value;
|
||||
g_pwm_buffer_update_required[led.driver] = true;
|
||||
|
@ -223,7 +226,7 @@ void IS31FL_simple_set_brightness(int index, uint8_t value) {
|
|||
}
|
||||
|
||||
void IS31FL_simple_set_brigntness_all(uint8_t value) {
|
||||
for (int i = 0; i < DRIVER_LED_TOTAL; i++) {
|
||||
for (int i = 0; i < LED_MATRIX_LED_COUNT; i++) {
|
||||
IS31FL_simple_set_brightness(i, value);
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue