mirror of
https://github.com/openstenoproject/qmk
synced 2024-11-22 00:14:38 +00:00
Format code according to conventions (#11928)
Co-authored-by: QMK Bot <hello@qmk.fm>
This commit is contained in:
parent
d1806a26e4
commit
b0e161e33d
2 changed files with 19 additions and 19 deletions
|
@ -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);
|
||||
|
|
|
@ -21,7 +21,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|||
#include <stdbool.h>
|
||||
|
||||
#ifndef EECONFIG_MAGIC_NUMBER
|
||||
# define EECONFIG_MAGIC_NUMBER (uint16_t)0xFEEB // When changing, decrement this value to avoid future re-init issues
|
||||
# define EECONFIG_MAGIC_NUMBER (uint16_t)0xFEEB // When changing, decrement this value to avoid future re-init issues
|
||||
#endif
|
||||
#define EECONFIG_MAGIC_NUMBER_OFF (uint16_t)0xFFFF
|
||||
|
||||
|
|
Loading…
Reference in a new issue