diff options
author | Seth Barberee <seth.barberee@gmail.com> | 2018-08-11 13:10:23 -0500 |
---|---|---|
committer | Drashna Jaelre <drashna@live.com> | 2018-08-11 11:10:23 -0700 |
commit | 3eabd7946ec5e47d12d603d591e8d8658d82fa42 (patch) | |
tree | 5e048b4640345f69774100272827035ac1a216f6 | |
parent | fd0bd29a0a3f2de93a3e561007805fac67e7e0cd (diff) |
Split Common: Serial Backlight LED fix (#3586)
-rw-r--r-- | quantum/split_common/matrix.c | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/quantum/split_common/matrix.c b/quantum/split_common/matrix.c index 0a79e42566..4af90209f6 100644 --- a/quantum/split_common/matrix.c +++ b/quantum/split_common/matrix.c @@ -341,6 +341,24 @@ void matrix_slave_scan(void) { serial_slave_buffer[i] = matrix[offset+i]; } #endif +#ifdef USE_I2C +#ifdef BACKLIGHT_ENABLE + // Read backlight level sent from master and update level on slave + backlight_set(i2c_slave_buffer[0]); +#endif + for (int i = 0; i < ROWS_PER_HAND; ++i) { + i2c_slave_buffer[i+1] = matrix[offset+i]; + } +#else // USE_SERIAL + for (int i = 0; i < ROWS_PER_HAND; ++i) { + serial_slave_buffer[i] = matrix[offset+i]; + } + +#ifdef BACKLIGHT_ENABLE + // Read backlight level sent from master and update level on slave + backlight_set(serial_master_buffer[SERIAL_BACKLIT_START]); +#endif +#endif matrix_slave_scan_user(); } |