aboutsummaryrefslogtreecommitdiffstats
path: root/quantum/split_common
diff options
context:
space:
mode:
authorJames Churchill <pelrun@gmail.com>2019-03-21 00:43:36 +1000
committerMechMerlin <30334081+mechmerlin@users.noreply.github.com>2019-03-20 07:43:36 -0700
commitcd696ed3d13542b09d34e8d78bb19ed6e7eee568 (patch)
tree40340344ec3993ae9875f973403fee3fcaa43a47 /quantum/split_common
parentab294813919d9df803946d990a6a1d783ab69f0a (diff)
downloadfirmware-cd696ed3d13542b09d34e8d78bb19ed6e7eee568.tar.gz
firmware-cd696ed3d13542b09d34e8d78bb19ed6e7eee568.tar.bz2
firmware-cd696ed3d13542b09d34e8d78bb19ed6e7eee568.zip
Fix i2c splits with >8 columns (#5454)
Diffstat (limited to 'quantum/split_common')
-rw-r--r--quantum/split_common/transport.c6
1 files changed, 3 insertions, 3 deletions
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 <string.h>
#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
'n156' href='#n156'>156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196