1
0
Fork 0

qmk cformat

This commit is contained in:
Nick Brassel 2021-01-18 05:12:15 +11:00 committed by Zach White
parent e702c7f1b4
commit 31c57aab35
9 changed files with 136 additions and 113 deletions

View file

@ -551,10 +551,10 @@ void send_char(char ascii_code) {
}
#endif
uint8_t keycode = pgm_read_byte(&ascii_to_keycode_lut[(uint8_t)ascii_code]);
bool is_shifted = PGM_LOADBIT(ascii_to_shift_lut, (uint8_t)ascii_code);
bool is_altgred = PGM_LOADBIT(ascii_to_altgr_lut, (uint8_t)ascii_code);
bool is_dead = PGM_LOADBIT(ascii_to_dead_lut, (uint8_t)ascii_code);
uint8_t keycode = pgm_read_byte(&ascii_to_keycode_lut[(uint8_t)ascii_code]);
bool is_shifted = PGM_LOADBIT(ascii_to_shift_lut, (uint8_t)ascii_code);
bool is_altgred = PGM_LOADBIT(ascii_to_altgr_lut, (uint8_t)ascii_code);
bool is_dead = PGM_LOADBIT(ascii_to_dead_lut, (uint8_t)ascii_code);
if (is_shifted) {
register_code(KC_LSFT);

View file

@ -248,9 +248,9 @@ typedef ioline_t pin_t;
*/
# if !defined(GPIO_INPUT_PIN_DELAY)
# if defined(STM32_SYSCLK)
# define GPIO_INPUT_PIN_DELAY (STM32_SYSCLK/1000000L / 4)
# define GPIO_INPUT_PIN_DELAY (STM32_SYSCLK / 1000000L / 4)
# elif defined(KINETIS_SYSCLK_FREQUENCY)
# define GPIO_INPUT_PIN_DELAY (KINETIS_SYSCLK_FREQUENCY/1000000L / 4)
# define GPIO_INPUT_PIN_DELAY (KINETIS_SYSCLK_FREQUENCY / 1000000L / 4)
# endif
# endif
# define waitInputPinDelay() wait_cpuclock(GPIO_INPUT_PIN_DELAY)

View file

@ -843,7 +843,7 @@ void rgblight_update_sync(rgblight_syncinfo_t *syncinfo, bool write_to_eeprom) {
animation_status.restart = true;
}
# endif /* RGBLIGHT_SPLIT_NO_ANIMATION_SYNC */
# endif /* RGBLIGHT_USE_TIMER */
# endif /* RGBLIGHT_USE_TIMER */
}
#endif /* RGBLIGHT_SPLIT */

View file

@ -264,7 +264,7 @@ bool matrix_post_scan(void) {
// reset other half if disconnected
for (int i = 0; i < ROWS_PER_HAND; ++i) {
matrix[thatHand + i] = 0;
slave_matrix[i] = 0;
slave_matrix[i] = 0;
}
changed = true;

View file

@ -40,7 +40,7 @@ typedef struct _I2C_slave_buffer_t {
# endif
# endif
# ifdef BACKLIGHT_ENABLE
uint8_t backlight_level;
uint8_t backlight_level;
# endif
# if defined(RGBLIGHT_ENABLE) && defined(RGBLIGHT_SPLIT)
rgblight_syncinfo_t rgblight_sync;
@ -172,9 +172,9 @@ void transport_slave(matrix_row_t matrix[]) {
# ifdef SPLIT_MODS_ENABLE
set_mods(i2c_buffer->real_mods);
set_weak_mods(i2c_buffer->weak_mods);
# ifndef NO_ACTION_ONESHOT
# ifndef NO_ACTION_ONESHOT
set_oneshot_mods(i2c_buffer->oneshot_mods);
# endif
# endif
# endif
}
@ -191,27 +191,27 @@ typedef struct _Serial_s2m_buffer_t {
matrix_row_t smatrix[ROWS_PER_HAND];
# ifdef ENCODER_ENABLE
uint8_t encoder_state[NUMBER_OF_ENCODERS];
uint8_t encoder_state[NUMBER_OF_ENCODERS];
# endif
} 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;
# 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;
@ -317,18 +317,18 @@ bool transport_master(matrix_row_t matrix[]) {
# ifdef WPM_ENABLE
// Write wpm to slave
serial_m2s_buffer.current_wpm = get_current_wpm();
serial_m2s_buffer.current_wpm = get_current_wpm();
# endif
# ifdef SPLIT_MODS_ENABLE
serial_m2s_buffer.real_mods = get_mods();
serial_m2s_buffer.weak_mods = get_weak_mods();
serial_m2s_buffer.real_mods = get_mods();
serial_m2s_buffer.weak_mods = get_weak_mods();
# ifndef NO_ACTION_ONESHOT
serial_m2s_buffer.oneshot_mods = get_oneshot_mods();
# endif
# endif
# ifndef DISABLE_SYNC_TIMER
serial_m2s_buffer.sync_timer = sync_timer_read32() + SYNC_TIMER_OFFSET;
serial_m2s_buffer.sync_timer = sync_timer_read32() + SYNC_TIMER_OFFSET;
# endif
return true;
}