aboutsummaryrefslogtreecommitdiff
path: root/quantum/split_common
diff options
context:
space:
mode:
authorNick Brassel <nick@tzarc.org>2021-01-18 05:12:15 +1100
committerZach White <skullydazed@drpepper.org>2021-01-17 10:19:56 -0800
commit31c57aab35e6fd49c4c8336f449419afe7630e93 (patch)
tree60b3508af9b3a953826d027a2dc6f2e2d028d1cc /quantum/split_common
parente702c7f1b4cfa8fe1579498ef2877994baa64056 (diff)
downloadqmk_firmware-31c57aab35e6fd49c4c8336f449419afe7630e93.tar.gz
qmk_firmware-31c57aab35e6fd49c4c8336f449419afe7630e93.zip
`qmk cformat`
Diffstat (limited to 'quantum/split_common')
-rw-r--r--quantum/split_common/matrix.c2
-rw-r--r--quantum/split_common/transport.c26
2 files changed, 14 insertions, 14 deletions
diff --git a/quantum/split_common/matrix.c b/quantum/split_common/matrix.c
index 631e960ea..bad762b49 100644
--- a/quantum/split_common/matrix.c
+++ b/quantum/split_common/matrix.c
@@ -264,7 +264,7 @@ bool matrix_post_scan(void) {
264 // reset other half if disconnected 264 // reset other half if disconnected
265 for (int i = 0; i < ROWS_PER_HAND; ++i) { 265 for (int i = 0; i < ROWS_PER_HAND; ++i) {
266 matrix[thatHand + i] = 0; 266 matrix[thatHand + i] = 0;
267 slave_matrix[i] = 0; 267 slave_matrix[i] = 0;
268 } 268 }
269 269
270 changed = true; 270 changed = true;
diff --git a/quantum/split_common/transport.c b/quantum/split_common/transport.c
index e601fb4df..b45ba92c3 100644
--- a/quantum/split_common/transport.c
+++ b/quantum/split_common/transport.c
@@ -40,7 +40,7 @@ typedef struct _I2C_slave_buffer_t {
40# endif 40# endif
41# endif 41# endif
42# ifdef BACKLIGHT_ENABLE 42# ifdef BACKLIGHT_ENABLE
43 uint8_t backlight_level; 43 uint8_t backlight_level;
44# endif 44# endif
45# if defined(RGBLIGHT_ENABLE) && defined(RGBLIGHT_SPLIT) 45# if defined(RGBLIGHT_ENABLE) && defined(RGBLIGHT_SPLIT)
46 rgblight_syncinfo_t rgblight_sync; 46 rgblight_syncinfo_t rgblight_sync;
@@ -172,9 +172,9 @@ void transport_slave(matrix_row_t matrix[]) {
172# ifdef SPLIT_MODS_ENABLE 172# ifdef SPLIT_MODS_ENABLE
173 set_mods(i2c_buffer->real_mods); 173 set_mods(i2c_buffer->real_mods);
174 set_weak_mods(i2c_buffer->weak_mods); 174 set_weak_mods(i2c_buffer->weak_mods);
175# ifndef NO_ACTION_ONESHOT 175# ifndef NO_ACTION_ONESHOT
176 set_oneshot_mods(i2c_buffer->oneshot_mods); 176 set_oneshot_mods(i2c_buffer->oneshot_mods);
177# endif 177# endif
178# endif 178# endif
179} 179}
180 180
@@ -191,27 +191,27 @@ typedef struct _Serial_s2m_buffer_t {
191 matrix_row_t smatrix[ROWS_PER_HAND]; 191 matrix_row_t smatrix[ROWS_PER_HAND];
192 192
193# ifdef ENCODER_ENABLE 193# ifdef ENCODER_ENABLE
194 uint8_t encoder_state[NUMBER_OF_ENCODERS]; 194 uint8_t encoder_state[NUMBER_OF_ENCODERS];
195# endif 195# endif
196 196
197} Serial_s2m_buffer_t; 197} Serial_s2m_buffer_t;
198 198
199typedef struct _Serial_m2s_buffer_t { 199typedef struct _Serial_m2s_buffer_t {
200# ifdef SPLIT_MODS_ENABLE 200# ifdef SPLIT_MODS_ENABLE
201 uint8_t real_mods; 201 uint8_t real_mods;
202 uint8_t weak_mods; 202 uint8_t weak_mods;
203# ifndef NO_ACTION_ONESHOT 203# ifndef NO_ACTION_ONESHOT
204 uint8_t oneshot_mods; 204 uint8_t oneshot_mods;
205# endif 205# endif
206# endif 206# endif
207# ifndef DISABLE_SYNC_TIMER 207# ifndef DISABLE_SYNC_TIMER
208 uint32_t sync_timer; 208 uint32_t sync_timer;
209# endif 209# endif
210# ifdef BACKLIGHT_ENABLE 210# ifdef BACKLIGHT_ENABLE
211 uint8_t backlight_level; 211 uint8_t backlight_level;
212# endif 212# endif
213# ifdef WPM_ENABLE 213# ifdef WPM_ENABLE
214 uint8_t current_wpm; 214 uint8_t current_wpm;
215# endif 215# endif
216} Serial_m2s_buffer_t; 216} Serial_m2s_buffer_t;
217 217
@@ -317,18 +317,18 @@ bool transport_master(matrix_row_t matrix[]) {
317 317
318# ifdef WPM_ENABLE 318# ifdef WPM_ENABLE
319 // Write wpm to slave 319 // Write wpm to slave
320 serial_m2s_buffer.current_wpm = get_current_wpm(); 320 serial_m2s_buffer.current_wpm = get_current_wpm();
321# endif 321# endif
322 322
323# ifdef SPLIT_MODS_ENABLE 323# ifdef SPLIT_MODS_ENABLE
324 serial_m2s_buffer.real_mods = get_mods(); 324 serial_m2s_buffer.real_mods = get_mods();
325 serial_m2s_buffer.weak_mods = get_weak_mods(); 325 serial_m2s_buffer.weak_mods = get_weak_mods();
326# ifndef NO_ACTION_ONESHOT 326# ifndef NO_ACTION_ONESHOT
327 serial_m2s_buffer.oneshot_mods = get_oneshot_mods(); 327 serial_m2s_buffer.oneshot_mods = get_oneshot_mods();
328# endif 328# endif
329# endif 329# endif
330# ifndef DISABLE_SYNC_TIMER 330# ifndef DISABLE_SYNC_TIMER
331 serial_m2s_buffer.sync_timer = sync_timer_read32() + SYNC_TIMER_OFFSET; 331 serial_m2s_buffer.sync_timer = sync_timer_read32() + SYNC_TIMER_OFFSET;
332# endif 332# endif
333 return true; 333 return true;
334} 334}