uint32_t g_tick = 0;
// Ticks since this key was last hit.
-uint8_t g_key_hit[DRIVER_LED_TOTAL];
+uint8_t g_key_hit[LED_DRIVER_LED_COUNT];
// Ticks since any key was last hit.
uint32_t g_any_key_hit = 0;
led_matrix led;
*led_count = 0;
- for (uint8_t i = 0; i < DRIVER_LED_TOTAL; i++) {
+ for (uint8_t i = 0; i < LED_DRIVER_LED_COUNT; i++) {
// map_index_to_led(i, &led);
led = g_leds[i];
if (row == led.matrix_co.row && column == led.matrix_co.col) {
g_any_key_hit++;
}
- for (int led = 0; led < DRIVER_LED_TOTAL; led++) {
+ for (int led = 0; led < LED_DRIVER_LED_COUNT; led++) {
if (g_key_hit[led] < 255) {
if (g_key_hit[led] == 254)
g_last_led_count = MAX(g_last_led_count - 1, 0);
// TODO: put the 1 second startup delay here?
// clear the key hits
- for (int led=0; led<DRIVER_LED_TOTAL; led++) {
+ for (int led=0; led<LED_DRIVER_LED_COUNT; led++) {
g_key_hit[led] = 255;
}
// uint8_t led[8], led_count;
// map_row_column_to_led(row,column,led,&led_count);
// for(uint8_t i = 0; i < led_count; i++) {
-// if (led[i] < DRIVER_LED_TOTAL) {
+// if (led[i] < LED_DRIVER_LED_COUNT) {
// void *address = backlight_get_custom_key_value_eeprom_address(led[i]);
// eeprom_update_byte(address, value);
// }
return led_matrix_config.mode;
}
-void led_matrix_set_value(uint8_t val, bool eeprom_write) {
+void led_matrix_set_value_noeeprom(uint8_t val) {
led_matrix_config.val = val;
- if (eeprom_write) {
- eeconfig_update_led_matrix(led_matrix_config.raw);
- }
+}
+
+void led_matrix_set_value(uint8_t val) {
+ led_matrix_set_value_noeeprom(val);
+ eeconfig_update_led_matrix(led_matrix_config.raw);
}