diff options
| author | QMK Bot <hello@qmk.fm> | 2020-08-29 22:57:48 +0000 |
|---|---|---|
| committer | QMK Bot <hello@qmk.fm> | 2020-08-29 22:57:48 +0000 |
| commit | a3db72df7299140e52f57d082a3742a8b480a226 (patch) | |
| tree | 41d62db0fecd2eb0aeae1744b52e677555e55288 /tmk_core/protocol | |
| parent | 000eb14d789f84afc7dbd33955dbfb6481792f0b (diff) | |
| download | qmk_firmware-a3db72df7299140e52f57d082a3742a8b480a226.tar.gz qmk_firmware-a3db72df7299140e52f57d082a3742a8b480a226.zip | |
format code according to conventions [skip ci]
Diffstat (limited to 'tmk_core/protocol')
| -rw-r--r-- | tmk_core/protocol/chibios/usb_main.c | 28 | ||||
| -rw-r--r-- | tmk_core/protocol/lufa/adafruit_ble.h | 4 | ||||
| -rw-r--r-- | tmk_core/protocol/lufa/lufa.c | 28 |
3 files changed, 34 insertions, 26 deletions
diff --git a/tmk_core/protocol/chibios/usb_main.c b/tmk_core/protocol/chibios/usb_main.c index 68c61cf55..ae33e86a7 100644 --- a/tmk_core/protocol/chibios/usb_main.c +++ b/tmk_core/protocol/chibios/usb_main.c | |||
| @@ -888,39 +888,43 @@ void virtser_task(void) { | |||
| 888 | void send_joystick_packet(joystick_t *joystick) { | 888 | void send_joystick_packet(joystick_t *joystick) { |
| 889 | joystick_report_t rep = { | 889 | joystick_report_t rep = { |
| 890 | # if JOYSTICK_AXES_COUNT > 0 | 890 | # if JOYSTICK_AXES_COUNT > 0 |
| 891 | .axes = {joystick->axes[0], | 891 | .axes = |
| 892 | { | ||
| 893 | joystick->axes[0], | ||
| 892 | 894 | ||
| 893 | # if JOYSTICK_AXES_COUNT >= 2 | 895 | # if JOYSTICK_AXES_COUNT >= 2 |
| 894 | joystick->axes[1], | 896 | joystick->axes[1], |
| 895 | # endif | 897 | # endif |
| 896 | # if JOYSTICK_AXES_COUNT >= 3 | 898 | # if JOYSTICK_AXES_COUNT >= 3 |
| 897 | joystick->axes[2], | 899 | joystick->axes[2], |
| 898 | # endif | 900 | # endif |
| 899 | # if JOYSTICK_AXES_COUNT >= 4 | 901 | # if JOYSTICK_AXES_COUNT >= 4 |
| 900 | joystick->axes[3], | 902 | joystick->axes[3], |
| 901 | # endif | 903 | # endif |
| 902 | # if JOYSTICK_AXES_COUNT >= 5 | 904 | # if JOYSTICK_AXES_COUNT >= 5 |
| 903 | joystick->axes[4], | 905 | joystick->axes[4], |
| 904 | # endif | 906 | # endif |
| 905 | # if JOYSTICK_AXES_COUNT >= 6 | 907 | # if JOYSTICK_AXES_COUNT >= 6 |
| 906 | joystick->axes[5], | 908 | joystick->axes[5], |
| 907 | # endif | 909 | # endif |
| 908 | }, | 910 | }, |
| 909 | # endif // JOYSTICK_AXES_COUNT>0 | 911 | # endif // JOYSTICK_AXES_COUNT>0 |
| 910 | 912 | ||
| 911 | # if JOYSTICK_BUTTON_COUNT > 0 | 913 | # if JOYSTICK_BUTTON_COUNT > 0 |
| 912 | .buttons = {joystick->buttons[0], | 914 | .buttons = |
| 915 | { | ||
| 916 | joystick->buttons[0], | ||
| 913 | 917 | ||
| 914 | # if JOYSTICK_BUTTON_COUNT > 8 | 918 | # if JOYSTICK_BUTTON_COUNT > 8 |
| 915 | joystick->buttons[1], | 919 | joystick->buttons[1], |
| 916 | # endif | 920 | # endif |
| 917 | # if JOYSTICK_BUTTON_COUNT > 16 | 921 | # if JOYSTICK_BUTTON_COUNT > 16 |
| 918 | joystick->buttons[2], | 922 | joystick->buttons[2], |
| 919 | # endif | 923 | # endif |
| 920 | # if JOYSTICK_BUTTON_COUNT > 24 | 924 | # if JOYSTICK_BUTTON_COUNT > 24 |
| 921 | joystick->buttons[3], | 925 | joystick->buttons[3], |
| 922 | # endif | 926 | # endif |
| 923 | } | 927 | } |
| 924 | # endif // JOYSTICK_BUTTON_COUNT>0 | 928 | # endif // JOYSTICK_BUTTON_COUNT>0 |
| 925 | }; | 929 | }; |
| 926 | 930 | ||
diff --git a/tmk_core/protocol/lufa/adafruit_ble.h b/tmk_core/protocol/lufa/adafruit_ble.h index aebded7b3..9dfc9b435 100644 --- a/tmk_core/protocol/lufa/adafruit_ble.h +++ b/tmk_core/protocol/lufa/adafruit_ble.h | |||
| @@ -41,12 +41,12 @@ extern bool adafruit_ble_send_keys(uint8_t hid_modifier_mask, uint8_t *keys, uin | |||
| 41 | * (milliseconds) */ | 41 | * (milliseconds) */ |
| 42 | extern bool adafruit_ble_send_consumer_key(uint16_t keycode, int hold_duration); | 42 | extern bool adafruit_ble_send_consumer_key(uint16_t keycode, int hold_duration); |
| 43 | 43 | ||
| 44 | # ifdef MOUSE_ENABLE | 44 | #ifdef MOUSE_ENABLE |
| 45 | /* Send a mouse/wheel movement report. | 45 | /* Send a mouse/wheel movement report. |
| 46 | * The parameters are signed and indicate positive of negative direction | 46 | * The parameters are signed and indicate positive of negative direction |
| 47 | * change. */ | 47 | * change. */ |
| 48 | extern bool adafruit_ble_send_mouse_move(int8_t x, int8_t y, int8_t scroll, int8_t pan, uint8_t buttons); | 48 | extern bool adafruit_ble_send_mouse_move(int8_t x, int8_t y, int8_t scroll, int8_t pan, uint8_t buttons); |
| 49 | # endif | 49 | #endif |
| 50 | 50 | ||
| 51 | /* Compute battery voltage by reading an analog pin. | 51 | /* Compute battery voltage by reading an analog pin. |
| 52 | * Returns the integer number of millivolts */ | 52 | * Returns the integer number of millivolts */ |
diff --git a/tmk_core/protocol/lufa/lufa.c b/tmk_core/protocol/lufa/lufa.c index 09ba0bacf..cec004402 100644 --- a/tmk_core/protocol/lufa/lufa.c +++ b/tmk_core/protocol/lufa/lufa.c | |||
| @@ -316,39 +316,43 @@ void send_joystick_packet(joystick_t *joystick) { | |||
| 316 | 316 | ||
| 317 | joystick_report_t r = { | 317 | joystick_report_t r = { |
| 318 | # if JOYSTICK_AXES_COUNT > 0 | 318 | # if JOYSTICK_AXES_COUNT > 0 |
| 319 | .axes = {joystick->axes[0], | 319 | .axes = |
| 320 | { | ||
| 321 | joystick->axes[0], | ||
| 320 | 322 | ||
| 321 | # if JOYSTICK_AXES_COUNT >= 2 | 323 | # if JOYSTICK_AXES_COUNT >= 2 |
| 322 | joystick->axes[1], | 324 | joystick->axes[1], |
| 323 | # endif | 325 | # endif |
| 324 | # if JOYSTICK_AXES_COUNT >= 3 | 326 | # if JOYSTICK_AXES_COUNT >= 3 |
| 325 | joystick->axes[2], | 327 | joystick->axes[2], |
| 326 | # endif | 328 | # endif |
| 327 | # if JOYSTICK_AXES_COUNT >= 4 | 329 | # if JOYSTICK_AXES_COUNT >= 4 |
| 328 | joystick->axes[3], | 330 | joystick->axes[3], |
| 329 | # endif | 331 | # endif |
| 330 | # if JOYSTICK_AXES_COUNT >= 5 | 332 | # if JOYSTICK_AXES_COUNT >= 5 |
| 331 | joystick->axes[4], | 333 | joystick->axes[4], |
| 332 | # endif | 334 | # endif |
| 333 | # if JOYSTICK_AXES_COUNT >= 6 | 335 | # if JOYSTICK_AXES_COUNT >= 6 |
| 334 | joystick->axes[5], | 336 | joystick->axes[5], |
| 335 | # endif | 337 | # endif |
| 336 | }, | 338 | }, |
| 337 | # endif // JOYSTICK_AXES_COUNT>0 | 339 | # endif // JOYSTICK_AXES_COUNT>0 |
| 338 | 340 | ||
| 339 | # if JOYSTICK_BUTTON_COUNT > 0 | 341 | # if JOYSTICK_BUTTON_COUNT > 0 |
| 340 | .buttons = {joystick->buttons[0], | 342 | .buttons = |
| 343 | { | ||
| 344 | joystick->buttons[0], | ||
| 341 | 345 | ||
| 342 | # if JOYSTICK_BUTTON_COUNT > 8 | 346 | # if JOYSTICK_BUTTON_COUNT > 8 |
| 343 | joystick->buttons[1], | 347 | joystick->buttons[1], |
| 344 | # endif | 348 | # endif |
| 345 | # if JOYSTICK_BUTTON_COUNT > 16 | 349 | # if JOYSTICK_BUTTON_COUNT > 16 |
| 346 | joystick->buttons[2], | 350 | joystick->buttons[2], |
| 347 | # endif | 351 | # endif |
| 348 | # if JOYSTICK_BUTTON_COUNT > 24 | 352 | # if JOYSTICK_BUTTON_COUNT > 24 |
| 349 | joystick->buttons[3], | 353 | joystick->buttons[3], |
| 350 | # endif | 354 | # endif |
| 351 | } | 355 | } |
| 352 | # endif // JOYSTICK_BUTTON_COUNT>0 | 356 | # endif // JOYSTICK_BUTTON_COUNT>0 |
| 353 | }; | 357 | }; |
| 354 | 358 | ||
