1
0
Fork 0

Format code according to conventions (#16419)

This commit is contained in:
QMK Bot 2022-02-21 09:44:27 -08:00 committed by GitHub
parent 3290377918
commit 2f0dc0fb6d
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
6 changed files with 320 additions and 329 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

@ -834,8 +834,7 @@ 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;
@ -865,21 +864,19 @@ 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) { host_system_send(KEYCODE2SYSTEM(code)); }
else if
IS_CONSUMER(code) { host_consumer_send(KEYCODE2CONSUMER(code)); }
else if IS_SYSTEM (code) {
host_system_send(KEYCODE2SYSTEM(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();
}
@ -927,23 +924,19 @@ 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) {
host_system_send(0);
} else if IS_CONSUMER (code) {
host_consumer_send(0);
}
else if
IS_SYSTEM(code) { host_system_send(0); }
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

@ -596,8 +596,7 @@ void udd_set_address(uint8_t address) { usb_device_set_address(&usb_device, addr
uint8_t udd_getaddress(void) { return usb_device_get_address(&usb_device); }
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--) {