aboutsummaryrefslogtreecommitdiff
path: root/quantum/led_matrix.c
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 /quantum/led_matrix.c
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 'quantum/led_matrix.c')
-rw-r--r--quantum/led_matrix.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/quantum/led_matrix.c b/quantum/led_matrix.c
index c3538e94d..4f1f06c7a 100644
--- a/quantum/led_matrix.c
+++ b/quantum/led_matrix.c
@@ -59,7 +59,7 @@ bool g_suspend_state = false;
59uint32_t g_tick = 0; 59uint32_t g_tick = 0;
60 60
61// Ticks since this key was last hit. 61// Ticks since this key was last hit.
62uint8_t g_key_hit[LED_DRIVER_LED_COUNT]; 62uint8_t g_key_hit[DRIVER_LED_TOTAL];
63 63
64// Ticks since any key was last hit. 64// Ticks since any key was last hit.
65uint32_t g_any_key_hit = 0; 65uint32_t g_any_key_hit = 0;
@@ -152,7 +152,7 @@ void led_matrix_task(void) {
152 g_any_key_hit++; 152 g_any_key_hit++;
153 } 153 }
154 154
155 for (int led = 0; led < LED_DRIVER_LED_COUNT; led++) { 155 for (int led = 0; led < DRIVER_LED_TOTAL; led++) {
156 if (g_key_hit[led] < 255) { 156 if (g_key_hit[led] < 255) {
157 if (g_key_hit[led] == 254) g_last_led_count = MAX(g_last_led_count - 1, 0); 157 if (g_key_hit[led] == 254) g_last_led_count = MAX(g_last_led_count - 1, 0);
158 g_key_hit[led]++; 158 g_key_hit[led]++;
@@ -217,7 +217,7 @@ void led_matrix_init(void) {
217 wait_ms(500); 217 wait_ms(500);
218 218
219 // clear the key hits 219 // clear the key hits
220 for (int led = 0; led < LED_DRIVER_LED_COUNT; led++) { 220 for (int led = 0; led < DRIVER_LED_TOTAL; led++) {
221 g_key_hit[led] = 255; 221 g_key_hit[led] = 255;
222 } 222 }
223 223
@@ -265,7 +265,7 @@ static uint8_t decrement(uint8_t value, uint8_t step, uint8_t min, uint8_t max)
265// uint8_t led[8]; 265// uint8_t led[8];
266// uint8_t led_count = map_row_column_to_led(row, column, led); 266// uint8_t led_count = map_row_column_to_led(row, column, led);
267// for(uint8_t i = 0; i < led_count; i++) { 267// for(uint8_t i = 0; i < led_count; i++) {
268// if (led[i] < LED_DRIVER_LED_COUNT) { 268// if (led[i] < DRIVER_LED_TOTAL) {
269// void *address = backlight_get_custom_key_value_eeprom_address(led[i]); 269// void *address = backlight_get_custom_key_value_eeprom_address(led[i]);
270// eeprom_update_byte(address, value); 270// eeprom_update_byte(address, value);
271// } 271// }