diff options
Diffstat (limited to 'quantum/split_common')
| -rw-r--r-- | quantum/split_common/transport.c | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/quantum/split_common/transport.c b/quantum/split_common/transport.c index 7ea1a9cec..a3539576f 100644 --- a/quantum/split_common/transport.c +++ b/quantum/split_common/transport.c | |||
| @@ -13,7 +13,6 @@ | |||
| 13 | 13 | ||
| 14 | #ifdef BACKLIGHT_ENABLE | 14 | #ifdef BACKLIGHT_ENABLE |
| 15 | # include "backlight.h" | 15 | # include "backlight.h" |
| 16 | extern backlight_config_t backlight_config; | ||
| 17 | #endif | 16 | #endif |
| 18 | 17 | ||
| 19 | #ifdef ENCODER_ENABLE | 18 | #ifdef ENCODER_ENABLE |
| @@ -55,7 +54,7 @@ bool transport_master(matrix_row_t matrix[]) { | |||
| 55 | 54 | ||
| 56 | // write backlight info | 55 | // write backlight info |
| 57 | # ifdef BACKLIGHT_ENABLE | 56 | # ifdef BACKLIGHT_ENABLE |
| 58 | uint8_t level = get_backlight_level(); | 57 | uint8_t level = is_backlight_enabled() ? get_backlight_level() : 0; |
| 59 | if (level != i2c_buffer->backlight_level) { | 58 | if (level != i2c_buffer->backlight_level) { |
| 60 | if (i2c_writeReg(SLAVE_I2C_ADDRESS, I2C_BACKLIGHT_START, (void *)&level, sizeof(level), TIMEOUT) >= 0) { | 59 | if (i2c_writeReg(SLAVE_I2C_ADDRESS, I2C_BACKLIGHT_START, (void *)&level, sizeof(level), TIMEOUT) >= 0) { |
| 61 | i2c_buffer->backlight_level = level; | 60 | i2c_buffer->backlight_level = level; |
| @@ -223,7 +222,7 @@ bool transport_master(matrix_row_t matrix[]) { | |||
| 223 | 222 | ||
| 224 | # ifdef BACKLIGHT_ENABLE | 223 | # ifdef BACKLIGHT_ENABLE |
| 225 | // Write backlight level for slave to read | 224 | // Write backlight level for slave to read |
| 226 | serial_m2s_buffer.backlight_level = backlight_config.enable ? backlight_config.level : 0; | 225 | serial_m2s_buffer.backlight_level = is_backlight_enabled() ? get_backlight_level() : 0; |
| 227 | # endif | 226 | # endif |
| 228 | 227 | ||
| 229 | # ifdef ENCODER_ENABLE | 228 | # ifdef ENCODER_ENABLE |
