aboutsummaryrefslogtreecommitdiff
path: root/quantum
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
parente702c7f1b4cfa8fe1579498ef2877994baa64056 (diff)
downloadqmk_firmware-31c57aab35e6fd49c4c8336f449419afe7630e93.tar.gz
qmk_firmware-31c57aab35e6fd49c4c8336f449419afe7630e93.zip
`qmk cformat`
Diffstat (limited to 'quantum')
-rw-r--r--quantum/quantum.c8
-rw-r--r--quantum/quantum.h4
-rw-r--r--quantum/rgblight.c2
-rw-r--r--quantum/split_common/matrix.c2
-rw-r--r--quantum/split_common/transport.c26
5 files changed, 21 insertions, 21 deletions
diff --git a/quantum/quantum.c b/quantum/quantum.c
index ece0388d3..8db801f19 100644
--- a/quantum/quantum.c
+++ b/quantum/quantum.c
@@ -551,10 +551,10 @@ void send_char(char ascii_code) {
551 } 551 }
552#endif 552#endif
553 553
554 uint8_t keycode = pgm_read_byte(&ascii_to_keycode_lut[(uint8_t)ascii_code]); 554 uint8_t keycode = pgm_read_byte(&ascii_to_keycode_lut[(uint8_t)ascii_code]);
555 bool is_shifted = PGM_LOADBIT(ascii_to_shift_lut, (uint8_t)ascii_code); 555 bool is_shifted = PGM_LOADBIT(ascii_to_shift_lut, (uint8_t)ascii_code);
556 bool is_altgred = PGM_LOADBIT(ascii_to_altgr_lut, (uint8_t)ascii_code); 556 bool is_altgred = PGM_LOADBIT(ascii_to_altgr_lut, (uint8_t)ascii_code);
557 bool is_dead = PGM_LOADBIT(ascii_to_dead_lut, (uint8_t)ascii_code); 557 bool is_dead = PGM_LOADBIT(ascii_to_dead_lut, (uint8_t)ascii_code);
558 558
559 if (is_shifted) { 559 if (is_shifted) {
560 register_code(KC_LSFT); 560 register_code(KC_LSFT);
diff --git a/quantum/quantum.h b/quantum/quantum.h
index d234e6ea0..370a65fe0 100644
--- a/quantum/quantum.h
+++ b/quantum/quantum.h
@@ -248,9 +248,9 @@ typedef ioline_t pin_t;
248 */ 248 */
249# if !defined(GPIO_INPUT_PIN_DELAY) 249# if !defined(GPIO_INPUT_PIN_DELAY)
250# if defined(STM32_SYSCLK) 250# if defined(STM32_SYSCLK)
251# define GPIO_INPUT_PIN_DELAY (STM32_SYSCLK/1000000L / 4) 251# define GPIO_INPUT_PIN_DELAY (STM32_SYSCLK / 1000000L / 4)
252# elif defined(KINETIS_SYSCLK_FREQUENCY) 252# elif defined(KINETIS_SYSCLK_FREQUENCY)
253# define GPIO_INPUT_PIN_DELAY (KINETIS_SYSCLK_FREQUENCY/1000000L / 4) 253# define GPIO_INPUT_PIN_DELAY (KINETIS_SYSCLK_FREQUENCY / 1000000L / 4)
254# endif 254# endif
255# endif 255# endif
256# define waitInputPinDelay() wait_cpuclock(GPIO_INPUT_PIN_DELAY) 256# define waitInputPinDelay() wait_cpuclock(GPIO_INPUT_PIN_DELAY)
diff --git a/quantum/rgblight.c b/quantum/rgblight.c
index b16c3e7c2..44e9eade5 100644
--- a/quantum/rgblight.c
+++ b/quantum/rgblight.c
@@ -843,7 +843,7 @@ void rgblight_update_sync(rgblight_syncinfo_t *syncinfo, bool write_to_eeprom) {
843 animation_status.restart = true; 843 animation_status.restart = true;
844 } 844 }
845# endif /* RGBLIGHT_SPLIT_NO_ANIMATION_SYNC */ 845# endif /* RGBLIGHT_SPLIT_NO_ANIMATION_SYNC */
846# endif /* RGBLIGHT_USE_TIMER */ 846# endif /* RGBLIGHT_USE_TIMER */
847} 847}
848#endif /* RGBLIGHT_SPLIT */ 848#endif /* RGBLIGHT_SPLIT */
849 849
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}