diff options
| author | QMK Bot <hello@qmk.fm> | 2021-11-17 12:28:38 -0800 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2021-11-18 07:28:38 +1100 |
| commit | 2c5d66987da4c7d5857cab8b09c4f852b4d8e4d9 (patch) | |
| tree | 3ddc4f2cc572c632a0027d31d6e3e86af03591bc /tmk_core | |
| parent | b06740c933c63a8f82e0a7112f9eeab9bd93687a (diff) | |
| download | qmk_firmware-2c5d66987da4c7d5857cab8b09c4f852b4d8e4d9.tar.gz qmk_firmware-2c5d66987da4c7d5857cab8b09c4f852b4d8e4d9.zip | |
Format code according to conventions (#15193)
Diffstat (limited to 'tmk_core')
| -rw-r--r-- | tmk_core/common/chibios/sleep_led.c | 4 | ||||
| -rw-r--r-- | tmk_core/common/report.c | 4 | ||||
| -rw-r--r-- | tmk_core/protocol/ps2_mouse.c | 4 |
3 files changed, 6 insertions, 6 deletions
diff --git a/tmk_core/common/chibios/sleep_led.c b/tmk_core/common/chibios/sleep_led.c index 1c65016a4..477056a45 100644 --- a/tmk_core/common/chibios/sleep_led.c +++ b/tmk_core/common/chibios/sleep_led.c | |||
| @@ -65,7 +65,7 @@ void sleep_led_timer_callback(void) { | |||
| 65 | 65 | ||
| 66 | /* LPTMR clock options */ | 66 | /* LPTMR clock options */ |
| 67 | # define LPTMR_CLOCK_MCGIRCLK 0 /* 4MHz clock */ | 67 | # define LPTMR_CLOCK_MCGIRCLK 0 /* 4MHz clock */ |
| 68 | # define LPTMR_CLOCK_LPO 1 /* 1kHz clock */ | 68 | # define LPTMR_CLOCK_LPO 1 /* 1kHz clock */ |
| 69 | # define LPTMR_CLOCK_ERCLK32K 2 /* external 32kHz crystal */ | 69 | # define LPTMR_CLOCK_ERCLK32K 2 /* external 32kHz crystal */ |
| 70 | # define LPTMR_CLOCK_OSCERCLK 3 /* output from OSC */ | 70 | # define LPTMR_CLOCK_OSCERCLK 3 /* output from OSC */ |
| 71 | 71 | ||
| @@ -121,7 +121,7 @@ void sleep_led_init(void) { | |||
| 121 | MCG->C2 |= MCG_C2_IRCS; // fast (4MHz) internal ref clock | 121 | MCG->C2 |= MCG_C2_IRCS; // fast (4MHz) internal ref clock |
| 122 | # if defined(KL27) // divide the 8MHz IRC by 2, to have the same MCGIRCLK speed as others | 122 | # if defined(KL27) // divide the 8MHz IRC by 2, to have the same MCGIRCLK speed as others |
| 123 | MCG->MC |= MCG_MC_LIRC_DIV2_DIV2; | 123 | MCG->MC |= MCG_MC_LIRC_DIV2_DIV2; |
| 124 | # endif /* KL27 */ | 124 | # endif /* KL27 */ |
| 125 | MCG->C1 |= MCG_C1_IRCLKEN; // enable internal ref clock | 125 | MCG->C1 |= MCG_C1_IRCLKEN; // enable internal ref clock |
| 126 | // to work in stop mode, also MCG_C1_IREFSTEN | 126 | // to work in stop mode, also MCG_C1_IREFSTEN |
| 127 | // Divide 4MHz by 2^N (N=6) => 62500 irqs/sec => | 127 | // Divide 4MHz by 2^N (N=6) => 62500 irqs/sec => |
diff --git a/tmk_core/common/report.c b/tmk_core/common/report.c index 2a7fc006c..854b59ae4 100644 --- a/tmk_core/common/report.c +++ b/tmk_core/common/report.c | |||
| @@ -24,8 +24,8 @@ | |||
| 24 | #ifdef RING_BUFFERED_6KRO_REPORT_ENABLE | 24 | #ifdef RING_BUFFERED_6KRO_REPORT_ENABLE |
| 25 | # define RO_ADD(a, b) ((a + b) % KEYBOARD_REPORT_KEYS) | 25 | # define RO_ADD(a, b) ((a + b) % KEYBOARD_REPORT_KEYS) |
| 26 | # define RO_SUB(a, b) ((a - b + KEYBOARD_REPORT_KEYS) % KEYBOARD_REPORT_KEYS) | 26 | # define RO_SUB(a, b) ((a - b + KEYBOARD_REPORT_KEYS) % KEYBOARD_REPORT_KEYS) |
| 27 | # define RO_INC(a) RO_ADD(a, 1) | 27 | # define RO_INC(a) RO_ADD(a, 1) |
| 28 | # define RO_DEC(a) RO_SUB(a, 1) | 28 | # define RO_DEC(a) RO_SUB(a, 1) |
| 29 | static int8_t cb_head = 0; | 29 | static int8_t cb_head = 0; |
| 30 | static int8_t cb_tail = 0; | 30 | static int8_t cb_tail = 0; |
| 31 | static int8_t cb_count = 0; | 31 | static int8_t cb_count = 0; |
diff --git a/tmk_core/protocol/ps2_mouse.c b/tmk_core/protocol/ps2_mouse.c index 39251a643..43c88084d 100644 --- a/tmk_core/protocol/ps2_mouse.c +++ b/tmk_core/protocol/ps2_mouse.c | |||
| @@ -158,8 +158,8 @@ static inline void ps2_mouse_convert_report_to_hid(report_mouse_t *mouse_report) | |||
| 158 | 158 | ||
| 159 | #ifdef PS2_MOUSE_INVERT_BUTTONS | 159 | #ifdef PS2_MOUSE_INVERT_BUTTONS |
| 160 | // swap left & right buttons | 160 | // swap left & right buttons |
| 161 | uint8_t needs_left = mouse_report->buttons & PS2_MOUSE_BTN_RIGHT; | 161 | uint8_t needs_left = mouse_report->buttons & PS2_MOUSE_BTN_RIGHT; |
| 162 | uint8_t needs_right = mouse_report->buttons & PS2_MOUSE_BTN_LEFT; | 162 | uint8_t needs_right = mouse_report->buttons & PS2_MOUSE_BTN_LEFT; |
| 163 | mouse_report->buttons = (mouse_report->buttons & ~(PS2_MOUSE_BTN_MASK)) | (needs_left ? PS2_MOUSE_BTN_LEFT : 0) | (needs_right ? PS2_MOUSE_BTN_RIGHT : 0); | 163 | mouse_report->buttons = (mouse_report->buttons & ~(PS2_MOUSE_BTN_MASK)) | (needs_left ? PS2_MOUSE_BTN_LEFT : 0) | (needs_right ? PS2_MOUSE_BTN_RIGHT : 0); |
| 164 | #else | 164 | #else |
| 165 | // remove sign and overflow flags | 165 | // remove sign and overflow flags |
