aboutsummaryrefslogtreecommitdiff
path: root/keyboards/terrazzo
diff options
context:
space:
mode:
authorRyan <fauxpark@gmail.com>2021-02-15 11:55:13 +1100
committerGitHub <noreply@github.com>2021-02-15 11:55:13 +1100
commit9ee12820197f38f6618b78f92481f3ffd2d8b7e5 (patch)
treed3a35c71242cbfff2868ce85d5348ccb8a68a489 /keyboards/terrazzo
parent6f44c2ec31a6aeacd9e90060a9670be03be372fe (diff)
downloadqmk_firmware-9ee12820197f38f6618b78f92481f3ffd2d8b7e5.tar.gz
qmk_firmware-9ee12820197f38f6618b78f92481f3ffd2d8b7e5.zip
LED Matrix: rename `LED_DRIVER_LED_COUNT` to `DRIVER_LED_TOTAL` (#11858)
Diffstat (limited to 'keyboards/terrazzo')
-rw-r--r--keyboards/terrazzo/config.h2
-rw-r--r--keyboards/terrazzo/terrazzo.c8
2 files changed, 5 insertions, 5 deletions
diff --git a/keyboards/terrazzo/config.h b/keyboards/terrazzo/config.h
index 4b1dac706..e13a1e0db 100644
--- a/keyboards/terrazzo/config.h
+++ b/keyboards/terrazzo/config.h
@@ -85,7 +85,7 @@ so there is only one configuration. */
85 85
86#define LED_DRIVER_ADDR_1 0x74 86#define LED_DRIVER_ADDR_1 0x74
87#define LED_DRIVER_COUNT 1 87#define LED_DRIVER_COUNT 1
88#define LED_DRIVER_LED_COUNT 105 88#define DRIVER_LED_TOTAL 105
89#define LED_MATRIX_ROWS 15 89#define LED_MATRIX_ROWS 15
90#define LED_MATRIX_COLS 7 90#define LED_MATRIX_COLS 7
91#define LED_MATRIX_MAXIMUM_BRIGHTNESS 20 91#define LED_MATRIX_MAXIMUM_BRIGHTNESS 20
diff --git a/keyboards/terrazzo/terrazzo.c b/keyboards/terrazzo/terrazzo.c
index e8a4e03fc..f079ded4d 100644
--- a/keyboards/terrazzo/terrazzo.c
+++ b/keyboards/terrazzo/terrazzo.c
@@ -22,7 +22,7 @@
22 #include "print.h" 22 #include "print.h"
23 #include "quantum.h" 23 #include "quantum.h"
24 24
25const is31_led g_is31_leds[LED_DRIVER_LED_COUNT] = { 25const is31_led g_is31_leds[DRIVER_LED_TOTAL] = {
26/* Refer to IS31 manual for these locations 26/* Refer to IS31 manual for these locations
27 * https://cdn-learn.adafruit.com/downloads/pdf/adafruit-15x7-7x15-charlieplex-led-matrix-charliewing-featherwing.pdf 27 * https://cdn-learn.adafruit.com/downloads/pdf/adafruit-15x7-7x15-charlieplex-led-matrix-charliewing-featherwing.pdf
28 */ 28 */
@@ -58,7 +58,7 @@ uint8_t terrazzo_effect = 1;
58 58
59void terrazzo_set_pixel(uint8_t x, uint8_t y, uint8_t value) { 59void terrazzo_set_pixel(uint8_t x, uint8_t y, uint8_t value) {
60 uint8_t target = y * LED_MATRIX_COLS + x; 60 uint8_t target = y * LED_MATRIX_COLS + x;
61 if (target < LED_DRIVER_LED_COUNT && target >= 0) { 61 if (target < DRIVER_LED_TOTAL && target >= 0) {
62 led_matrix_set_index_value(y * LED_MATRIX_COLS + x, value); 62 led_matrix_set_index_value(y * LED_MATRIX_COLS + x, value);
63 } 63 }
64} 64}
@@ -85,10 +85,10 @@ void terrazzo_scroll_pixel(bool clockwise) {
85 terrazzo_led_index = terrazzo_led_index - 1; 85 terrazzo_led_index = terrazzo_led_index - 1;
86 } 86 }
87 87
88 if (terrazzo_led_index >= LED_DRIVER_LED_COUNT) { 88 if (terrazzo_led_index >= DRIVER_LED_TOTAL) {
89 terrazzo_led_index = 0; 89 terrazzo_led_index = 0;
90 } else if (terrazzo_led_index <= 0 ) { 90 } else if (terrazzo_led_index <= 0 ) {
91 terrazzo_led_index = LED_DRIVER_LED_COUNT - 1; 91 terrazzo_led_index = DRIVER_LED_TOTAL - 1;
92 } 92 }
93} 93}
94 94