From 2449b232c4f14f00e2395aa99a7ffbea5478caf9 Mon Sep 17 00:00:00 2001 From: fauxpark Date: Thu, 16 May 2024 13:26:53 +1000 Subject: [PATCH] Remove useless `LED/RGB_MATRIX_ENABLE` ifdefs --- quantum/led_matrix/led_matrix.c | 4 ++-- quantum/rgb_matrix/rgb_matrix.c | 4 ++-- quantum/rgb_matrix/rgb_matrix_drivers.c | 2 +- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/quantum/led_matrix/led_matrix.c b/quantum/led_matrix/led_matrix.c index 2ca62c6969d2..798ab9a120e3 100644 --- a/quantum/led_matrix/led_matrix.c +++ b/quantum/led_matrix/led_matrix.c @@ -82,7 +82,7 @@ static last_hit_t last_hit_buffer; #endif // LED_MATRIX_KEYREACTIVE_ENABLED // split led matrix -#if defined(LED_MATRIX_ENABLE) && defined(LED_MATRIX_SPLIT) +#if defined(LED_MATRIX_SPLIT) const uint8_t k_led_matrix_split[2] = LED_MATRIX_SPLIT; #endif @@ -147,7 +147,7 @@ void led_matrix_set_value(int index, uint8_t value) { } void led_matrix_set_value_all(uint8_t value) { -#if defined(LED_MATRIX_ENABLE) && defined(LED_MATRIX_SPLIT) +#if defined(LED_MATRIX_SPLIT) for (uint8_t i = 0; i < LED_MATRIX_LED_COUNT; i++) led_matrix_set_value(i, value); #else diff --git a/quantum/rgb_matrix/rgb_matrix.c b/quantum/rgb_matrix/rgb_matrix.c index aaba00b4576f..70175f9d50e9 100644 --- a/quantum/rgb_matrix/rgb_matrix.c +++ b/quantum/rgb_matrix/rgb_matrix.c @@ -84,7 +84,7 @@ static last_hit_t last_hit_buffer; #endif // RGB_MATRIX_KEYREACTIVE_ENABLED // split rgb matrix -#if defined(RGB_MATRIX_ENABLE) && defined(RGB_MATRIX_SPLIT) +#if defined(RGB_MATRIX_SPLIT) const uint8_t k_rgb_matrix_split[2] = RGB_MATRIX_SPLIT; #endif @@ -148,7 +148,7 @@ void rgb_matrix_set_color(int index, uint8_t red, uint8_t green, uint8_t blue) { } void rgb_matrix_set_color_all(uint8_t red, uint8_t green, uint8_t blue) { -#if defined(RGB_MATRIX_ENABLE) && defined(RGB_MATRIX_SPLIT) +#if defined(RGB_MATRIX_SPLIT) for (uint8_t i = 0; i < RGB_MATRIX_LED_COUNT; i++) rgb_matrix_set_color(i, red, green, blue); #else diff --git a/quantum/rgb_matrix/rgb_matrix_drivers.c b/quantum/rgb_matrix/rgb_matrix_drivers.c index db3a2ef9e023..bf5209a9d322 100644 --- a/quantum/rgb_matrix/rgb_matrix_drivers.c +++ b/quantum/rgb_matrix/rgb_matrix_drivers.c @@ -164,7 +164,7 @@ static void flush(void) { // Set an led in the buffer to a color static inline void setled(int i, uint8_t r, uint8_t g, uint8_t b) { -# if defined(RGB_MATRIX_ENABLE) && defined(RGB_MATRIX_SPLIT) +# if defined(RGB_MATRIX_SPLIT) const uint8_t k_rgb_matrix_split[2] = RGB_MATRIX_SPLIT; if (!is_keyboard_left()) { if (i >= k_rgb_matrix_split[0]) {