summaryrefslogtreecommitdiffstats
path: root/quantum
diff options
context:
space:
mode:
authorXScorpion2 <rcalt2vt@gmail.com>2019-04-30 16:55:53 +0200
committerMechMerlin <30334081+mechmerlin@users.noreply.github.com>2019-04-30 16:55:53 +0200
commitbb208f3e3b69fb154f4f78d7538ffa28482f232f (patch)
treee548229efcab7899d2702983d7d49ed11ffa182a /quantum
parent483ad4e3e041084977bc128622aa49c637524b77 (diff)
downloadqmk_firmware-bb208f3e3b69fb154f4f78d7538ffa28482f232f.tar.gz
qmk_firmware-bb208f3e3b69fb154f4f78d7538ffa28482f232f.tar.xz
Implement kb function for rgb matrix to led lookup (#5738)
Diffstat (limited to 'quantum')
-rw-r--r--quantum/rgb_matrix.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/quantum/rgb_matrix.c b/quantum/rgb_matrix.c
index 8c16c7790..5528a0834 100644
--- a/quantum/rgb_matrix.c
+++ b/quantum/rgb_matrix.c
@@ -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) {