diff options
author | Nick Brassel <nick@tzarc.org> | 2021-11-02 21:05:42 +1100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-11-02 10:05:42 +0000 |
commit | 699e69bec52f30cd078ae354cc6b2ca1fd04323f (patch) | |
tree | 9cfcfa83f1de01c3979e96cdba10f80d3c728507 /quantum | |
parent | 2326c8f74778551febc68c5c1767755fc30e1388 (diff) | |
download | qmk_firmware-699e69bec52f30cd078ae354cc6b2ca1fd04323f.tar.gz qmk_firmware-699e69bec52f30cd078ae354cc6b2ca1fd04323f.zip |
Fixup LED matrix. (#15020)
Diffstat (limited to 'quantum')
-rw-r--r-- | quantum/led_matrix/led_matrix.h | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/quantum/led_matrix/led_matrix.h b/quantum/led_matrix/led_matrix.h index f540be44ca..5386744430 100644 --- a/quantum/led_matrix/led_matrix.h +++ b/quantum/led_matrix/led_matrix.h @@ -39,13 +39,13 @@ #if defined(LED_MATRIX_LED_PROCESS_LIMIT) && LED_MATRIX_LED_PROCESS_LIMIT > 0 && LED_MATRIX_LED_PROCESS_LIMIT < DRIVER_LED_TOTAL # if defined(LED_MATRIX_SPLIT) -# define LED_MATRIX_USE_LIMITS(min, max) -uint8_t min = LED_MATRIX_LED_PROCESS_LIMIT * params->iter; -uint8_t max = min + LED_MATRIX_LED_PROCESS_LIMIT; -if (max > DRIVER_LED_TOTAL) max = DRIVER_LED_TOTAL; -uint8_t k_led_matrix_split[2] = LED_MATRIX_SPLIT; -if (is_keyboard_left() && (max > k_led_matrix_split[0])) max = k_led_matrix_split[0]; -if (!(is_keyboard_left()) && (min < k_led_matrix_split[0])) min = k_led_matrix_split[0]; +# define LED_MATRIX_USE_LIMITS(min, max) \ + uint8_t min = LED_MATRIX_LED_PROCESS_LIMIT * params->iter; \ + uint8_t max = min + LED_MATRIX_LED_PROCESS_LIMIT; \ + if (max > DRIVER_LED_TOTAL) max = DRIVER_LED_TOTAL; \ + uint8_t k_led_matrix_split[2] = LED_MATRIX_SPLIT; \ + if (is_keyboard_left() && (max > k_led_matrix_split[0])) max = k_led_matrix_split[0]; \ + if (!(is_keyboard_left()) && (min < k_led_matrix_split[0])) min = k_led_matrix_split[0]; # else # define LED_MATRIX_USE_LIMITS(min, max) \ uint8_t min = LED_MATRIX_LED_PROCESS_LIMIT * params->iter; \ |