Format code according to conventions (#16421)

This commit is contained in:
QMK Bot 2022-02-21 08:29:54 -08:00 committed by GitHub
parent a44abeb99a
commit 25ba9b41c1
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
6 changed files with 320 additions and 337 deletions

View File

@ -125,8 +125,7 @@ uint8_t ps2_host_recv_response(void) {
// Command may take 25ms/20ms at most([5]p.46, [3]p.21)
// 250 * 100us(wait for start bit in ps2_host_recv)
uint8_t data = 0;
uint8_t try
= 250;
uint8_t try = 250;
do {
data = ps2_host_recv();
} while (try-- && ps2_error);

View File

@ -833,8 +833,7 @@ __attribute__((weak)) void register_code(uint8_t code) {
}
#endif
else if
IS_KEY(code) {
else if IS_KEY (code) {
// TODO: should push command_proc out of this block?
if (command_proc(code)) return;
@ -864,25 +863,19 @@ __attribute__((weak)) void register_code(uint8_t code) {
add_key(code);
send_keyboard_report();
}
}
else if
IS_MOD(code) {
} else if IS_MOD (code) {
add_mods(MOD_BIT(code));
send_keyboard_report();
}
#ifdef EXTRAKEY_ENABLE
else if
IS_SYSTEM(code) {
else if IS_SYSTEM (code) {
host_system_send(KEYCODE2SYSTEM(code));
}
else if
IS_CONSUMER(code) {
} else if IS_CONSUMER (code) {
host_consumer_send(KEYCODE2CONSUMER(code));
}
#endif
#ifdef MOUSEKEY_ENABLE
else if
IS_MOUSEKEY(code) {
else if IS_MOUSEKEY (code) {
mousekey_on(code);
mousekey_send();
}
@ -930,27 +923,19 @@ __attribute__((weak)) void unregister_code(uint8_t code) {
}
#endif
else if
IS_KEY(code) {
else if IS_KEY (code) {
del_key(code);
send_keyboard_report();
}
else if
IS_MOD(code) {
} else if IS_MOD (code) {
del_mods(MOD_BIT(code));
send_keyboard_report();
}
else if
IS_SYSTEM(code) {
} else if IS_SYSTEM (code) {
host_system_send(0);
}
else if
IS_CONSUMER(code) {
} else if IS_CONSUMER (code) {
host_consumer_send(0);
}
#ifdef MOUSEKEY_ENABLE
else if
IS_MOUSEKEY(code) {
else if IS_MOUSEKEY (code) {
mousekey_off(code);
mousekey_send();
}

View File

@ -608,8 +608,7 @@ uint8_t udd_getaddress(void) {
}
void udd_send_remotewakeup(void) {
uint32_t try
= 5;
uint32_t try = 5;
udd_wait_clock_ready();
udd_sleep_mode(UDD_STATE_IDLE);
while (2 != usb_get_state_machine_status(&usb_device) && try--) {