Skip to content

Commit

Permalink
Merge pull request #37 from zsa/feature/rgb_matrix_led_lookup
Browse files Browse the repository at this point in the history
Implement kb function for rgb matrix to led lookup
  • Loading branch information
fdidron authored May 6, 2019
2 parents 2a70dc8 + 882b8df commit e622e6d
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion quantum/rgb_matrix.c
Original file line number Diff line number Diff line change
Expand Up @@ -144,9 +144,14 @@ void eeconfig_debug_rgb_matrix(void) {
dprintf("rgb_matrix_config.speed = %d\n", rgb_matrix_config.speed);
}

__attribute__ ((weak))
uint8_t rgb_matrix_map_row_column_to_led_kb(uint8_t row, uint8_t column, uint8_t *led_i) {
return 0;
}

uint8_t rgb_matrix_map_row_column_to_led(uint8_t row, uint8_t column, uint8_t *led_i) {
// TODO: This is kinda expensive, fix this soonish
uint8_t led_count = 0;
uint8_t led_count = rgb_matrix_map_row_column_to_led_kb(row, column, led_i);
for (uint8_t i = 0; i < DRIVER_LED_TOTAL && led_count < LED_HITS_TO_REMEMBER; i++) {
matrix_co_t matrix_co = g_rgb_leds[i].matrix_co;
if (row == matrix_co.row && column == matrix_co.col) {
Expand Down

0 comments on commit e622e6d

Please sign in to comment.