summaryrefslogtreecommitdiffstats
path: root/quantum
diff options
context:
space:
mode:
authorgithub-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>2021-02-16 11:33:03 +1100
committerGitHub <noreply@github.com>2021-02-16 11:33:03 +1100
commitb0e161e33d8ec030c6965daa57a76ec70b1a1122 (patch)
tree594e4fbd51bcf56619ac0071ccea036a06cdebff /quantum
parentd1806a26e4ad75fa0e0405283803eba22c1a49ba (diff)
Format code according to conventions (#11928)
Co-authored-by: QMK Bot <hello@qmk.fm>
Diffstat (limited to 'quantum')
-rw-r--r--quantum/split_common/transport.c36
1 files changed, 18 insertions, 18 deletions
diff --git a/quantum/split_common/transport.c b/quantum/split_common/transport.c
index 977b5dc33e..61b61ea08c 100644
--- a/quantum/split_common/transport.c
+++ b/quantum/split_common/transport.c
@@ -78,9 +78,9 @@ static I2C_slave_buffer_t *const i2c_buffer = (I2C_slave_buffer_t *)i2c_slave_re
// Get rows from other half over i2c
bool transport_master(matrix_row_t master_matrix[], matrix_row_t slave_matrix[]) {
i2c_readReg(SLAVE_I2C_ADDRESS, I2C_KEYMAP_SLAVE_START, (void *)slave_matrix, sizeof(i2c_buffer->smatrix), TIMEOUT);
-#ifdef SPLIT_TRANSPORT_MIRROR
+# ifdef SPLIT_TRANSPORT_MIRROR
i2c_writeReg(SLAVE_I2C_ADDRESS, I2C_KEYMAP_MASTER_START, (void *)master_matrix, sizeof(i2c_buffer->mmatrix), TIMEOUT);
-#endif
+# endif
// write backlight info
# ifdef BACKLIGHT_ENABLE
@@ -153,10 +153,10 @@ void transport_slave(matrix_row_t master_matrix[], matrix_row_t slave_matrix[])
sync_timer_update(i2c_buffer->sync_timer);
# endif
// Copy matrix to I2C buffer
- memcpy((void*)i2c_buffer->smatrix, (void *)slave_matrix, sizeof(i2c_buffer->smatrix));
-#ifdef SPLIT_TRANSPORT_MIRROR
- memcpy((void*)master_matrix, (void *)i2c_buffer->mmatrix, sizeof(i2c_buffer->mmatrix));
-#endif
+ memcpy((void *)i2c_buffer->smatrix, (void *)slave_matrix, sizeof(i2c_buffer->smatrix));
+# ifdef SPLIT_TRANSPORT_MIRROR
+ memcpy((void *)master_matrix, (void *)i2c_buffer->mmatrix, sizeof(i2c_buffer->mmatrix));
+# endif
// Read Backlight Info
# ifdef BACKLIGHT_ENABLE
@@ -208,23 +208,23 @@ typedef struct _Serial_s2m_buffer_t {
typedef struct _Serial_m2s_buffer_t {
# ifdef SPLIT_MODS_ENABLE
- uint8_t real_mods;
- uint8_t weak_mods;
+ uint8_t real_mods;
+ uint8_t weak_mods;
# ifndef NO_ACTION_ONESHOT
- uint8_t oneshot_mods;
+ uint8_t oneshot_mods;
# endif
# endif
# ifndef DISABLE_SYNC_TIMER
- uint32_t sync_timer;
+ uint32_t sync_timer;
# endif
# ifdef SPLIT_TRANSPORT_MIRROR
matrix_row_t mmatrix[ROWS_PER_HAND];
# endif
# ifdef BACKLIGHT_ENABLE
- uint8_t backlight_level;
+ uint8_t backlight_level;
# endif
# ifdef WPM_ENABLE
- uint8_t current_wpm;
+ uint8_t current_wpm;
# endif
} Serial_m2s_buffer_t;
@@ -316,10 +316,10 @@ bool transport_master(matrix_row_t master_matrix[], matrix_row_t slave_matrix[])
// TODO: if MATRIX_COLS > 8 change to unpack()
for (int i = 0; i < ROWS_PER_HAND; ++i) {
- slave_matrix[i] = serial_s2m_buffer.smatrix[i];
-#ifdef SPLIT_TRANSPORT_MIRROR
+ slave_matrix[i] = serial_s2m_buffer.smatrix[i];
+# ifdef SPLIT_TRANSPORT_MIRROR
serial_m2s_buffer.mmatrix[i] = master_matrix[i];
-#endif
+# endif
}
# ifdef BACKLIGHT_ENABLE
@@ -358,9 +358,9 @@ void transport_slave(matrix_row_t master_matrix[], matrix_row_t slave_matrix[])
// TODO: if MATRIX_COLS > 8 change to pack()
for (int i = 0; i < ROWS_PER_HAND; ++i) {
serial_s2m_buffer.smatrix[i] = slave_matrix[i];
-#ifdef SPLIT_TRANSPORT_MIRROR
- master_matrix[i] = serial_m2s_buffer.mmatrix[i];
-#endif
+# ifdef SPLIT_TRANSPORT_MIRROR
+ master_matrix[i] = serial_m2s_buffer.mmatrix[i];
+# endif
}
# ifdef BACKLIGHT_ENABLE
backlight_set(serial_m2s_buffer.backlight_level);