From cd696ed3d13542b09d34e8d78bb19ed6e7eee568 Mon Sep 17 00:00:00 2001 From: James Churchill Date: Thu, 21 Mar 2019 00:43:36 +1000 Subject: Fix i2c splits with >8 columns (#5454) --- quantum/split_common/transport.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'quantum/split_common') diff --git a/quantum/split_common/transport.c b/quantum/split_common/transport.c index 3696a2aba..631d913f7 100644 --- a/quantum/split_common/transport.c +++ b/quantum/split_common/transport.c @@ -1,3 +1,4 @@ +#include #include "config.h" #include "matrix.h" @@ -59,9 +60,8 @@ bool transport_master(matrix_row_t matrix[]) { } void transport_slave(matrix_row_t matrix[]) { - for (int i = 0; i < ROWS_PER_HAND * sizeof(matrix_row_t); ++i) { - i2c_slave_reg[I2C_KEYMAP_START + i] = matrix[i]; - } + // Copy matrix to I2C buffer + memcpy((void*)(i2c_slave_reg + I2C_KEYMAP_START), (void *)matrix, ROWS_PER_HAND * sizeof(matrix_row_t) ); // Read Backlight Info # ifdef BACKLIGHT_ENABLE -- cgit v1.2.3-70-g09d2