Format code according to conventions (#15193)
This commit is contained in:
parent
b06740c933
commit
2c5d66987d
35 changed files with 576 additions and 516 deletions
|
@ -65,7 +65,7 @@ void sleep_led_timer_callback(void) {
|
|||
|
||||
/* LPTMR clock options */
|
||||
# define LPTMR_CLOCK_MCGIRCLK 0 /* 4MHz clock */
|
||||
# define LPTMR_CLOCK_LPO 1 /* 1kHz clock */
|
||||
# define LPTMR_CLOCK_LPO 1 /* 1kHz clock */
|
||||
# define LPTMR_CLOCK_ERCLK32K 2 /* external 32kHz crystal */
|
||||
# define LPTMR_CLOCK_OSCERCLK 3 /* output from OSC */
|
||||
|
||||
|
@ -121,7 +121,7 @@ void sleep_led_init(void) {
|
|||
MCG->C2 |= MCG_C2_IRCS; // fast (4MHz) internal ref clock
|
||||
# if defined(KL27) // divide the 8MHz IRC by 2, to have the same MCGIRCLK speed as others
|
||||
MCG->MC |= MCG_MC_LIRC_DIV2_DIV2;
|
||||
# endif /* KL27 */
|
||||
# endif /* KL27 */
|
||||
MCG->C1 |= MCG_C1_IRCLKEN; // enable internal ref clock
|
||||
// to work in stop mode, also MCG_C1_IREFSTEN
|
||||
// Divide 4MHz by 2^N (N=6) => 62500 irqs/sec =>
|
||||
|
|
|
@ -24,8 +24,8 @@
|
|||
#ifdef RING_BUFFERED_6KRO_REPORT_ENABLE
|
||||
# define RO_ADD(a, b) ((a + b) % KEYBOARD_REPORT_KEYS)
|
||||
# define RO_SUB(a, b) ((a - b + KEYBOARD_REPORT_KEYS) % KEYBOARD_REPORT_KEYS)
|
||||
# define RO_INC(a) RO_ADD(a, 1)
|
||||
# define RO_DEC(a) RO_SUB(a, 1)
|
||||
# define RO_INC(a) RO_ADD(a, 1)
|
||||
# define RO_DEC(a) RO_SUB(a, 1)
|
||||
static int8_t cb_head = 0;
|
||||
static int8_t cb_tail = 0;
|
||||
static int8_t cb_count = 0;
|
||||
|
|
|
@ -158,8 +158,8 @@ static inline void ps2_mouse_convert_report_to_hid(report_mouse_t *mouse_report)
|
|||
|
||||
#ifdef PS2_MOUSE_INVERT_BUTTONS
|
||||
// swap left & right buttons
|
||||
uint8_t needs_left = mouse_report->buttons & PS2_MOUSE_BTN_RIGHT;
|
||||
uint8_t needs_right = mouse_report->buttons & PS2_MOUSE_BTN_LEFT;
|
||||
uint8_t needs_left = mouse_report->buttons & PS2_MOUSE_BTN_RIGHT;
|
||||
uint8_t needs_right = mouse_report->buttons & PS2_MOUSE_BTN_LEFT;
|
||||
mouse_report->buttons = (mouse_report->buttons & ~(PS2_MOUSE_BTN_MASK)) | (needs_left ? PS2_MOUSE_BTN_LEFT : 0) | (needs_right ? PS2_MOUSE_BTN_RIGHT : 0);
|
||||
#else
|
||||
// remove sign and overflow flags
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue