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/lufa | |
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/lufa')
-rw-r--r-- | tmk_core/protocol/lufa/adafruit_ble.h | 4 | ||||
-rw-r--r-- | tmk_core/protocol/lufa/lufa.c | 28 |
2 files changed, 18 insertions, 14 deletions
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 | ||