diff options
author | Ryan <fauxpark@gmail.com> | 2021-02-15 11:55:13 +1100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-02-15 11:55:13 +1100 |
commit | 9ee12820197f38f6618b78f92481f3ffd2d8b7e5 (patch) | |
tree | d3a35c71242cbfff2868ce85d5348ccb8a68a489 /keyboards/terrazzo | |
parent | 6f44c2ec31a6aeacd9e90060a9670be03be372fe (diff) |
LED Matrix: rename `LED_DRIVER_LED_COUNT` to `DRIVER_LED_TOTAL` (#11858)
Diffstat (limited to 'keyboards/terrazzo')
-rw-r--r-- | keyboards/terrazzo/config.h | 2 | ||||
-rw-r--r-- | keyboards/terrazzo/terrazzo.c | 8 |
2 files changed, 5 insertions, 5 deletions
diff --git a/keyboards/terrazzo/config.h b/keyboards/terrazzo/config.h index 4b1dac7064..e13a1e0dba 100644 --- a/keyboards/terrazzo/config.h +++ b/keyboards/terrazzo/config.h @@ -85,7 +85,7 @@ so there is only one configuration. */ #define LED_DRIVER_ADDR_1 0x74 #define LED_DRIVER_COUNT 1 -#define LED_DRIVER_LED_COUNT 105 +#define DRIVER_LED_TOTAL 105 #define LED_MATRIX_ROWS 15 #define LED_MATRIX_COLS 7 #define LED_MATRIX_MAXIMUM_BRIGHTNESS 20 diff --git a/keyboards/terrazzo/terrazzo.c b/keyboards/terrazzo/terrazzo.c index e8a4e03fc6..f079ded4d7 100644 --- a/keyboards/terrazzo/terrazzo.c +++ b/keyboards/terrazzo/terrazzo.c @@ -22,7 +22,7 @@ #include "print.h" #include "quantum.h" -const is31_led g_is31_leds[LED_DRIVER_LED_COUNT] = { +const is31_led g_is31_leds[DRIVER_LED_TOTAL] = { /* Refer to IS31 manual for these locations * https://cdn-learn.adafruit.com/downloads/pdf/adafruit-15x7-7x15-charlieplex-led-matrix-charliewing-featherwing.pdf */ @@ -58,7 +58,7 @@ uint8_t terrazzo_effect = 1; void terrazzo_set_pixel(uint8_t x, uint8_t y, uint8_t value) { uint8_t target = y * LED_MATRIX_COLS + x; - if (target < LED_DRIVER_LED_COUNT && target >= 0) { + if (target < DRIVER_LED_TOTAL && target >= 0) { led_matrix_set_index_value(y * LED_MATRIX_COLS + x, value); } } @@ -85,10 +85,10 @@ void terrazzo_scroll_pixel(bool clockwise) { terrazzo_led_index = terrazzo_led_index - 1; } - if (terrazzo_led_index >= LED_DRIVER_LED_COUNT) { + if (terrazzo_led_index >= DRIVER_LED_TOTAL) { terrazzo_led_index = 0; } else if (terrazzo_led_index <= 0 ) { - terrazzo_led_index = LED_DRIVER_LED_COUNT - 1; + terrazzo_led_index = DRIVER_LED_TOTAL - 1; } } |