From ff5983b9d4c884efcdfebc03c9ea1b848f902395 Mon Sep 17 00:00:00 2001 From: freznel10 Date: Sun, 22 Jan 2023 21:38:15 +0800 Subject: [PATCH] Squashed commit of the following: commit d04dbd9eb02bd4ff6ba17c5ae1a8793e83e1022a Author: Alabastard-64 Date: Sat Jan 21 23:46:39 2023 -0700 cleanup and force max multiplier to simplify (multiplier can be adjusted at runtime) commit 22170a67c018c6e0ea481187a95bf0c461113e91 Author: Alabastard-64 Date: Sat Jan 21 18:52:18 2023 -0700 fixing up arm code from rebase commit e440046b2ca1c05ab002ace19b512b20a7fef60b Author: Alabastard-64 Date: Tue Jan 17 07:30:05 2023 -0700 rebase and cleanup commit c14127c278979d35d21ac10140c3a44825375479 Author: Alabastard-64 Date: Tue Jan 17 07:18:10 2023 -0700 finally fix hscroll fully and add maybe ability to change multiplier at runtime commit ec686daf3f2dfd56b671baf9c91f65521413c0a4 Author: Alabastard-64 Date: Mon Jan 16 13:44:14 2023 -0700 major update/revision most issues fixed commit 591cedb3cb2c6d121ea34d12a5197c4d7230f868 Author: Alabastard-64 Date: Tue Jan 10 22:54:48 2023 -0700 bugfix for disable function commit d6b4def50eaca9aca3de81b57057d3b7d40ac9fa Author: Alabastard-64 Date: Tue Jan 10 21:32:56 2023 -0700 Fix HID descriptor for Horizontal scroll, add disable function, and various bugfixes commit badb248dec422475b0d292d277f69720af30e0d5 Author: Alabastard-64 Date: Sat Jan 7 22:55:18 2023 -0700 linting except on vusb and doc update commit 4fc1b535a88358b8d44be4526ad41e81f908c616 Author: Alabastard-64 Date: Sat Jan 7 21:49:47 2023 -0700 all tested versions working and doc commit af2036177533ee57fb419575bac7227f13e7c688 Author: Alabastard-64 Date: Fri Jan 6 11:53:00 2023 -0700 real initial release everything working and tested on Atmel U4 chips commit a6d541784cb8c7665d19863c41f44efb083d322d Author: Alabastard-64 Date: Wed Jan 4 12:15:44 2023 -0700 update: not broken... but not working either commit 7a0769bae180b0b374851e5b156637033ad897b0 Author: Alabastard-64 Date: Mon Jan 2 09:51:37 2023 -0700 initial commit (currently broken...) commit 49c5f6ca7875d7f73fcd387ed9e98e862bda1726 Author: Alabastard-64 Date: Fri Dec 23 14:58:39 2022 -0700 doc update commit 5e9fc72376a23852a0b6acd4fbfbd055c29377ef Author: Alabastard-64 Date: Fri Dec 23 14:51:37 2022 -0700 linting commit 5a2741d2874b0d911b294fe9dc214eaa5d4fe8f4 Author: Alabastard-64 Date: Thu Dec 22 19:13:24 2022 -0700 fixes and doc improvements commit 8588277dc401f841a892b4b1fbfc76511c881f53 Author: Alabastard-64 Date: Wed Dec 21 23:07:52 2022 -0700 fix previous changes to precision mode now working as intended additional mode fixes commit ee24b83c95ea385aee4835e1068fcefdaf4485e2 Author: Alabastard-64 Date: Wed Dec 21 20:29:11 2022 -0700 doc update and precision changes commit e6cb3be3d17137767331bfdddc5cb24936a01ef3 Author: Alabastard-64 Date: Tue Dec 13 00:53:47 2022 -0700 more doc updates/code cleanup commit 82686e2b34f3a1a7cab3abced56885df068b707f Author: Alabastard-64 Date: Tue Dec 13 00:20:15 2022 -0700 code and doc fixup commit 25b3f433585762265616639f970ebada9d8a824e Author: Alabastard-64 Date: Mon Dec 12 23:10:19 2022 -0700 update and linting commit c6b548f7a61a44995f8a43d27b088c55c2bb98a5 Author: Alabastard-64 Date: Sun Dec 11 21:08:08 2022 -0700 post rebase/squash cleanup commit 0a98d219ff06e44ea3c3005baa24a5ddad507c21 Author: Alabastard-64 <96358682+Alabastard-64@users.noreply.github.com> Date: Tue Aug 30 01:23:41 2022 -0600 parent c6ab70ef0da206e667fd1205536805c379cde26f author Alabastard-64 <96358682+Alabastard-64@users.noreply.github.com> 1661844221 -0600 committer Alabastard-64 1670816485 -0700 parent c6ab70ef0da206e667fd1205536805c379cde26f author Alabastard-64 <96358682+Alabastard-64@users.noreply.github.com> 1661844221 -0600 committer Alabastard-64 1670813789 -0700 parent c6ab70ef0da206e667fd1205536805c379cde26f author Alabastard-64 <96358682+Alabastard-64@users.noreply.github.com> 1661844221 -0600 committer Alabastard-64 1670812067 -0700 Squashed all previous Commits commit 713003b7fdf2e313b60ece775477e8791e948e20 Merge: cf935d97ae 300a0def4e Author: QMK Bot Date: Fri Jan 20 19:43:58 2023 +0000 Merge remote-tracking branch 'origin/master' into develop commit 300a0def4e20507f20b61507ed3dc3c65f3bf6a0 Author: era <73109780+eerraa@users.noreply.github.com> Date: Sat Jan 21 04:43:11 2023 +0900 Change era65 keymap&debounce_type (#19627) commit cf935d97ae479e7a1e1f2f2f248b93e52e4cc69e Author: Ryan Date: Sat Jan 21 03:21:17 2023 +1100 Fix functions with empty params (#19647) * Fix functions with empty params * Found a bunch more --- docs/feature_pointing_device.md | 4 +- docs/gpio_control.md | 2 +- docs/quantum_painter_lvgl.md | 2 +- drivers/lcd/hd44780.c | 2 +- drivers/sensors/adns9800.c | 2 +- drivers/sensors/cirque_pinnacle.c | 2 +- drivers/usb2422.c | 8 +- .../gherkin/keymaps/mjt/keymap.c | 4 +- .../gherkin/keymaps/steno/keymap.c | 2 +- .../mf68/keymaps/delivrance/keymap.c | 2 +- keyboards/40percentclub/ut47/ut47.c | 2 +- keyboards/annepro2/annepro2.c | 2 +- keyboards/annepro2/ap2_led.c | 12 +- keyboards/bemeier/bmek/bmek.c | 2 +- .../bpiphany/frosty_flake/20130602/20130602.c | 2 +- .../bpiphany/frosty_flake/20140521/20140521.c | 2 +- .../satisfaction75/satisfaction75.c | 4 +- .../satisfaction75/satisfaction_encoder.c | 10 +- .../satisfaction75/satisfaction_oled.c | 4 +- keyboards/capsunlocked/cu75/cu75.c | 2 +- keyboards/converter/adb_usb/adb.c | 6 +- keyboards/converter/hp_46010a/matrix.c | 2 +- .../ibm_terminal/keymaps/priyadi/keymap.c | 2 +- keyboards/converter/m0110_usb/m0110.c | 12 +- .../oled/avr/master/oled_master_handler.c | 2 +- .../oled/avr/slave/oled_slave_handler.c | 2 +- .../crkbd/keymaps/jpe230/oled/oled_handler.c | 2 +- .../oled/rp2040/master/oled_master_handler.c | 2 +- .../oled/rp2040/slave/oled_slave_handler.c | 2 +- .../spin/keymaps/spidey3_pad/keymap.c | 2 +- keyboards/dp60/matrix.c | 2 +- keyboards/duck/jetfire/jetfire.c | 2 +- keyboards/duck/lightsaver/matrix.c | 2 +- keyboards/dumbpad/v0x/v0x.c | 2 +- .../dumbpad/v0x_dualencoder/v0x_dualencoder.c | 2 +- keyboards/dumbpad/v0x_right/v0x_right.c | 2 +- keyboards/dumbpad/v1x/v1x.c | 2 +- .../dumbpad/v1x_dualencoder/v1x_dualencoder.c | 2 +- keyboards/dumbpad/v1x_right/v1x_right.c | 2 +- keyboards/dumbpad/v3x/v3x.c | 2 +- keyboards/dz60/keymaps/marianas/relativity.c | 4 +- keyboards/eco/keymaps/that_canadian/keymap.c | 4 +- .../babyv/keymaps/bghull/keymap.c | 2 +- keyboards/gboards/butterstick/sten.c | 2 +- keyboards/gboards/engine/engine.c | 4 +- keyboards/gboards/g/engine.c | 4 +- keyboards/gboards/georgi/sten.c | 2 +- .../pro/rev1/ansi/keymaps/andrebrait/keymap.c | 4 +- .../pro/rev1/ansi/keymaps/byungyoonc/keymap.c | 6 +- .../pro/rev1/ansi/keymaps/hachetman/keymap.c | 6 +- .../rev1/ansi/keymaps/lalitmaganti/keymap.c | 4 +- .../gmmk/pro/rev1/ansi/keymaps/macos/keymap.c | 4 +- .../pro/rev1/ansi/keymaps/mike1808/encoder.c | 6 +- .../ansi/keymaps/mike1808/process_record.c | 2 +- .../keymaps/mike1808/rgb_matrix_ledmaps.c | 4 +- .../pro/rev1/ansi/keymaps/mike1808/utils.c | 2 +- .../rev1/ansi/keymaps/stickandgum/keymap.c | 8 +- .../gmmk/pro/rev1/ansi/keymaps/trwnh/keymap.c | 8 +- .../hadron/ver2/keymaps/side_numpad/keymap.c | 4 +- .../atreus50/keymaps/default/keymap.c | 4 +- keyboards/handwired/jotanck/jotanck.c | 2 +- keyboards/handwired/jotpad16/jotpad16.c | 2 +- .../jscotto/scotto36/keymaps/default/keymap.c | 2 +- .../scottocmd/keymaps/default/keymap.c | 2 +- .../onekey/keymaps/digitizer/keymap.c | 2 +- .../onekey/keymaps/joystick/keymap.c | 2 +- .../ortho5x13/keymaps/default/keymap.c | 4 +- .../promethium/keymaps/default/keymap.c | 6 +- .../promethium/keymaps/priyadi/keymap.c | 6 +- keyboards/helix/pico/keymaps/default/keymap.c | 4 +- keyboards/helix/pico/keymaps/mtei/keymap.c | 4 +- keyboards/helix/rev2/keymaps/default/keymap.c | 4 +- keyboards/helix/rev2/keymaps/froggy/keymap.c | 4 +- keyboards/helix/rev2/keymaps/yshrsmz/keymap.c | 4 +- .../keymaps/rick-complicated/keymap.c | 2 +- .../ergodox_infinity/ergodox_infinity.c | 2 +- .../keymaps/dudeofawesome/keymap.c | 2 +- .../k_type/keymaps/andrew-fahmy/keymap.c | 2 +- keyboards/jels/jels88/jels88.c | 2 +- .../kbdfans/niu_mini/keymaps/yttyx/keymap.c | 2 +- .../keebio/iris/keymaps/edvorakjp/keymap.c | 2 +- .../keebio/levinson/keymaps/steno/keymap.c | 2 +- .../knops/mini/keymaps/mverteuil/keymap.c | 2 +- .../dimple/staggered/staggered.c | 4 +- keyboards/lazydesigners/the50/the50.c | 4 +- keyboards/lfkeyboards/TWIlib.c | 4 +- keyboards/lfkeyboards/lfk65_hs/lfk65_hs.c | 2 +- keyboards/lfkeyboards/lfk78/lfk78.c | 2 +- keyboards/lfkeyboards/lfk87/lfk87.c | 2 +- keyboards/lfkeyboards/lighting.c | 4 +- keyboards/lfkeyboards/mini1800/mini1800.c | 2 +- keyboards/lfkeyboards/smk65/revb/revb.c | 2 +- keyboards/macrocat/macrocat.c | 4 +- keyboards/makeymakey/makeymakey.c | 2 +- .../matrix/noah/keymaps/blockader/keymap.c | 2 +- keyboards/mechwild/bbs/bbs.c | 2 +- keyboards/nek_type_a/mcp23017.c | 4 +- keyboards/neopad/rev1/rev1.c | 2 +- keyboards/opendeck/32/rev1/rev1.c | 2 +- keyboards/planck/keymaps/circuit/keymap.c | 4 +- keyboards/planck/keymaps/dbroqua/keymap.c | 4 +- keyboards/planck/keymaps/dcompact/keymap.c | 2 +- .../planck/keymaps/dr_notsokind/keymap.c | 4 +- keyboards/planck/keymaps/emilyh/keymap.c | 4 +- .../planck/keymaps/experimental/keymap.c | 4 +- keyboards/planck/keymaps/gunp/keymap.c | 4 +- .../keymaps/handwired_binaryplease/keymap.c | 4 +- keyboards/planck/keymaps/impossible/keymap.c | 4 +- keyboards/planck/keymaps/ishtob/keymap.c | 4 +- keyboards/planck/keymaps/jhenahan/keymap.c | 4 +- keyboards/planck/keymaps/lae3/keymap.c | 4 +- keyboards/planck/keymaps/mjt/keymap.c | 4 +- keyboards/planck/keymaps/mjtnumsym/keymap.c | 4 +- keyboards/planck/keymaps/originerd/keymap.c | 4 +- keyboards/planck/keymaps/premek/keymap.c | 4 +- keyboards/planck/keymaps/sgoodwin/keymap.c | 4 +- keyboards/planck/keymaps/smt/keymap.c | 4 +- .../planck/keymaps/that_canadian/keymap.c | 4 +- keyboards/planck/keymaps/vaire/keymap.c | 4 +- keyboards/planck/keymaps/yttyx/keymap.c | 2 +- .../keymaps/zach/zach_common_functions.c | 2 +- keyboards/preonic/keymaps/0xdec/keymap.c | 4 +- keyboards/preonic/keymaps/bucktooth/keymap.c | 4 +- keyboards/preonic/keymaps/jacwib/keymap.c | 4 +- keyboards/preonic/keymaps/mverteuil/keymap.c | 2 +- .../preonic/keymaps/mverteuil_2x2u/keymap.c | 2 +- keyboards/preonic/keymaps/nikchi/keymap.c | 4 +- keyboards/preonic/keymaps/smt/keymap.c | 4 +- .../preonic/keymaps/that_canadian/keymap.c | 4 +- .../preonic/keymaps/trigotometry/keymap.c | 2 +- .../keymaps/zach/zach_common_functions.c | 2 +- .../reviung41/keymaps/ciutadellla/keymap.c | 2 +- keyboards/rgbkb/sol3/rev1/rev1.c | 2 +- keyboards/sekigon/grs_70ec/grs_70ec.c | 2 +- keyboards/sneakbox/aliceclone/aliceclone.c | 2 +- .../splitkb/kyria/keymaps/cwebster2/keymap.c | 2 +- .../the_uni/keymaps/default/keymap.c | 2 +- .../minivan/keymaps/josjoha/keymap.c | 2 +- .../wt65_xt/keymaps/zunger/keymap.c | 2 +- keyboards/wilba_tech/wt70_jb/wt70_jb.c | 2 +- keyboards/woodkeys/meira/TWIlib.c | 4 +- keyboards/woodkeys/meira/lighting.c | 4 +- keyboards/woodkeys/meira/meira.c | 2 +- keyboards/xiudi/xd75/keymaps/colinta/keymap.c | 2 +- keyboards/xiudi/xd96/keymaps/uuupah/keymap.c | 2 +- platforms/avr/drivers/audio_pwm_hardware.c | 4 +- .../chibios/drivers/audio_dac_additive.c | 2 +- platforms/chibios/drivers/audio_dac_basic.c | 2 +- quantum/action.c | 2 +- quantum/action_util.c | 4 +- quantum/audio/audio.c | 4 +- quantum/audio/voices.c | 4 +- quantum/joystick.c | 2 +- quantum/keyboard.c | 2 +- .../pointing_device/pointing_device_modes.c | 33 +- .../pointing_device/pointing_device_modes.h | 6 +- quantum/process_keycode/process_audio.c | 4 +- quantum/process_keycode/process_auto_shift.c | 4 +- quantum/process_keycode/process_music.c | 6 +- quantum/process_keycode/process_steno.c | 2 +- quantum/process_keycode/process_tap_dance.c | 2 +- quantum/quantum.c | 8 +- tmk_core/protocol/chibios/usb_main.c | 351 ++++++------------ tmk_core/protocol/host.c | 2 +- tmk_core/protocol/lufa/lufa.c | 67 ++-- tmk_core/protocol/report.c | 36 +- tmk_core/protocol/report.h | 56 +-- tmk_core/protocol/usb_descriptor.c | 71 ++-- tmk_core/protocol/vusb/protocol.c | 2 +- tmk_core/protocol/vusb/vusb.c | 156 ++++---- users/arkag/arkag.c | 4 +- users/d4mation/d4mation.c | 4 +- users/danielo515/danielo515.c | 4 +- users/edvorakjp/edvorakjp.c | 2 +- users/ericgebhart/extensions/oneshot.c | 4 +- users/ericgebhart/oled/oled_stuff.c | 2 +- users/miles2go/babblePaste.c | 4 +- users/ninjonas/ninjonas.c | 2 +- users/spidey3/layer_rgb.c | 2 +- users/talljoe/macros.c | 6 +- 180 files changed, 626 insertions(+), 706 deletions(-) diff --git a/docs/feature_pointing_device.md b/docs/feature_pointing_device.md index a7e1aa01d02a..3f6f5840f866 100644 --- a/docs/feature_pointing_device.md +++ b/docs/feature_pointing_device.md @@ -654,7 +654,7 @@ layer_state_t layer_state_set_user(layer_state_t state) { #### Set different target layer when a particular layer is active: The below code will change the auto mouse layer target to `_MOUSE_LAYER_2` when `_DEFAULT_LAYER_2` is highest default layer state. -*NOTE: that `auto_mouse_layer_off` is used here instead of `remove_auto_mouse_layer` as `default_layer_state_set_*` stack is separate from the `layer_state_set_*` stack* if something similar was to be done in `layer_state_set_user`, `state = remove_auto_mouse_layer(state, false)` should be used instead +*NOTE: that `auto_mouse_layer_off` is used here instead of `remove_auto_mouse_layer` as `default_layer_state_set_*` stack is separate from the `layer_state_set_*` stack* if something similar was to be done in `layer_state_set_user_state = remove_auto_mouse_layer(state, false)` should be used instead *ADDITIONAL NOTE: `AUTO_MOUSE_TARGET_LAYER` is checked if already set to avoid deactivating the target layer unless needed* ```c @@ -757,7 +757,7 @@ On a keyboard that has a pointing device (_i.e._ `POINTING_DEVICE_ENABLED` _is d ```c // in config.h: -#define POINTING_DEVICE_MODES_ENABLE +#define POINTING_DEVICE_MODES_ENABLED ``` ### Activating Pointing Device Modes diff --git a/docs/gpio_control.md b/docs/gpio_control.md index e1f1515b71f8..12413dfc8e62 100644 --- a/docs/gpio_control.md +++ b/docs/gpio_control.md @@ -30,7 +30,7 @@ The above functions are not always guaranteed to work atomically. Therefore, if eg. ```c -void some_function() { +void some_function(void) { // some process ATOMIC_BLOCK_FORCEON { // Atomic Processing diff --git a/docs/quantum_painter_lvgl.md b/docs/quantum_painter_lvgl.md index 3edb37fbcef3..4d10160baf4b 100644 --- a/docs/quantum_painter_lvgl.md +++ b/docs/quantum_painter_lvgl.md @@ -45,7 +45,7 @@ To init. the display please read the [Display Initialisation](quantum_painter.md ### Quantum Painter LVGL Detach :id=lvgl-api-init ```c -void qp_lvgl_detach() +void qp_lvgl_detach(void) ``` The `qp_lvgl_detach` function stops the internal LVGL ticks and releases resources related to it. diff --git a/drivers/lcd/hd44780.c b/drivers/lcd/hd44780.c index c988ebe56c45..ccc50117abb1 100644 --- a/drivers/lcd/hd44780.c +++ b/drivers/lcd/hd44780.c @@ -158,7 +158,7 @@ void hd44780_on(bool cursor, bool blink) { } } -void hd44780_off() { +void hd44780_off(void) { hd44780_command(HD44780_CMD_DISPLAY); } diff --git a/drivers/sensors/adns9800.c b/drivers/sensors/adns9800.c index 3633f23e5247..083ab34d9fcc 100644 --- a/drivers/sensors/adns9800.c +++ b/drivers/sensors/adns9800.c @@ -99,7 +99,7 @@ uint8_t adns9800_read(uint8_t reg_addr) { return data; } -void adns9800_init() { +void adns9800_init(void) { setPinOutput(ADNS9800_CS_PIN); spi_init(); diff --git a/drivers/sensors/cirque_pinnacle.c b/drivers/sensors/cirque_pinnacle.c index 4aed5fe67a33..3131805c2000 100644 --- a/drivers/sensors/cirque_pinnacle.c +++ b/drivers/sensors/cirque_pinnacle.c @@ -87,7 +87,7 @@ void cirque_pinnacle_scale_data(pinnacle_data_t* coordinates, uint16_t xResoluti } // Clears Status1 register flags (SW_CC and SW_DR) -void cirque_pinnacle_clear_flags() { +void cirque_pinnacle_clear_flags(void) { RAP_Write(HOSTREG__STATUS1, HOSTREG__STATUS1_DEFVAL & ~(HOSTREG__STATUS1__COMMAND_COMPLETE | HOSTREG__STATUS1__DATA_READY)); wait_us(50); } diff --git a/drivers/usb2422.c b/drivers/usb2422.c index 8ee54b24eebe..1d33b5acf807 100644 --- a/drivers/usb2422.c +++ b/drivers/usb2422.c @@ -344,7 +344,7 @@ static void USB2422_write_block(void) { // *************************************************************** -void USB2422_init() { +void USB2422_init(void) { #ifdef USB2422_RESET_PIN setPinOutput(USB2422_RESET_PIN); #endif @@ -355,7 +355,7 @@ void USB2422_init() { i2c_init(); // IC2 clk must be high at USB2422 reset release time to signal SMB configuration } -void USB2422_configure() { +void USB2422_configure(void) { static const char SERNAME[] = "Unavailable"; memset(&config, 0, sizeof(Usb2422_t)); @@ -385,7 +385,7 @@ void USB2422_configure() { USB2422_write_block(); } -void USB2422_reset() { +void USB2422_reset(void) { #ifdef USB2422_RESET_PIN writePinLow(USB2422_RESET_PIN); wait_us(2); @@ -393,7 +393,7 @@ void USB2422_reset() { #endif } -bool USB2422_active() { +bool USB2422_active(void) { #ifdef USB2422_ACTIVE_PIN return readPin(USB2422_ACTIVE_PIN); #else diff --git a/keyboards/40percentclub/gherkin/keymaps/mjt/keymap.c b/keyboards/40percentclub/gherkin/keymaps/mjt/keymap.c index 312fbfaf574f..40c11739fb63 100644 --- a/keyboards/40percentclub/gherkin/keymaps/mjt/keymap.c +++ b/keyboards/40percentclub/gherkin/keymaps/mjt/keymap.c @@ -174,13 +174,13 @@ void matrix_init_user(void) { #ifdef AUDIO_ENABLE -void startup_user() +void startup_user(void) { _delay_ms(20); // gets rid of tick PLAY_SONG(tone_startup); } -void shutdown_user() +void shutdown_user(void) { PLAY_SONG(tone_goodbye); _delay_ms(150); diff --git a/keyboards/40percentclub/gherkin/keymaps/steno/keymap.c b/keyboards/40percentclub/gherkin/keymaps/steno/keymap.c index c7ee63d1269a..5f78ba1cde28 100644 --- a/keyboards/40percentclub/gherkin/keymaps/steno/keymap.c +++ b/keyboards/40percentclub/gherkin/keymaps/steno/keymap.c @@ -8,6 +8,6 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { STN_NUM, STN_NUM, STN_A, STN_O, STN_NUM, STN_E, STN_U, STN_NUM, STN_NUM, STN_NUM), }; -void matrix_init_user() { +void matrix_init_user(void) { steno_set_mode(STENO_MODE_GEMINI); // or STENO_MODE_BOLT } \ No newline at end of file diff --git a/keyboards/40percentclub/mf68/keymaps/delivrance/keymap.c b/keyboards/40percentclub/mf68/keymaps/delivrance/keymap.c index ed98d947e5dd..8d69a5a8afa3 100644 --- a/keyboards/40percentclub/mf68/keymaps/delivrance/keymap.c +++ b/keyboards/40percentclub/mf68/keymaps/delivrance/keymap.c @@ -197,7 +197,7 @@ void led_set_user(uint8_t usb_led) { static uint32_t timer; static bool is_idle; -void matrix_scan_user() { +void matrix_scan_user(void) { // Check the timer only if the keyboard is not idle if (!is_idle) { if (timer_elapsed32(timer) >= (uint32_t) BACKLIGHT_IDLE_TIMEOUT * 1000) { diff --git a/keyboards/40percentclub/ut47/ut47.c b/keyboards/40percentclub/ut47/ut47.c index 864edaeb57da..9d46a4679d40 100644 --- a/keyboards/40percentclub/ut47/ut47.c +++ b/keyboards/40percentclub/ut47/ut47.c @@ -17,7 +17,7 @@ #ifdef LED_ENABLE #include "uart.h" -void matrix_init_kb() { +void matrix_init_kb(void) { uart_init(9600); } #endif diff --git a/keyboards/annepro2/annepro2.c b/keyboards/annepro2/annepro2.c index f4ced65436b8..e1292b351720 100644 --- a/keyboards/annepro2/annepro2.c +++ b/keyboards/annepro2/annepro2.c @@ -111,7 +111,7 @@ void keyboard_post_init_kb(void) { keyboard_post_init_user(); } -void matrix_scan_kb() { +void matrix_scan_kb(void) { // if there's stuff on the ble serial buffer // read it into the capslock struct while (!sdGetWouldBlock(&SD1)) { diff --git a/keyboards/annepro2/ap2_led.c b/keyboards/annepro2/ap2_led.c index 339df103bf07..c1d7c8166e88 100644 --- a/keyboards/annepro2/ap2_led.c +++ b/keyboards/annepro2/ap2_led.c @@ -60,15 +60,15 @@ void ap2_led_enable(void) { proto_tx(CMD_LED_ON, NULL, 0, 3); } void ap2_led_set_profile(uint8_t prof) { proto_tx(CMD_LED_SET_PROFILE, &prof, sizeof(prof), 3); } -void ap2_led_get_status() { proto_tx(CMD_LED_GET_STATUS, NULL, 0, 3); } +void ap2_led_get_status(void) { proto_tx(CMD_LED_GET_STATUS, NULL, 0, 3); } -void ap2_led_next_profile() { proto_tx(CMD_LED_NEXT_PROFILE, NULL, 0, 3); } +void ap2_led_next_profile(void) { proto_tx(CMD_LED_NEXT_PROFILE, NULL, 0, 3); } -void ap2_led_next_intensity() { proto_tx(CMD_LED_NEXT_INTENSITY, NULL, 0, 3); } +void ap2_led_next_intensity(void) { proto_tx(CMD_LED_NEXT_INTENSITY, NULL, 0, 3); } -void ap2_led_next_animation_speed() { proto_tx(CMD_LED_NEXT_ANIMATION_SPEED, NULL, 0, 3); } +void ap2_led_next_animation_speed(void) { proto_tx(CMD_LED_NEXT_ANIMATION_SPEED, NULL, 0, 3); } -void ap2_led_prev_profile() { proto_tx(CMD_LED_PREV_PROFILE, NULL, 0, 3); } +void ap2_led_prev_profile(void) { proto_tx(CMD_LED_PREV_PROFILE, NULL, 0, 3); } void ap2_led_mask_set_key(uint8_t row, uint8_t col, ap2_led_t color) { uint8_t payload[] = {row, col, color.p.blue, color.p.green, color.p.red, color.p.alpha}; @@ -127,7 +127,7 @@ void ap2_led_set_foreground_color(uint8_t red, uint8_t green, uint8_t blue) { ap2_led_mask_set_mono(color); } -void ap2_led_reset_foreground_color() { +void ap2_led_reset_foreground_color(void) { ap2_led_t color = { .p.red = 0, .p.green = 0, diff --git a/keyboards/bemeier/bmek/bmek.c b/keyboards/bemeier/bmek/bmek.c index 47e874269589..31209fdca21c 100755 --- a/keyboards/bemeier/bmek/bmek.c +++ b/keyboards/bemeier/bmek/bmek.c @@ -16,7 +16,7 @@ #include "bmek.h" __attribute__((weak)) -void shutdown_user() { +void shutdown_user(void) { #ifdef RGBLIGHT_ENABLE rgblight_setrgb(255, 0, 0); #endif diff --git a/keyboards/bpiphany/frosty_flake/20130602/20130602.c b/keyboards/bpiphany/frosty_flake/20130602/20130602.c index 2c875d1a7fde..2c8e7517b924 100644 --- a/keyboards/bpiphany/frosty_flake/20130602/20130602.c +++ b/keyboards/bpiphany/frosty_flake/20130602/20130602.c @@ -1,6 +1,6 @@ #include "frosty_flake.h" -void keyboard_pre_init_kb() { +void keyboard_pre_init_kb(void) { setPinOutput(B7); // caps lock writePinHigh(B7); setPinOutput(C5); // num lock diff --git a/keyboards/bpiphany/frosty_flake/20140521/20140521.c b/keyboards/bpiphany/frosty_flake/20140521/20140521.c index be4e1a312486..65c40ab86e1d 100644 --- a/keyboards/bpiphany/frosty_flake/20140521/20140521.c +++ b/keyboards/bpiphany/frosty_flake/20140521/20140521.c @@ -1,6 +1,6 @@ #include "frosty_flake.h" -void keyboard_pre_init_kb() { +void keyboard_pre_init_kb(void) { setPinOutput(B7); // num lock writePinHigh(B7); setPinOutput(C5); // caps lock diff --git a/keyboards/cannonkeys/satisfaction75/satisfaction75.c b/keyboards/cannonkeys/satisfaction75/satisfaction75.c index 13b44b85db88..ce870c49af60 100644 --- a/keyboards/cannonkeys/satisfaction75/satisfaction75.c +++ b/keyboards/cannonkeys/satisfaction75/satisfaction75.c @@ -361,11 +361,11 @@ void custom_config_reset(void){ eeprom_update_byte((uint8_t*)EEPROM_ENABLED_ENCODER_MODES, 0x1F); } -void backlight_config_save(){ +void backlight_config_save(void){ eeprom_update_byte((uint8_t*)EEPROM_CUSTOM_BACKLIGHT, kb_backlight_config.raw); } -void custom_config_load(){ +void custom_config_load(void){ kb_backlight_config.raw = eeprom_read_byte((uint8_t*)EEPROM_CUSTOM_BACKLIGHT); #ifdef DYNAMIC_KEYMAP_ENABLE oled_mode = eeprom_read_byte((uint8_t*)EEPROM_DEFAULT_OLED); diff --git a/keyboards/cannonkeys/satisfaction75/satisfaction_encoder.c b/keyboards/cannonkeys/satisfaction75/satisfaction_encoder.c index c40815a8d83b..c8bb999df461 100644 --- a/keyboards/cannonkeys/satisfaction75/satisfaction_encoder.c +++ b/keyboards/cannonkeys/satisfaction75/satisfaction_encoder.c @@ -1,7 +1,7 @@ #include "satisfaction75.h" #include "eeprom.h" -void pre_encoder_mode_change(){ +void pre_encoder_mode_change(void){ if(encoder_mode == ENC_MODE_CLOCK_SET){ RTCDateTime timespec; timespec.year = year_config; @@ -16,7 +16,7 @@ void pre_encoder_mode_change(){ } } -void post_encoder_mode_change(){ +void post_encoder_mode_change(void){ if(encoder_mode == ENC_MODE_CLOCK_SET){ hour_config = (last_minute / 60); minute_config = last_minute % 60; @@ -86,7 +86,7 @@ void update_time_config(int8_t increment){ } } -uint16_t handle_encoder_clockwise(){ +uint16_t handle_encoder_clockwise(void){ uint16_t mapped_code = 0; switch(encoder_mode){ default: @@ -130,7 +130,7 @@ uint16_t handle_encoder_clockwise(){ return mapped_code; } -uint16_t handle_encoder_ccw(){ +uint16_t handle_encoder_ccw(void){ uint16_t mapped_code = 0; switch(encoder_mode){ default: @@ -175,7 +175,7 @@ uint16_t handle_encoder_ccw(){ return mapped_code; } -uint16_t handle_encoder_press(){ +uint16_t handle_encoder_press(void){ uint16_t mapped_code = 0; switch(encoder_mode){ case ENC_MODE_VOLUME: diff --git a/keyboards/cannonkeys/satisfaction75/satisfaction_oled.c b/keyboards/cannonkeys/satisfaction75/satisfaction_oled.c index 1e8465387cd5..0fd69ca59b01 100644 --- a/keyboards/cannonkeys/satisfaction75/satisfaction_oled.c +++ b/keyboards/cannonkeys/satisfaction75/satisfaction_oled.c @@ -168,7 +168,7 @@ static char* get_date(void) { return date_str; } -void draw_default() { +void draw_default(void) { oled_write_P(PSTR("LAYER "), false); oled_write_char(get_highest_layer(layer_state) + 0x30, true); @@ -220,7 +220,7 @@ void draw_default() { draw_line_v(71, 0, 8); } -void draw_clock() { +void draw_clock(void) { oled_set_cursor(0, 0); oled_write(get_date(), false); oled_set_cursor(0, 2); diff --git a/keyboards/capsunlocked/cu75/cu75.c b/keyboards/capsunlocked/cu75/cu75.c index 690d72055ac2..fff0c10ef633 100644 --- a/keyboards/capsunlocked/cu75/cu75.c +++ b/keyboards/capsunlocked/cu75/cu75.c @@ -98,7 +98,7 @@ bool process_record_kb(uint16_t keycode, keyrecord_t* record) return process_record_user(keycode, record); } -void reset_keyboard_kb(){ +void reset_keyboard_kb(void){ #ifdef WATCHDOG_ENABLE MCUSR = 0; wdt_disable(); diff --git a/keyboards/converter/adb_usb/adb.c b/keyboards/converter/adb_usb/adb.c index 28f14c9fe890..c05bbb53ca5e 100644 --- a/keyboards/converter/adb_usb/adb.c +++ b/keyboards/converter/adb_usb/adb.c @@ -238,15 +238,15 @@ void adb_host_kbd_led(uint8_t led) { } #ifdef ADB_PSW_BIT -static inline void psw_lo() { +static inline void psw_lo(void) { ADB_DDR |= (1 << ADB_PSW_BIT); ADB_PORT &= ~(1 << ADB_PSW_BIT); } -static inline void psw_hi() { +static inline void psw_hi(void) { ADB_PORT |= (1 << ADB_PSW_BIT); ADB_DDR &= ~(1 << ADB_PSW_BIT); } -static inline bool psw_in() { +static inline bool psw_in(void) { ADB_PORT |= (1 << ADB_PSW_BIT); ADB_DDR &= ~(1 << ADB_PSW_BIT); return ADB_PIN & (1 << ADB_PSW_BIT); diff --git a/keyboards/converter/hp_46010a/matrix.c b/keyboards/converter/hp_46010a/matrix.c index 03fcb2424f07..eafe320a3df8 100644 --- a/keyboards/converter/hp_46010a/matrix.c +++ b/keyboards/converter/hp_46010a/matrix.c @@ -145,7 +145,7 @@ void Matrix_ThrowByte(void) { return ; } -void matrix_init () { +void matrix_init (void) { // debug_matrix = 1; // PB0 (SS) and PB1 (SCLK) set to outputs DDRB |= RESET | SCLK ; diff --git a/keyboards/converter/ibm_terminal/keymaps/priyadi/keymap.c b/keyboards/converter/ibm_terminal/keymaps/priyadi/keymap.c index f16b34966472..0e11fa677975 100644 --- a/keyboards/converter/ibm_terminal/keymaps/priyadi/keymap.c +++ b/keyboards/converter/ibm_terminal/keymaps/priyadi/keymap.c @@ -297,6 +297,6 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) { return true; } -void matrix_init_user() { +void matrix_init_user(void) { set_unicode_input_mode(UNICODE_MODE_LINUX); } diff --git a/keyboards/converter/m0110_usb/m0110.c b/keyboards/converter/m0110_usb/m0110.c index 64f2fa50abde..f3097fb4651d 100644 --- a/keyboards/converter/m0110_usb/m0110.c +++ b/keyboards/converter/m0110_usb/m0110.c @@ -318,31 +318,31 @@ static inline uint8_t instant(void) { return data; } -static inline void clock_lo() { +static inline void clock_lo(void) { M0110_CLOCK_PORT &= ~(1 << M0110_CLOCK_BIT); M0110_CLOCK_DDR |= (1 << M0110_CLOCK_BIT); } -static inline void clock_hi() { +static inline void clock_hi(void) { /* input with pull up */ M0110_CLOCK_DDR &= ~(1 << M0110_CLOCK_BIT); M0110_CLOCK_PORT |= (1 << M0110_CLOCK_BIT); } -static inline bool clock_in() { +static inline bool clock_in(void) { M0110_CLOCK_DDR &= ~(1 << M0110_CLOCK_BIT); M0110_CLOCK_PORT |= (1 << M0110_CLOCK_BIT); _delay_us(1); return M0110_CLOCK_PIN & (1 << M0110_CLOCK_BIT); } -static inline void data_lo() { +static inline void data_lo(void) { M0110_DATA_PORT &= ~(1 << M0110_DATA_BIT); M0110_DATA_DDR |= (1 << M0110_DATA_BIT); } -static inline void data_hi() { +static inline void data_hi(void) { /* input with pull up */ M0110_DATA_DDR &= ~(1 << M0110_DATA_BIT); M0110_DATA_PORT |= (1 << M0110_DATA_BIT); } -static inline bool data_in() { +static inline bool data_in(void) { M0110_DATA_DDR &= ~(1 << M0110_DATA_BIT); M0110_DATA_PORT |= (1 << M0110_DATA_BIT); _delay_us(1); diff --git a/keyboards/crkbd/keymaps/jpe230/oled/avr/master/oled_master_handler.c b/keyboards/crkbd/keymaps/jpe230/oled/avr/master/oled_master_handler.c index 9a75e9fa9a17..f0f6f3f62fec 100644 --- a/keyboards/crkbd/keymaps/jpe230/oled/avr/master/oled_master_handler.c +++ b/keyboards/crkbd/keymaps/jpe230/oled/avr/master/oled_master_handler.c @@ -63,7 +63,7 @@ void oled_render_keylog(void) { oled_write((const char *)&logged_char, false); } -void render_master_oled() { +void render_master_oled(void) { if (timer_elapsed32(oled_timer) > CUSTOM_OLED_TIMEOUT) { oled_off(); return; diff --git a/keyboards/crkbd/keymaps/jpe230/oled/avr/slave/oled_slave_handler.c b/keyboards/crkbd/keymaps/jpe230/oled/avr/slave/oled_slave_handler.c index 159413d08386..c47fb2a07b2b 100644 --- a/keyboards/crkbd/keymaps/jpe230/oled/avr/slave/oled_slave_handler.c +++ b/keyboards/crkbd/keymaps/jpe230/oled/avr/slave/oled_slave_handler.c @@ -3,7 +3,7 @@ #include "jpe230.h" -void render_slave_oled() { +void render_slave_oled(void) { static const char PROGMEM crkbd_logo[] = { 0x80, 0x81, 0x82, 0x83, 0x84, 0x85, 0x86, 0x87, 0x88, 0x89, 0x8a, 0x8b, 0x8c, 0x8d, 0x8e, 0x8f, 0x90, 0x91, 0x92, 0x93, 0x94, 0xa0, 0xa1, 0xa2, 0xa3, 0xa4, 0xa5, 0xa6, 0xa7, 0xa8, 0xa9, 0xaa, 0xab, 0xac, 0xad, 0xae, 0xaf, 0xb0, 0xb1, 0xb2, 0xb3, 0xb4, diff --git a/keyboards/crkbd/keymaps/jpe230/oled/oled_handler.c b/keyboards/crkbd/keymaps/jpe230/oled/oled_handler.c index 67861e5b270f..9e130dae3800 100644 --- a/keyboards/crkbd/keymaps/jpe230/oled/oled_handler.c +++ b/keyboards/crkbd/keymaps/jpe230/oled/oled_handler.c @@ -12,7 +12,7 @@ __attribute__ ((weak)) void handle_oled_keypress(uint16_t keycode, keyrecord_t * __attribute__ ((weak)) oled_rotation_t rotate_master(oled_rotation_t rotation) {return rotation;} __attribute__ ((weak)) oled_rotation_t rotate_slave(oled_rotation_t rotation) {return rotation;} -void oled_timer_reset() { oled_timer = timer_read32(); } +void oled_timer_reset(void) { oled_timer = timer_read32(); } oled_rotation_t oled_init_user(oled_rotation_t rotation) { diff --git a/keyboards/crkbd/keymaps/jpe230/oled/rp2040/master/oled_master_handler.c b/keyboards/crkbd/keymaps/jpe230/oled/rp2040/master/oled_master_handler.c index a2230e5ee1db..ffd3edb792de 100644 --- a/keyboards/crkbd/keymaps/jpe230/oled/rp2040/master/oled_master_handler.c +++ b/keyboards/crkbd/keymaps/jpe230/oled/rp2040/master/oled_master_handler.c @@ -40,7 +40,7 @@ void oled_render_layer_state(void) { } -void render_master_oled() { +void render_master_oled(void) { if (timer_elapsed32(oled_timer) > CUSTOM_OLED_TIMEOUT) { oled_off(); return; diff --git a/keyboards/crkbd/keymaps/jpe230/oled/rp2040/slave/oled_slave_handler.c b/keyboards/crkbd/keymaps/jpe230/oled/rp2040/slave/oled_slave_handler.c index ef38fd8c4437..31166b3b4326 100644 --- a/keyboards/crkbd/keymaps/jpe230/oled/rp2040/slave/oled_slave_handler.c +++ b/keyboards/crkbd/keymaps/jpe230/oled/rp2040/slave/oled_slave_handler.c @@ -4,7 +4,7 @@ #include "jpe230.h" #include "ocean_dream.h" -void render_slave_oled() { +void render_slave_oled(void) { render_stars(); } diff --git a/keyboards/dmqdesign/spin/keymaps/spidey3_pad/keymap.c b/keyboards/dmqdesign/spin/keymaps/spidey3_pad/keymap.c index 00b144a2f41a..2ee5fa34c019 100644 --- a/keyboards/dmqdesign/spin/keymaps/spidey3_pad/keymap.c +++ b/keyboards/dmqdesign/spin/keymaps/spidey3_pad/keymap.c @@ -147,7 +147,7 @@ void keyboard_post_init_user(void) { do_rgb_layers(layer_state, LAYER_BASE, LAYER_BASE_END); } -void shutdown_user() { +void shutdown_user(void) { clear_rgb_layers(); rgblight_enable(); rgblight_mode_noeeprom(RGBLIGHT_MODE_STATIC_LIGHT); diff --git a/keyboards/dp60/matrix.c b/keyboards/dp60/matrix.c index a9974757dde5..dbcc68056d4c 100644 --- a/keyboards/dp60/matrix.c +++ b/keyboards/dp60/matrix.c @@ -123,7 +123,7 @@ static void init_rows(void) setPinInputHigh(D4); } -static uint8_t read_rows() +static uint8_t read_rows(void) { return ((readPin(E6) ? 0 : (1 << 0)) | (readPin(F6) ? 0 : (1 << 1)) | diff --git a/keyboards/duck/jetfire/jetfire.c b/keyboards/duck/jetfire/jetfire.c index 7bebd7ad219c..d42cb22ff340 100644 --- a/keyboards/duck/jetfire/jetfire.c +++ b/keyboards/duck/jetfire/jetfire.c @@ -76,7 +76,7 @@ void backlight_set(uint8_t level) backlight_toggle_rgb(level & BACKLIGHT_RGB); } -void backlight_update_state() +void backlight_update_state(void) { cli(); send_color(backlight_state_led & (1< 0 if (effect_started_time > 0) { /* Render blinking EFFECTS */ @@ -262,7 +262,7 @@ bool rgb_matrix_indicators_user() { } #if RGB_CONFIRMATION_BLINKING_TIME > 0 -static void start_effects() { +static void start_effects(void) { effect_started_time = sync_timer_read(); if (!rgb_matrix_is_enabled()) { /* Turn it ON, signal the cause (EFFECTS) */ @@ -286,7 +286,7 @@ static void start_effects() { // 87, led 07 88, led 18 // 91, led 08 92, led 19 -static void set_rgb_caps_leds() { +static void set_rgb_caps_leds(void) { rgb_matrix_set_color(67, 0xFF, 0x0, 0x0); // Left side LED 1 rgb_matrix_set_color(68, 0xFF, 0x0, 0x0); // Right side LED 1 rgb_matrix_set_color(70, 0xFF, 0x0, 0x0); // Left side LED 2 diff --git a/keyboards/gmmk/pro/rev1/ansi/keymaps/lalitmaganti/keymap.c b/keyboards/gmmk/pro/rev1/ansi/keymaps/lalitmaganti/keymap.c index 46e0a128f953..83ef8c765a1d 100644 --- a/keyboards/gmmk/pro/rev1/ansi/keymaps/lalitmaganti/keymap.c +++ b/keyboards/gmmk/pro/rev1/ansi/keymaps/lalitmaganti/keymap.c @@ -73,14 +73,14 @@ bool encoder_update_user(uint8_t index, bool clockwise) { static void set_rgb_side_leds(void); -static void set_rgb_side_leds() { +static void set_rgb_side_leds(void) { rgb_matrix_set_color(67, RGB_WHITE); // Left side LED 1 rgb_matrix_set_color(68, RGB_WHITE); // Right side LED 1 rgb_matrix_set_color(91, RGB_WHITE); // Left side LED 8 rgb_matrix_set_color(92, RGB_WHITE); // Right side LED 8 } -bool rgb_matrix_indicators_user() { +bool rgb_matrix_indicators_user(void) { rgb_matrix_set_color_all(0x0, 0x0, 0x0); if (IS_HOST_LED_ON(USB_LED_CAPS_LOCK)) { rgb_matrix_set_color(3, RGB_WHITE); // CAPS diff --git a/keyboards/gmmk/pro/rev1/ansi/keymaps/macos/keymap.c b/keyboards/gmmk/pro/rev1/ansi/keymaps/macos/keymap.c index 8740bfe89c95..50a2ac6ca3c7 100644 --- a/keyboards/gmmk/pro/rev1/ansi/keymaps/macos/keymap.c +++ b/keyboards/gmmk/pro/rev1/ansi/keymaps/macos/keymap.c @@ -414,7 +414,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { } #if RGB_CONFIRMATION_BLINKING_TIME > 0 - static void start_effects() { + static void start_effects(void) { effect_started_time = sync_timer_read(); if (!rgb_matrix_is_enabled()) { /* Turn it ON, signal the cause (EFFECTS) */ @@ -427,7 +427,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { } #endif // RGB_CONFIRMATION_BLINKING_TIME > 0 - static void set_rgb_caps_leds() { + static void set_rgb_caps_leds(void) { rgb_matrix_set_color(67, 0xFF, 0x0, 0x0); // Left side LED 1 rgb_matrix_set_color(68, 0xFF, 0x0, 0x0); // Right side LED 1 rgb_matrix_set_color(70, 0xFF, 0x0, 0x0); // Left side LED 2 diff --git a/keyboards/gmmk/pro/rev1/ansi/keymaps/mike1808/encoder.c b/keyboards/gmmk/pro/rev1/ansi/keymaps/mike1808/encoder.c index 43ed195fbb22..c9128062176c 100644 --- a/keyboards/gmmk/pro/rev1/ansi/keymaps/mike1808/encoder.c +++ b/keyboards/gmmk/pro/rev1/ansi/keymaps/mike1808/encoder.c @@ -36,9 +36,9 @@ const encoder_callback encoder_mapping[][2] = { // clang-format on -void volume_up() { tap_code(KC_VOLU); } +void volume_up(void) { tap_code(KC_VOLU); } -void volume_down() { tap_code(KC_VOLD); } +void volume_down(void) { tap_code(KC_VOLD); } bool encoder_update_user(uint8_t index, bool clockwise) { dprintf("current encoder state is: %d\n", state); @@ -65,7 +65,7 @@ void handle_rgb_key(bool pressed) { static KeyPressState *rgb_state; -void keyboard_post_init_encoder() { +void keyboard_post_init_encoder(void) { rgb_state = NewKeyPressState(handle_rgb_key); } diff --git a/keyboards/gmmk/pro/rev1/ansi/keymaps/mike1808/process_record.c b/keyboards/gmmk/pro/rev1/ansi/keymaps/mike1808/process_record.c index ac0164e73f9b..a21b58a36cb0 100644 --- a/keyboards/gmmk/pro/rev1/ansi/keymaps/mike1808/process_record.c +++ b/keyboards/gmmk/pro/rev1/ansi/keymaps/mike1808/process_record.c @@ -116,4 +116,4 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) { process_record_fun(keycode, record); } -void keyboard_post_init_user() { keyboard_post_init_encoder(); } +void keyboard_post_init_user(void) { keyboard_post_init_encoder(); } diff --git a/keyboards/gmmk/pro/rev1/ansi/keymaps/mike1808/rgb_matrix_ledmaps.c b/keyboards/gmmk/pro/rev1/ansi/keymaps/mike1808/rgb_matrix_ledmaps.c index 0106d80c1412..b213abc998d8 100644 --- a/keyboards/gmmk/pro/rev1/ansi/keymaps/mike1808/rgb_matrix_ledmaps.c +++ b/keyboards/gmmk/pro/rev1/ansi/keymaps/mike1808/rgb_matrix_ledmaps.c @@ -58,12 +58,12 @@ void set_layer_rgb(uint8_t led_min, uint8_t led_max, int layer) { } } -void rgb_matrix_layers_enable() { +void rgb_matrix_layers_enable(void) { dprintf("ledmaps are enabled\n"); enabled = true; } -void rgb_matrix_layers_disable() { +void rgb_matrix_layers_disable(void) { dprintf("ledmaps are disabled\n"); enabled = false; } diff --git a/keyboards/gmmk/pro/rev1/ansi/keymaps/mike1808/utils.c b/keyboards/gmmk/pro/rev1/ansi/keymaps/mike1808/utils.c index 35ae20b126c5..009e826423b2 100644 --- a/keyboards/gmmk/pro/rev1/ansi/keymaps/mike1808/utils.c +++ b/keyboards/gmmk/pro/rev1/ansi/keymaps/mike1808/utils.c @@ -15,7 +15,7 @@ */ #include "utils.h" -void store_rgb_state_to_eeprom() { +void store_rgb_state_to_eeprom(void) { uint8_t mode = rgb_matrix_get_mode(); uint8_t speed = rgb_matrix_get_speed(); HSV color = rgb_matrix_get_hsv(); diff --git a/keyboards/gmmk/pro/rev1/ansi/keymaps/stickandgum/keymap.c b/keyboards/gmmk/pro/rev1/ansi/keymaps/stickandgum/keymap.c index 6ba850b3e5a2..9a3123a0a7e3 100644 --- a/keyboards/gmmk/pro/rev1/ansi/keymaps/stickandgum/keymap.c +++ b/keyboards/gmmk/pro/rev1/ansi/keymaps/stickandgum/keymap.c @@ -247,7 +247,7 @@ bool rgb_matrix_indicators_user(void) { // 87, led 07 88, led 18 // 91, led 08 92, led 19 -static void set_rgb_caps_leds_on() { +static void set_rgb_caps_leds_on(void) { rgb_matrix_set_color(0, 255, 0, 0); //Escape Key rgb_matrix_set_color(3, 255, 0, 0); //capslock key rgb_matrix_set_color(5, 255, 0, 0); //Left CTRL key @@ -269,7 +269,7 @@ static void set_rgb_caps_leds_on() { rgb_matrix_set_color(92, 255, 255, 255); //Right LED 19 } -static void set_rgb_caps_leds_off() { +static void set_rgb_caps_leds_off(void) { rgb_matrix_set_color(0, 0, 0, 0); //Escape Key rgb_matrix_set_color(3, 0, 0, 0); //capslock key rgb_matrix_set_color(5, 0, 0, 0); //Left CTRL key @@ -291,11 +291,11 @@ static void set_rgb_caps_leds_off() { rgb_matrix_set_color(92, 0, 0, 0); //Right LED 19 } -static void set_rgb_scroll_leds_on() { +static void set_rgb_scroll_leds_on(void) { rgb_matrix_set_color(72, 255, 255, 255); // Under Rotary (HOME) } -static void set_rgb_scroll_leds_off() { +static void set_rgb_scroll_leds_off(void) { rgb_matrix_set_color(72, 0, 0, 0); // Under Rotary (HOME) } diff --git a/keyboards/gmmk/pro/rev1/ansi/keymaps/trwnh/keymap.c b/keyboards/gmmk/pro/rev1/ansi/keymaps/trwnh/keymap.c index 8d425cdf1e9f..303861c676e1 100644 --- a/keyboards/gmmk/pro/rev1/ansi/keymaps/trwnh/keymap.c +++ b/keyboards/gmmk/pro/rev1/ansi/keymaps/trwnh/keymap.c @@ -62,7 +62,7 @@ const uint16_t PROGMEM encoder_map[][NUM_ENCODERS][2] = { static void set_rgb_caps_leds_off(void); static void set_rgb_scroll_leds_off(void); - static void set_rgb_caps_leds_on() { + static void set_rgb_caps_leds_on(void) { // Set alpha and capslock to red rgb_matrix_set_color( 3, 255, 0, 0); // Caps @@ -97,7 +97,7 @@ const uint16_t PROGMEM encoder_map[][NUM_ENCODERS][2] = { rgb_matrix_set_color(43, 255, 0, 0); // M } - static void set_rgb_caps_leds_off() { + static void set_rgb_caps_leds_off(void) { // Set alpha and capslock to black rgb_matrix_set_color( 3, 0, 0, 0); // Caps @@ -132,11 +132,11 @@ const uint16_t PROGMEM encoder_map[][NUM_ENCODERS][2] = { rgb_matrix_set_color(43, 0, 0, 0); // M } - static void set_rgb_scroll_leds_on() { + static void set_rgb_scroll_leds_on(void) { rgb_matrix_set_color(72, 255, 255, 255); // Under Rotary (HOME) } - static void set_rgb_scroll_leds_off() { + static void set_rgb_scroll_leds_off(void) { rgb_matrix_set_color(72, 0, 0, 0); // Under Rotary (HOME) } diff --git a/keyboards/hadron/ver2/keymaps/side_numpad/keymap.c b/keyboards/hadron/ver2/keymaps/side_numpad/keymap.c index 04b30e34376a..f352b1c8510c 100644 --- a/keyboards/hadron/ver2/keymaps/side_numpad/keymap.c +++ b/keyboards/hadron/ver2/keymaps/side_numpad/keymap.c @@ -325,13 +325,13 @@ void matrix_init_user(void) { #ifdef AUDIO_ENABLE -void startup_user() +void startup_user(void) { _delay_ms(20); // gets rid of tick PLAY_SONG(tone_startup); } -void shutdown_user() +void shutdown_user(void) {cc PLAY_SONG(tone_goodbye); _delay_ms(150); diff --git a/keyboards/handwired/atreus50/keymaps/default/keymap.c b/keyboards/handwired/atreus50/keymaps/default/keymap.c index 6feed5e070ab..cbcc5fc6f8f7 100644 --- a/keyboards/handwired/atreus50/keymaps/default/keymap.c +++ b/keyboards/handwired/atreus50/keymaps/default/keymap.c @@ -187,13 +187,13 @@ void matrix_init_user(void) { #ifdef AUDIO_ENABLE -void startup_user() +void startup_user(void) { _delay_ms(20); // gets rid of tick PLAY_SONG(tone_startup); } -void shutdown_user() +void shutdown_user(void) { PLAY_SONG(tone_goodbye); _delay_ms(150); diff --git a/keyboards/handwired/jotanck/jotanck.c b/keyboards/handwired/jotanck/jotanck.c index af650b129e7c..23e2b9634c7a 100644 --- a/keyboards/handwired/jotanck/jotanck.c +++ b/keyboards/handwired/jotanck/jotanck.c @@ -1,6 +1,6 @@ #include "jotanck.h" -void keyboard_pre_init_kb() { +void keyboard_pre_init_kb(void) { setPinOutput(JOTANCK_LED1); setPinOutput(JOTANCK_LED2); diff --git a/keyboards/handwired/jotpad16/jotpad16.c b/keyboards/handwired/jotpad16/jotpad16.c index dfff7e16793e..439cfc7b1e19 100644 --- a/keyboards/handwired/jotpad16/jotpad16.c +++ b/keyboards/handwired/jotpad16/jotpad16.c @@ -1,6 +1,6 @@ #include "jotpad16.h" -void keyboard_pre_init_kb() { +void keyboard_pre_init_kb(void) { setPinOutput(JOTPAD16_LED1); setPinOutput(JOTPAD16_LED2); diff --git a/keyboards/handwired/jscotto/scotto36/keymaps/default/keymap.c b/keyboards/handwired/jscotto/scotto36/keymaps/default/keymap.c index 3c6e61aea05f..ad8451ac09fe 100644 --- a/keyboards/handwired/jscotto/scotto36/keymaps/default/keymap.c +++ b/keyboards/handwired/jscotto/scotto36/keymaps/default/keymap.c @@ -216,7 +216,7 @@ static void render_animation(void) { } // Draw to OLED -bool oled_task_user() { +bool oled_task_user(void) { // Render Bongo Cat render_animation(); diff --git a/keyboards/handwired/jscotto/scottocmd/keymaps/default/keymap.c b/keyboards/handwired/jscotto/scottocmd/keymaps/default/keymap.c index 97d2c206a8c6..b1c77ae94470 100644 --- a/keyboards/handwired/jscotto/scottocmd/keymaps/default/keymap.c +++ b/keyboards/handwired/jscotto/scottocmd/keymaps/default/keymap.c @@ -349,7 +349,7 @@ static void render_animation(void) { } // Draw to OLED -bool oled_task_user() { +bool oled_task_user(void) { // Caps lock text led_t led_state = host_keyboard_led_state(); oled_set_cursor(0,1); diff --git a/keyboards/handwired/onekey/keymaps/digitizer/keymap.c b/keyboards/handwired/onekey/keymaps/digitizer/keymap.c index dcc0adc59b4b..49fe3d66c8b4 100644 --- a/keyboards/handwired/onekey/keymaps/digitizer/keymap.c +++ b/keyboards/handwired/onekey/keymaps/digitizer/keymap.c @@ -32,7 +32,7 @@ void keyboard_post_init_user(void) { digitizer_in_range_on(); } -void matrix_scan_user() { +void matrix_scan_user(void) { if (timer_elapsed32(timer) < 200) { return; } diff --git a/keyboards/handwired/onekey/keymaps/joystick/keymap.c b/keyboards/handwired/onekey/keymaps/joystick/keymap.c index 6463900b7be9..3bcdf2c58ebf 100644 --- a/keyboards/handwired/onekey/keymaps/joystick/keymap.c +++ b/keyboards/handwired/onekey/keymaps/joystick/keymap.c @@ -8,7 +8,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { LAYOUT_ortho_1x1(JS_0) }; -void matrix_scan_user() { +void matrix_scan_user(void) { int16_t val = (((uint32_t)timer_read() % 5000 - 2500) * 255) / 5000; joystick_set_axis(1, val); } diff --git a/keyboards/handwired/ortho5x13/keymaps/default/keymap.c b/keyboards/handwired/ortho5x13/keymaps/default/keymap.c index f043bd1be2e1..ef975a215d07 100644 --- a/keyboards/handwired/ortho5x13/keymaps/default/keymap.c +++ b/keyboards/handwired/ortho5x13/keymaps/default/keymap.c @@ -256,13 +256,13 @@ void matrix_init_user(void) { #ifdef AUDIO_ENABLE -void startup_user() +void startup_user(void) { _delay_ms(20); // gets rid of tick PLAY_SONG(tone_startup); } -void shutdown_user() +void shutdown_user(void) { PLAY_SONG(tone_goodbye); _delay_ms(150); diff --git a/keyboards/handwired/promethium/keymaps/default/keymap.c b/keyboards/handwired/promethium/keymaps/default/keymap.c index 534a2986cb19..21dd99d95aef 100644 --- a/keyboards/handwired/promethium/keymaps/default/keymap.c +++ b/keyboards/handwired/promethium/keymaps/default/keymap.c @@ -1272,7 +1272,7 @@ void set_output_user(uint8_t output) { #endif } -void matrix_init_user() { +void matrix_init_user(void) { wait_ms(500); // give time for usb to initialize set_unicode_input_mode(UNICODE_MODE_LINUX); @@ -1292,7 +1292,7 @@ void matrix_init_user() { #endif } -void turn_off_capslock() { +void turn_off_capslock(void) { if (capslock) { register_code(KC_CAPS); unregister_code(KC_CAPS); @@ -1323,7 +1323,7 @@ void turn_off_capslock() { #endif #ifdef PS2_MOUSE_ENABLE - void ps2_mouse_init_user() { + void ps2_mouse_init_user(void) { uint8_t rcv; // set TrackPoint sensitivity diff --git a/keyboards/handwired/promethium/keymaps/priyadi/keymap.c b/keyboards/handwired/promethium/keymaps/priyadi/keymap.c index 427107354977..1ebf63037bd1 100644 --- a/keyboards/handwired/promethium/keymaps/priyadi/keymap.c +++ b/keyboards/handwired/promethium/keymaps/priyadi/keymap.c @@ -1275,7 +1275,7 @@ void set_output_user(uint8_t output) { #endif } -void matrix_init_user() { +void matrix_init_user(void) { wait_ms(500); // give time for usb to initialize set_unicode_input_mode(UNICODE_MODE_LINUX); @@ -1295,7 +1295,7 @@ void matrix_init_user() { #endif } -void turn_off_capslock() { +void turn_off_capslock(void) { if (capslock) { register_code(KC_CAPS); unregister_code(KC_CAPS); @@ -1326,7 +1326,7 @@ void turn_off_capslock() { #endif #ifdef PS2_MOUSE_ENABLE - void ps2_mouse_init_user() { + void ps2_mouse_init_user(void) { uint8_t rcv; // set TrackPoint sensitivity diff --git a/keyboards/helix/pico/keymaps/default/keymap.c b/keyboards/helix/pico/keymaps/default/keymap.c index 21418f2d2fd2..101a54bda60d 100644 --- a/keyboards/helix/pico/keymaps/default/keymap.c +++ b/keyboards/helix/pico/keymaps/default/keymap.c @@ -340,12 +340,12 @@ void matrix_init_user(void) { #ifdef AUDIO_ENABLE -void startup_user() +void startup_user(void) { _delay_ms(50); // gets rid of tick } -void shutdown_user() +void shutdown_user(void) { _delay_ms(150); stop_all_notes(); diff --git a/keyboards/helix/pico/keymaps/mtei/keymap.c b/keyboards/helix/pico/keymaps/mtei/keymap.c index 17a98f4d7f48..6a5f7d295a39 100644 --- a/keyboards/helix/pico/keymaps/mtei/keymap.c +++ b/keyboards/helix/pico/keymaps/mtei/keymap.c @@ -344,12 +344,12 @@ void matrix_init_user(void) { #ifdef AUDIO_ENABLE -void startup_user() +void startup_user(void) { _delay_ms(50); // gets rid of tick } -void shutdown_user() +void shutdown_user(void) { _delay_ms(150); stop_all_notes(); diff --git a/keyboards/helix/rev2/keymaps/default/keymap.c b/keyboards/helix/rev2/keymaps/default/keymap.c index cc61ec4caac7..464b8bbd807c 100644 --- a/keyboards/helix/rev2/keymaps/default/keymap.c +++ b/keyboards/helix/rev2/keymaps/default/keymap.c @@ -479,12 +479,12 @@ void matrix_init_user(void) { #ifdef AUDIO_ENABLE -void startup_user() +void startup_user(void) { _delay_ms(20); // gets rid of tick } -void shutdown_user() +void shutdown_user(void) { _delay_ms(150); stop_all_notes(); diff --git a/keyboards/helix/rev2/keymaps/froggy/keymap.c b/keyboards/helix/rev2/keymaps/froggy/keymap.c index 3b6d3f206545..ae96f576afa7 100644 --- a/keyboards/helix/rev2/keymaps/froggy/keymap.c +++ b/keyboards/helix/rev2/keymaps/froggy/keymap.c @@ -464,12 +464,12 @@ void matrix_init_user(void) { #ifdef AUDIO_ENABLE -void startup_user() +void startup_user(void) { _delay_ms(20); // gets rid of tick } -void shutdown_user() +void shutdown_user(void) { _delay_ms(150); stop_all_notes(); diff --git a/keyboards/helix/rev2/keymaps/yshrsmz/keymap.c b/keyboards/helix/rev2/keymaps/yshrsmz/keymap.c index d2a460d0b547..5f22ed274113 100644 --- a/keyboards/helix/rev2/keymaps/yshrsmz/keymap.c +++ b/keyboards/helix/rev2/keymaps/yshrsmz/keymap.c @@ -459,12 +459,12 @@ void matrix_init_user(void) { #ifdef AUDIO_ENABLE -void startup_user() +void startup_user(void) { _delay_ms(20); // gets rid of tick } -void shutdown_user() +void shutdown_user(void) { _delay_ms(150); stop_all_notes(); diff --git a/keyboards/ibnuda/squiggle/keymaps/rick-complicated/keymap.c b/keyboards/ibnuda/squiggle/keymaps/rick-complicated/keymap.c index b8c0d9f84462..c33bf717419f 100644 --- a/keyboards/ibnuda/squiggle/keymaps/rick-complicated/keymap.c +++ b/keyboards/ibnuda/squiggle/keymaps/rick-complicated/keymap.c @@ -183,7 +183,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { LEADER_EXTERNS(); -void matrix_scan_user() { +void matrix_scan_user(void) { LEADER_DICTIONARY() { leading = false; leader_end(); diff --git a/keyboards/input_club/ergodox_infinity/ergodox_infinity.c b/keyboards/input_club/ergodox_infinity/ergodox_infinity.c index 6f7de7ff2912..fbe1bdb77f71 100644 --- a/keyboards/input_club/ergodox_infinity/ergodox_infinity.c +++ b/keyboards/input_club/ergodox_infinity/ergodox_infinity.c @@ -94,7 +94,7 @@ __attribute__ ((weak)) void matrix_init_user(void) {} __attribute__ ((weak)) void matrix_scan_user(void) {} -void keyboard_pre_init_kb() { +void keyboard_pre_init_kb(void) { #ifdef LED_MATRIX_ENABLE // Turn on LED controller setPinOutput(B16); diff --git a/keyboards/input_club/ergodox_infinity/keymaps/dudeofawesome/keymap.c b/keyboards/input_club/ergodox_infinity/keymaps/dudeofawesome/keymap.c index ebdedcbe6b11..d1665ecb1fd9 100644 --- a/keyboards/input_club/ergodox_infinity/keymaps/dudeofawesome/keymap.c +++ b/keyboards/input_club/ergodox_infinity/keymaps/dudeofawesome/keymap.c @@ -470,7 +470,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { }; -void matrix_init_user() { +void matrix_init_user(void) { led_matrix_enable_noeeprom(); led_matrix_set_val_noeeprom(UINT8_MAX); } diff --git a/keyboards/input_club/k_type/keymaps/andrew-fahmy/keymap.c b/keyboards/input_club/k_type/keymaps/andrew-fahmy/keymap.c index 87a6404326b3..264c760414eb 100644 --- a/keyboards/input_club/k_type/keymaps/andrew-fahmy/keymap.c +++ b/keyboards/input_club/k_type/keymaps/andrew-fahmy/keymap.c @@ -52,7 +52,7 @@ void keyboard_post_init_user(void) { #ifdef RGB_MATRIX_ENABLE // Turn off SDB -void keyboard_pre_init_user() { +void keyboard_pre_init_user(void) { palSetPadMode(GPIOB, 16, PAL_MODE_OUTPUT_PUSHPULL); palSetPad(GPIOB, 16); } diff --git a/keyboards/jels/jels88/jels88.c b/keyboards/jels/jels88/jels88.c index bd8e30e4ee62..a5ae732d3e49 100644 --- a/keyboards/jels/jels88/jels88.c +++ b/keyboards/jels/jels88/jels88.c @@ -22,7 +22,7 @@ #define CAPS_LED D5 #define SCROLL_LED D4 -void keyboard_pre_init_kb() { +void keyboard_pre_init_kb(void) { setPinOutput(CAPS_LED); setPinOutput(SCROLL_LED); keyboard_pre_init_user(); diff --git a/keyboards/kbdfans/niu_mini/keymaps/yttyx/keymap.c b/keyboards/kbdfans/niu_mini/keymaps/yttyx/keymap.c index c7db9d5023e3..55d5a802286e 100644 --- a/keyboards/kbdfans/niu_mini/keymaps/yttyx/keymap.c +++ b/keyboards/kbdfans/niu_mini/keymaps/yttyx/keymap.c @@ -90,6 +90,6 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { }; -void matrix_init_user() { +void matrix_init_user(void) { steno_set_mode(STENO_MODE_GEMINI); } diff --git a/keyboards/keebio/iris/keymaps/edvorakjp/keymap.c b/keyboards/keebio/iris/keymaps/edvorakjp/keymap.c index e593051db8db..97c9f48f896e 100644 --- a/keyboards/keebio/iris/keymaps/edvorakjp/keymap.c +++ b/keyboards/keebio/iris/keymaps/edvorakjp/keymap.c @@ -50,7 +50,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { }; // clang-format on -void matrix_init_keymap() {} +void matrix_init_keymap(void) {} #ifdef RGBLIGHT_EFFECT_STATIC_GRADIENT layer_state_t layer_state_set_keymap(layer_state_t state) { diff --git a/keyboards/keebio/levinson/keymaps/steno/keymap.c b/keyboards/keebio/levinson/keymaps/steno/keymap.c index 33b80ca19488..854ef4199957 100644 --- a/keyboards/keebio/levinson/keymaps/steno/keymap.c +++ b/keyboards/keebio/levinson/keymaps/steno/keymap.c @@ -91,7 +91,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = }; -void matrix_init_user() { +void matrix_init_user(void) { steno_set_mode(STENO_MODE_GEMINI); // or STENO_MODE_BOLT } diff --git a/keyboards/knops/mini/keymaps/mverteuil/keymap.c b/keyboards/knops/mini/keymaps/mverteuil/keymap.c index 45765a7aba99..2e8d678f261d 100644 --- a/keyboards/knops/mini/keymaps/mverteuil/keymap.c +++ b/keyboards/knops/mini/keymaps/mverteuil/keymap.c @@ -222,7 +222,7 @@ void set_layer_led(int layerLedMode) { } } -void led_init_animation() { +void led_init_animation(void) { for (int i = ALL_LAYERS_OFF; i <= ALL_LAYERS_ON; i++) { led_set_layer(i); } diff --git a/keyboards/lazydesigners/dimple/staggered/staggered.c b/keyboards/lazydesigners/dimple/staggered/staggered.c index 2cd8c018dbd2..b871868afa7e 100644 --- a/keyboards/lazydesigners/dimple/staggered/staggered.c +++ b/keyboards/lazydesigners/dimple/staggered/staggered.c @@ -14,10 +14,10 @@ * along with this program. If not, see . */ #include "staggered.h" -void dimple_led_on() { +void dimple_led_on(void) { writePinLow(E6); } - void dimple_led_off() { + void dimple_led_off(void) { writePinHigh(E6); } diff --git a/keyboards/lazydesigners/the50/the50.c b/keyboards/lazydesigners/the50/the50.c index 4ceb3da6ab21..35c678fd5e01 100644 --- a/keyboards/lazydesigners/the50/the50.c +++ b/keyboards/lazydesigners/the50/the50.c @@ -1,9 +1,9 @@ #include "the50.h" -void the50_led_on() { +void the50_led_on(void) { DDRB |= (1 << 7); PORTB &= ~(1 << 7); } -void the50_led_off() { +void the50_led_off(void) { DDRB &= ~(1 << 7); PORTB &= ~(1 << 7); } diff --git a/keyboards/lfkeyboards/TWIlib.c b/keyboards/lfkeyboards/TWIlib.c index d50ce7289530..0d52322c641a 100644 --- a/keyboards/lfkeyboards/TWIlib.c +++ b/keyboards/lfkeyboards/TWIlib.c @@ -24,7 +24,7 @@ int RXBuffLen; // The total number of bytes to read (should be less than RXMAXBU TWIInfoStruct TWIInfo; -void TWIInit() +void TWIInit(void) { TWIInfo.mode = Ready; TWIInfo.errorCode = 0xFF; @@ -37,7 +37,7 @@ void TWIInit() TWCR = (1 << TWIE) | (1 << TWEN); } -uint8_t isTWIReady() +uint8_t isTWIReady(void) { if ( (TWIInfo.mode == Ready) | (TWIInfo.mode == RepeatedStartSent) ) { diff --git a/keyboards/lfkeyboards/lfk65_hs/lfk65_hs.c b/keyboards/lfkeyboards/lfk65_hs/lfk65_hs.c index 7326e812ec59..3d273e8aec50 100644 --- a/keyboards/lfkeyboards/lfk65_hs/lfk65_hs.c +++ b/keyboards/lfkeyboards/lfk65_hs/lfk65_hs.c @@ -13,7 +13,7 @@ bool process_record_kb(uint16_t keycode, keyrecord_t* record) return process_record_user(keycode, record); } -void reset_keyboard_kb(){ +void reset_keyboard_kb(void){ #ifdef WATCHDOG_ENABLE MCUSR = 0; wdt_disable(); diff --git a/keyboards/lfkeyboards/lfk78/lfk78.c b/keyboards/lfkeyboards/lfk78/lfk78.c index 110bbd41681b..6f4c062ad8d6 100644 --- a/keyboards/lfkeyboards/lfk78/lfk78.c +++ b/keyboards/lfkeyboards/lfk78/lfk78.c @@ -137,7 +137,7 @@ bool process_record_kb(uint16_t keycode, keyrecord_t* record) { return process_record_user(keycode, record); } -void reset_keyboard_kb() { +void reset_keyboard_kb(void) { #ifdef WATCHDOG_ENABLE MCUSR = 0; wdt_disable(); diff --git a/keyboards/lfkeyboards/lfk87/lfk87.c b/keyboards/lfkeyboards/lfk87/lfk87.c index 18ddd86adc6f..ce81aa7d273a 100644 --- a/keyboards/lfkeyboards/lfk87/lfk87.c +++ b/keyboards/lfkeyboards/lfk87/lfk87.c @@ -116,7 +116,7 @@ bool process_record_kb(uint16_t keycode, keyrecord_t* record) return process_record_user(keycode, record); } -void reset_keyboard_kb(){ +void reset_keyboard_kb(void){ #ifdef WATCHDOG_ENABLE MCUSR = 0; wdt_disable(); diff --git a/keyboards/lfkeyboards/lighting.c b/keyboards/lfkeyboards/lighting.c index f4940ec079cd..5f3ab46e46d2 100644 --- a/keyboards/lfkeyboards/lighting.c +++ b/keyboards/lfkeyboards/lighting.c @@ -112,7 +112,7 @@ void set_backlight_by_keymap(uint8_t col, uint8_t row){ #endif } -void force_issi_refresh(){ +void force_issi_refresh(void){ #ifdef ISSI_ENABLE issi_devices[0]->led_dirty = true; update_issi(0, true); @@ -121,7 +121,7 @@ void force_issi_refresh(){ #endif } -void led_test(){ +void led_test(void){ #ifdef ISSI_ENABLE #ifdef WATCHDOG_ENABLE // This test take a long time to run, disable the WTD until its complete diff --git a/keyboards/lfkeyboards/mini1800/mini1800.c b/keyboards/lfkeyboards/mini1800/mini1800.c index cf7e42f13427..fb92137be866 100644 --- a/keyboards/lfkeyboards/mini1800/mini1800.c +++ b/keyboards/lfkeyboards/mini1800/mini1800.c @@ -122,7 +122,7 @@ bool process_record_kb(uint16_t keycode, keyrecord_t* record) return process_record_user(keycode, record); } -void reset_keyboard_kb(){ +void reset_keyboard_kb(void){ #ifdef WATCHDOG_ENABLE MCUSR = 0; wdt_disable(); diff --git a/keyboards/lfkeyboards/smk65/revb/revb.c b/keyboards/lfkeyboards/smk65/revb/revb.c index 9e78107eca8b..858305244a71 100644 --- a/keyboards/lfkeyboards/smk65/revb/revb.c +++ b/keyboards/lfkeyboards/smk65/revb/revb.c @@ -81,7 +81,7 @@ bool process_record_kb(uint16_t keycode, keyrecord_t* record) return process_record_user(keycode, record); } -void reset_keyboard_kb(){ +void reset_keyboard_kb(void){ #ifdef WATCHDOG_ENABLE MCUSR = 0; wdt_disable(); diff --git a/keyboards/macrocat/macrocat.c b/keyboards/macrocat/macrocat.c index aec76d1912b6..f00bb0141013 100644 --- a/keyboards/macrocat/macrocat.c +++ b/keyboards/macrocat/macrocat.c @@ -126,12 +126,12 @@ void encoder_double_click(void) { void encoder_triple_click(void) { tap_code(KC_MPRV); } -void matrix_init_kb() { +void matrix_init_kb(void) { matrix_init_user(); setPinInputHigh(ENCODER_SWITCH); } -void matrix_scan_kb() { +void matrix_scan_kb(void) { matrix_scan_user(); if (readPin(ENCODER_SWITCH)) { if (encoder_pressed) { // release switch diff --git a/keyboards/makeymakey/makeymakey.c b/keyboards/makeymakey/makeymakey.c index 77794416b2fb..ade9200de41a 100644 --- a/keyboards/makeymakey/makeymakey.c +++ b/keyboards/makeymakey/makeymakey.c @@ -108,7 +108,7 @@ void cycle_leds(void) { } } -void matrix_scan_kb() { +void matrix_scan_kb(void) { cycle_leds(); matrix_scan_user(); } diff --git a/keyboards/matrix/noah/keymaps/blockader/keymap.c b/keyboards/matrix/noah/keymaps/blockader/keymap.c index cec0905677d5..b6caf43f91ff 100644 --- a/keyboards/matrix/noah/keymaps/blockader/keymap.c +++ b/keyboards/matrix/noah/keymaps/blockader/keymap.c @@ -645,7 +645,7 @@ bool process_record_user(uint16_t key, keyrecord_t* record) { return handle_common_key(key, record); } -void keyboard_post_init_user() { +void keyboard_post_init_user(void) { rgblight_disable_noeeprom(); rgb_matrix_disable(); common_layer_data.back = false; diff --git a/keyboards/mechwild/bbs/bbs.c b/keyboards/mechwild/bbs/bbs.c index 02c5f43dd993..9a7253e5dac7 100644 --- a/keyboards/mechwild/bbs/bbs.c +++ b/keyboards/mechwild/bbs/bbs.c @@ -16,7 +16,7 @@ bool dip_switch_update_kb(uint8_t index, bool active) { } #endif -void eeconfig_init_kb() { +void eeconfig_init_kb(void) { steno_set_mode(STENO_MODE_GEMINI); // or STENO_MODE_BOLT eeconfig_init_user(); } \ No newline at end of file diff --git a/keyboards/nek_type_a/mcp23017.c b/keyboards/nek_type_a/mcp23017.c index 1434fa56c40c..6c8ccb4ff1c7 100644 --- a/keyboards/nek_type_a/mcp23017.c +++ b/keyboards/nek_type_a/mcp23017.c @@ -53,7 +53,7 @@ void expander_init(void) { } // set IN and HI -void expander_unselect_all() { +void expander_unselect_all(void) { expander_write(EXPANDER_REG_IODIRA, 0xff); expander_write(EXPANDER_REG_IODIRB, 0xff); expander_write(EXPANDER_REG_OLATA, 0xff); @@ -74,7 +74,7 @@ void expander_select(uint8_t pin) { wait_us(EXPANDER_PAUSE); } -void expander_config() { +void expander_config(void) { // set everything to input expander_write(EXPANDER_REG_IODIRA, 0xff); expander_write(EXPANDER_REG_IODIRB, 0xff); diff --git a/keyboards/neopad/rev1/rev1.c b/keyboards/neopad/rev1/rev1.c index 20e2c4d0555a..665294451afe 100755 --- a/keyboards/neopad/rev1/rev1.c +++ b/keyboards/neopad/rev1/rev1.c @@ -22,7 +22,7 @@ void keyboard_pre_init_kb(void) { keyboard_pre_init_user(); } -void shutdown_user() { +void shutdown_user(void) { // Shutdown LEDs writePinLow(LED_00); writePinLow(LED_01); diff --git a/keyboards/opendeck/32/rev1/rev1.c b/keyboards/opendeck/32/rev1/rev1.c index b803682b7d63..5d546afb2983 100644 --- a/keyboards/opendeck/32/rev1/rev1.c +++ b/keyboards/opendeck/32/rev1/rev1.c @@ -102,7 +102,7 @@ void keyboard_pre_init_kb(void) { setPinInput(RGB_IRQ_N_PIN); } -void keyboard_post_init_user() { +void keyboard_post_init_user(void) { // RGB enabled by default, no way to turn off. No need to expend EEPROM write cycles here. rgb_matrix_enable_noeeprom(); } diff --git a/keyboards/planck/keymaps/circuit/keymap.c b/keyboards/planck/keymaps/circuit/keymap.c index 4b3db082a764..d150905dc89c 100644 --- a/keyboards/planck/keymaps/circuit/keymap.c +++ b/keyboards/planck/keymaps/circuit/keymap.c @@ -219,13 +219,13 @@ void matrix_init_user(void) { #ifdef AUDIO_ENABLE -void startup_user() +void startup_user(void) { _delay_ms(20); // gets rid of tick PLAY_SONG(tone_startup); } -void shutdown_user() +void shutdown_user(void) { PLAY_SONG(tone_goodbye); _delay_ms(150); diff --git a/keyboards/planck/keymaps/dbroqua/keymap.c b/keyboards/planck/keymaps/dbroqua/keymap.c index 6096b51dde14..95d0b8540872 100644 --- a/keyboards/planck/keymaps/dbroqua/keymap.c +++ b/keyboards/planck/keymaps/dbroqua/keymap.c @@ -192,13 +192,13 @@ void matrix_init_user(void) { #ifdef AUDIO_ENABLE -void startup_user() +void startup_user(void) { _delay_ms(20); // gets rid of tick PLAY_SONG(tone_startup); } -void shutdown_user() +void shutdown_user(void) { PLAY_SONG(tone_goodbye); _delay_ms(150); diff --git a/keyboards/planck/keymaps/dcompact/keymap.c b/keyboards/planck/keymaps/dcompact/keymap.c index 0e09d21efba3..a63f86e7a8ca 100644 --- a/keyboards/planck/keymaps/dcompact/keymap.c +++ b/keyboards/planck/keymaps/dcompact/keymap.c @@ -357,6 +357,6 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) { return true; } -void matrix_init_user() { +void matrix_init_user(void) { steno_set_mode(STENO_MODE_GEMINI); } diff --git a/keyboards/planck/keymaps/dr_notsokind/keymap.c b/keyboards/planck/keymaps/dr_notsokind/keymap.c index 0338e1806edb..ffceef11cca6 100644 --- a/keyboards/planck/keymaps/dr_notsokind/keymap.c +++ b/keyboards/planck/keymaps/dr_notsokind/keymap.c @@ -312,13 +312,13 @@ void matrix_init_user(void) { #ifdef AUDIO_ENABLE -void startup_user() +void startup_user(void) { _delay_ms(20); // gets rid of tick PLAY_SONG(tone_startup); } -void shutdown_user() +void shutdown_user(void) { PLAY_SONG(tone_goodbye); _delay_ms(150); diff --git a/keyboards/planck/keymaps/emilyh/keymap.c b/keyboards/planck/keymaps/emilyh/keymap.c index 91e5c5fb3736..17bbc98b7e3b 100644 --- a/keyboards/planck/keymaps/emilyh/keymap.c +++ b/keyboards/planck/keymaps/emilyh/keymap.c @@ -282,13 +282,13 @@ void matrix_init_user(void) { #ifdef AUDIO_ENABLE -void startup_user() +void startup_user(void) { _delay_ms(20); // gets rid of tick PLAY_SONG(tone_startup); } -void shutdown_user() +void shutdown_user(void) { PLAY_SONG(tone_goodbye); _delay_ms(150); diff --git a/keyboards/planck/keymaps/experimental/keymap.c b/keyboards/planck/keymaps/experimental/keymap.c index ecb13848d13d..e0ade650febb 100644 --- a/keyboards/planck/keymaps/experimental/keymap.c +++ b/keyboards/planck/keymaps/experimental/keymap.c @@ -347,13 +347,13 @@ void matrix_init_user(void) { } #ifdef AUDIO_ENABLE -void startup_user() +void startup_user(void) { _delay_ms(20); // gets rid of tick PLAY_SONG(tone_startup); } -void shutdown_user() +void shutdown_user(void) { PLAY_SONG(tone_goodbye); _delay_ms(150); diff --git a/keyboards/planck/keymaps/gunp/keymap.c b/keyboards/planck/keymaps/gunp/keymap.c index 555b073839ea..7c2f6c0bd57c 100644 --- a/keyboards/planck/keymaps/gunp/keymap.c +++ b/keyboards/planck/keymaps/gunp/keymap.c @@ -293,13 +293,13 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) { float music_scale[][2] = SONG(MUSIC_SCALE_SOUND); #endif -void startup_user() { +void startup_user(void) { #ifdef AUDIO_ENABLE PLAY_SONG(tone_startup); #endif } -void shutdown_user() { +void shutdown_user(void) { #ifdef AUDIO_ENABLE PLAY_SONG(tone_goodbye); stop_all_notes(); diff --git a/keyboards/planck/keymaps/handwired_binaryplease/keymap.c b/keyboards/planck/keymaps/handwired_binaryplease/keymap.c index b5e8484bdd6c..13917e516d5f 100644 --- a/keyboards/planck/keymaps/handwired_binaryplease/keymap.c +++ b/keyboards/planck/keymaps/handwired_binaryplease/keymap.c @@ -280,13 +280,13 @@ void matrix_init_user(void) { #ifdef AUDIO_ENABLE -void startup_user() +void startup_user(void) { _delay_ms(20); // gets rid of tick PLAY_SONG(tone_startup); } -void shutdown_user() +void shutdown_user(void) { PLAY_SONG(tone_goodbye); _delay_ms(150); diff --git a/keyboards/planck/keymaps/impossible/keymap.c b/keyboards/planck/keymaps/impossible/keymap.c index 07872d0d7fa6..9145ad79aae6 100644 --- a/keyboards/planck/keymaps/impossible/keymap.c +++ b/keyboards/planck/keymaps/impossible/keymap.c @@ -205,13 +205,13 @@ void matrix_init_user(void) { #ifdef AUDIO_ENABLE -void startup_user() +void startup_user(void) { _delay_ms(20); // gets rid of tick PLAY_SONG(tone_startup); } -void shutdown_user() +void shutdown_user(void) { PLAY_SONG(tone_goodbye); _delay_ms(150); diff --git a/keyboards/planck/keymaps/ishtob/keymap.c b/keyboards/planck/keymaps/ishtob/keymap.c index 48cce5942060..eebafddbed79 100644 --- a/keyboards/planck/keymaps/ishtob/keymap.c +++ b/keyboards/planck/keymaps/ishtob/keymap.c @@ -321,7 +321,7 @@ void matrix_init_keymap(void) { #ifdef AUDIO_ENABLE -void startup_user() +void startup_user(void) { #ifdef RGB_MATRIX_ENABLE rgblight_mode(RGB_MATRIX_CYCLE_ALL); @@ -330,7 +330,7 @@ void startup_user() PLAY_SONG(tone_startup); } -void shutdown_user() +void shutdown_user(void) { PLAY_SONG(tone_goodbye); wait_ms(150); diff --git a/keyboards/planck/keymaps/jhenahan/keymap.c b/keyboards/planck/keymaps/jhenahan/keymap.c index 92b3d16e2efd..21c489922da4 100644 --- a/keyboards/planck/keymaps/jhenahan/keymap.c +++ b/keyboards/planck/keymaps/jhenahan/keymap.c @@ -277,13 +277,13 @@ void matrix_init_user(void) { #ifdef AUDIO_ENABLE -void startup_user() +void startup_user(void) { _delay_ms(20); // gets rid of tick PLAY_SONG(tone_startup); } -void shutdown_user() +void shutdown_user(void) { PLAY_SONG(tone_goodbye); _delay_ms(150); diff --git a/keyboards/planck/keymaps/lae3/keymap.c b/keyboards/planck/keymaps/lae3/keymap.c index 87845b0f3299..7b6175d5437b 100644 --- a/keyboards/planck/keymaps/lae3/keymap.c +++ b/keyboards/planck/keymaps/lae3/keymap.c @@ -227,13 +227,13 @@ void matrix_init_user(void) #ifdef AUDIO_ENABLE -void startup_user() +void startup_user(void) { _delay_ms(100); // gets rid of tick PLAY_SONG(tone_startup); } -void shutdown_user() +void shutdown_user(void) { PLAY_SONG(tone_goodbye); _delay_ms(150); diff --git a/keyboards/planck/keymaps/mjt/keymap.c b/keyboards/planck/keymaps/mjt/keymap.c index 2b5ce9d2066a..e927627e1f70 100644 --- a/keyboards/planck/keymaps/mjt/keymap.c +++ b/keyboards/planck/keymaps/mjt/keymap.c @@ -248,13 +248,13 @@ void matrix_init_user(void) { #ifdef AUDIO_ENABLE -void startup_user() +void startup_user(void) { _delay_ms(20); // gets rid of tick PLAY_SONG(tone_startup); } -void shutdown_user() +void shutdown_user(void) { PLAY_SONG(tone_goodbye); _delay_ms(150); diff --git a/keyboards/planck/keymaps/mjtnumsym/keymap.c b/keyboards/planck/keymaps/mjtnumsym/keymap.c index 81ba8d9ee086..3fa05ad1789c 100644 --- a/keyboards/planck/keymaps/mjtnumsym/keymap.c +++ b/keyboards/planck/keymaps/mjtnumsym/keymap.c @@ -247,13 +247,13 @@ void matrix_init_user(void) { #ifdef AUDIO_ENABLE -void startup_user() +void startup_user(void) { _delay_ms(20); // gets rid of tick PLAY_SONG(tone_startup); } -void shutdown_user() +void shutdown_user(void) { PLAY_SONG(tone_goodbye); _delay_ms(150); diff --git a/keyboards/planck/keymaps/originerd/keymap.c b/keyboards/planck/keymaps/originerd/keymap.c index 917e59f0bbb3..85e5cd3b1642 100644 --- a/keyboards/planck/keymaps/originerd/keymap.c +++ b/keyboards/planck/keymaps/originerd/keymap.c @@ -158,13 +158,13 @@ void matrix_init_user(void) { #ifdef AUDIO_ENABLE -void startup_user() +void startup_user(void) { _delay_ms(20); // gets rid of tick PLAY_SONG(tone_startup); } -void shutdown_user() +void shutdown_user(void) { PLAY_SONG(tone_goodbye); _delay_ms(150); diff --git a/keyboards/planck/keymaps/premek/keymap.c b/keyboards/planck/keymaps/premek/keymap.c index 402a603ece44..76d3cabfbc71 100644 --- a/keyboards/planck/keymaps/premek/keymap.c +++ b/keyboards/planck/keymaps/premek/keymap.c @@ -194,13 +194,13 @@ void matrix_init_user(void) { #ifdef AUDIO_ENABLE -void startup_user() +void startup_user(void) { _delay_ms(20); // gets rid of tick PLAY_SONG(tone_startup); } -void shutdown_user() +void shutdown_user(void) { PLAY_SONG(tone_goodbye); _delay_ms(150); diff --git a/keyboards/planck/keymaps/sgoodwin/keymap.c b/keyboards/planck/keymaps/sgoodwin/keymap.c index 1b88afd9527c..e61cd4de6820 100644 --- a/keyboards/planck/keymaps/sgoodwin/keymap.c +++ b/keyboards/planck/keymaps/sgoodwin/keymap.c @@ -198,13 +198,13 @@ void matrix_init_user(void) { #ifdef AUDIO_ENABLE -void startup_user() +void startup_user(void) { _delay_ms(20); // gets rid of tick PLAY_SONG(tone_startup); } -void shutdown_user() +void shutdown_user(void) { PLAY_SONG(tone_goodbye); _delay_ms(150); diff --git a/keyboards/planck/keymaps/smt/keymap.c b/keyboards/planck/keymaps/smt/keymap.c index 3c6eb6e74c01..6320e11fcf76 100644 --- a/keyboards/planck/keymaps/smt/keymap.c +++ b/keyboards/planck/keymaps/smt/keymap.c @@ -230,13 +230,13 @@ void matrix_init_user(void) { #ifdef AUDIO_ENABLE -void startup_user() +void startup_user(void) { _delay_ms(20); // gets rid of tick PLAY_SONG(tone_startup); } -void shutdown_user() +void shutdown_user(void) { PLAY_SONG(tone_goodbye); _delay_ms(150); diff --git a/keyboards/planck/keymaps/that_canadian/keymap.c b/keyboards/planck/keymaps/that_canadian/keymap.c index bb9ff261ee64..9f3a415fa33e 100644 --- a/keyboards/planck/keymaps/that_canadian/keymap.c +++ b/keyboards/planck/keymaps/that_canadian/keymap.c @@ -182,13 +182,13 @@ void matrix_init_user(void) { #ifdef AUDIO_ENABLE -void startup_user() +void startup_user(void) { _delay_ms(20); // gets rid of tick PLAY_SONG(tone_startup); } -void shutdown_user() +void shutdown_user(void) { PLAY_SONG(tone_goodbye); _delay_ms(150); diff --git a/keyboards/planck/keymaps/vaire/keymap.c b/keyboards/planck/keymaps/vaire/keymap.c index 3b411e6185ba..05f7f4a5201e 100644 --- a/keyboards/planck/keymaps/vaire/keymap.c +++ b/keyboards/planck/keymaps/vaire/keymap.c @@ -124,13 +124,13 @@ void led_set_user(uint8_t usb_led) } -void startup_user() +void startup_user(void) { _delay_ms(30); // gets rid of tick PLAY_SONG(tone_my_startup); } -void shutdown_user() +void shutdown_user(void) { PLAY_SONG(tone_my_goodbye); _delay_ms(3000); diff --git a/keyboards/planck/keymaps/yttyx/keymap.c b/keyboards/planck/keymaps/yttyx/keymap.c index 8c989da8a8b6..1201163ac7d1 100644 --- a/keyboards/planck/keymaps/yttyx/keymap.c +++ b/keyboards/planck/keymaps/yttyx/keymap.c @@ -90,6 +90,6 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { }; -void matrix_init_user() { +void matrix_init_user(void) { steno_set_mode(STENO_MODE_GEMINI); } diff --git a/keyboards/planck/keymaps/zach/zach_common_functions.c b/keyboards/planck/keymaps/zach/zach_common_functions.c index 97b650d9cbc0..6ad1c7bed337 100644 --- a/keyboards/planck/keymaps/zach/zach_common_functions.c +++ b/keyboards/planck/keymaps/zach/zach_common_functions.c @@ -427,7 +427,7 @@ void play_goodbye_tone(void){ _delay_ms(150); } -void shutdown_user(){ +void shutdown_user(void){ PLAY_SONG(tone_goodbye); _delay_ms(150); stop_all_notes(); diff --git a/keyboards/preonic/keymaps/0xdec/keymap.c b/keyboards/preonic/keymaps/0xdec/keymap.c index 4cf3a21049b2..fafa5c44605e 100644 --- a/keyboards/preonic/keymaps/0xdec/keymap.c +++ b/keyboards/preonic/keymaps/0xdec/keymap.c @@ -98,11 +98,11 @@ float tone_game[][2] = { float tone_goodbye[][2] = SONG(GOODBYE_SOUND); float music_scale[][2] = SONG(MUSIC_SCALE_SOUND); -void startup_user() { +void startup_user(void) { _delay_ms(20); // gets rid of tick PLAY_SONG(tone_startup); } -void shutdown_user() { +void shutdown_user(void) { PLAY_SONG(tone_goodbye); _delay_ms(150); stop_all_notes(); diff --git a/keyboards/preonic/keymaps/bucktooth/keymap.c b/keyboards/preonic/keymaps/bucktooth/keymap.c index b68a93ba3c6d..593083f20152 100644 --- a/keyboards/preonic/keymaps/bucktooth/keymap.c +++ b/keyboards/preonic/keymaps/bucktooth/keymap.c @@ -91,12 +91,12 @@ void matrix_init_user(void) { #ifdef AUDIO_ENABLE -void startup_user() +void startup_user(void) { PLAY_SONG(tone_startup); } -void shutdown_user() +void shutdown_user(void) { PLAY_SONG(tone_goodbye); stop_all_notes(); diff --git a/keyboards/preonic/keymaps/jacwib/keymap.c b/keyboards/preonic/keymaps/jacwib/keymap.c index 774b2a0c4e89..9de460c2a47b 100644 --- a/keyboards/preonic/keymaps/jacwib/keymap.c +++ b/keyboards/preonic/keymaps/jacwib/keymap.c @@ -258,13 +258,13 @@ void matrix_init_user(void) { #ifdef AUDIO_ENABLE -void startup_user() +void startup_user(void) { _delay_ms(20); // gets rid of tick PLAY_SONG(tone_startup); } -void shutdown_user() +void shutdown_user(void) { PLAY_SONG(tone_goodbye); _delay_ms(150); diff --git a/keyboards/preonic/keymaps/mverteuil/keymap.c b/keyboards/preonic/keymaps/mverteuil/keymap.c index 332e2877b286..e81f38362aa6 100644 --- a/keyboards/preonic/keymaps/mverteuil/keymap.c +++ b/keyboards/preonic/keymaps/mverteuil/keymap.c @@ -242,7 +242,7 @@ float s_audio_on[][2] = AUDIO_ON_SONG; float s_layer_lower[][2] = LAYER_LOWER_SONG; float s_layer_raise[][2] = LAYER_RAISE_SONG; -void audio_on_user() { PLAY_SONG(s_audio_on); }; +void audio_on_user(void) { PLAY_SONG(s_audio_on); }; bool process_record_user(uint16_t keycode, keyrecord_t *record) { switch (keycode) { diff --git a/keyboards/preonic/keymaps/mverteuil_2x2u/keymap.c b/keyboards/preonic/keymaps/mverteuil_2x2u/keymap.c index c6cad0fe5fdc..cab5cdcb05dc 100644 --- a/keyboards/preonic/keymaps/mverteuil_2x2u/keymap.c +++ b/keyboards/preonic/keymaps/mverteuil_2x2u/keymap.c @@ -218,7 +218,7 @@ float s_audio_on[][2] = AUDIO_ON_SONG; float s_layer_lower[][2] = LAYER_LOWER_SONG; float s_layer_raise[][2] = LAYER_RAISE_SONG; -void audio_on_user() { PLAY_SONG(s_audio_on); }; +void audio_on_user(void) { PLAY_SONG(s_audio_on); }; bool process_record_user(uint16_t keycode, keyrecord_t *record) { switch (keycode) { diff --git a/keyboards/preonic/keymaps/nikchi/keymap.c b/keyboards/preonic/keymaps/nikchi/keymap.c index 9510791d2aeb..e14f8f0052c4 100644 --- a/keyboards/preonic/keymaps/nikchi/keymap.c +++ b/keyboards/preonic/keymaps/nikchi/keymap.c @@ -186,13 +186,13 @@ void matrix_init_user(void) { #ifdef AUDIO_ENABLE -void startup_user() +void startup_user(void) { _delay_ms(20); // gets rid of tick PLAY_SONG(tone_startup); } -void shutdown_user() +void shutdown_user(void) { PLAY_SONG(tone_goodbye); _delay_ms(150); diff --git a/keyboards/preonic/keymaps/smt/keymap.c b/keyboards/preonic/keymaps/smt/keymap.c index 80c704de320b..7dd9545261b9 100644 --- a/keyboards/preonic/keymaps/smt/keymap.c +++ b/keyboards/preonic/keymaps/smt/keymap.c @@ -251,13 +251,13 @@ void matrix_init_user(void) { #ifdef AUDIO_ENABLE -void startup_user() +void startup_user(void) { _delay_ms(20); // gets rid of tick PLAY_SONG(tone_startup); } -void shutdown_user() +void shutdown_user(void) { PLAY_SONG(tone_goodbye); _delay_ms(150); diff --git a/keyboards/preonic/keymaps/that_canadian/keymap.c b/keyboards/preonic/keymaps/that_canadian/keymap.c index 0c2a05fa14ff..8af796821c2a 100644 --- a/keyboards/preonic/keymaps/that_canadian/keymap.c +++ b/keyboards/preonic/keymaps/that_canadian/keymap.c @@ -210,13 +210,13 @@ void matrix_init_user(void) { #ifdef AUDIO_ENABLE -void startup_user() +void startup_user(void) { _delay_ms(20); // gets rid of tick PLAY_SONG(tone_startup); } -void shutdown_user() +void shutdown_user(void) { PLAY_SONG(tone_goodbye); _delay_ms(150); diff --git a/keyboards/preonic/keymaps/trigotometry/keymap.c b/keyboards/preonic/keymaps/trigotometry/keymap.c index aa734328b55c..419f7a10bad6 100644 --- a/keyboards/preonic/keymaps/trigotometry/keymap.c +++ b/keyboards/preonic/keymaps/trigotometry/keymap.c @@ -157,7 +157,7 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) { // {NOTE_E5, 8} // }; -// void startup_user() +// void startup_user(void) // { // _delay_ms(20); // gets rid of tick // PLAY_SONG(tone_startup); diff --git a/keyboards/preonic/keymaps/zach/zach_common_functions.c b/keyboards/preonic/keymaps/zach/zach_common_functions.c index 97b650d9cbc0..6ad1c7bed337 100644 --- a/keyboards/preonic/keymaps/zach/zach_common_functions.c +++ b/keyboards/preonic/keymaps/zach/zach_common_functions.c @@ -427,7 +427,7 @@ void play_goodbye_tone(void){ _delay_ms(150); } -void shutdown_user(){ +void shutdown_user(void){ PLAY_SONG(tone_goodbye); _delay_ms(150); stop_all_notes(); diff --git a/keyboards/reviung/reviung41/keymaps/ciutadellla/keymap.c b/keyboards/reviung/reviung41/keymaps/ciutadellla/keymap.c index d6962664b13d..98dda7fe1994 100644 --- a/keyboards/reviung/reviung41/keymaps/ciutadellla/keymap.c +++ b/keyboards/reviung/reviung41/keymaps/ciutadellla/keymap.c @@ -132,7 +132,7 @@ }; - void matrix_init_user(){ + void matrix_init_user(void){ set_unicode_input_mode(UNICODE_MODE_MACOS); } diff --git a/keyboards/rgbkb/sol3/rev1/rev1.c b/keyboards/rgbkb/sol3/rev1/rev1.c index c66e145e8041..de5836e06198 100644 --- a/keyboards/rgbkb/sol3/rev1/rev1.c +++ b/keyboards/rgbkb/sol3/rev1/rev1.c @@ -105,7 +105,7 @@ bool touch_encoder_tapped_kb(uint8_t index, uint8_t section) { return false; } -void matrix_slave_scan_kb() { +void matrix_slave_scan_kb(void) { dip_switch_read(false); matrix_slave_scan_user(); } diff --git a/keyboards/sekigon/grs_70ec/grs_70ec.c b/keyboards/sekigon/grs_70ec/grs_70ec.c index e8791c00c13c..e855a80dcff7 100644 --- a/keyboards/sekigon/grs_70ec/grs_70ec.c +++ b/keyboards/sekigon/grs_70ec/grs_70ec.c @@ -23,7 +23,7 @@ void led_on(void) { void led_off(void) { writePinLow(D2); } -void keyboard_post_init_kb() { +void keyboard_post_init_kb(void) { led_on(); keyboard_post_init_user(); diff --git a/keyboards/sneakbox/aliceclone/aliceclone.c b/keyboards/sneakbox/aliceclone/aliceclone.c index 9457c641df36..9cfb4e551d3c 100644 --- a/keyboards/sneakbox/aliceclone/aliceclone.c +++ b/keyboards/sneakbox/aliceclone/aliceclone.c @@ -17,7 +17,7 @@ along with this program. If not, see . #include "aliceclone.h" -void keyboard_pre_init_kb() { +void keyboard_pre_init_kb(void) { setPinOutput(D7); setPinOutput(D6); setPinOutput(D4); diff --git a/keyboards/splitkb/kyria/keymaps/cwebster2/keymap.c b/keyboards/splitkb/kyria/keymaps/cwebster2/keymap.c index 1abf865010c5..9c31e2617c34 100644 --- a/keyboards/splitkb/kyria/keymaps/cwebster2/keymap.c +++ b/keyboards/splitkb/kyria/keymaps/cwebster2/keymap.c @@ -252,7 +252,7 @@ bool led_update_user(led_t led_state) { #endif #ifdef OLED_ENABLE -void suspend_power_down_user() { +void suspend_power_down_user(void) { oled_clear(); oled_off(); } diff --git a/keyboards/stenokeyboards/the_uni/keymaps/default/keymap.c b/keyboards/stenokeyboards/the_uni/keymaps/default/keymap.c index 492c7a3c9422..74aa207bd5d5 100644 --- a/keyboards/stenokeyboards/the_uni/keymaps/default/keymap.c +++ b/keyboards/stenokeyboards/the_uni/keymaps/default/keymap.c @@ -31,6 +31,6 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { }; - void matrix_init_user() { + void matrix_init_user(void) { steno_set_mode(STENO_MODE_GEMINI); // or STENO_MODE_BOLT } diff --git a/keyboards/thevankeyboards/minivan/keymaps/josjoha/keymap.c b/keyboards/thevankeyboards/minivan/keymaps/josjoha/keymap.c index 92356446fdaf..a1d82e992305 100644 --- a/keyboards/thevankeyboards/minivan/keymaps/josjoha/keymap.c +++ b/keyboards/thevankeyboards/minivan/keymaps/josjoha/keymap.c @@ -288,7 +288,7 @@ void speed_led (int speed) { // do this in one place to handle left/right leds being off here -void isolate_rgblight_set () { +void isolate_rgblight_set (void) { # ifdef RGBLIGHT_ENABLE if (!leds_on) { // left/right leds are off diff --git a/keyboards/wilba_tech/wt65_xt/keymaps/zunger/keymap.c b/keyboards/wilba_tech/wt65_xt/keymaps/zunger/keymap.c index 45778e169831..b0dfa3e03c89 100644 --- a/keyboards/wilba_tech/wt65_xt/keymaps/zunger/keymap.c +++ b/keyboards/wilba_tech/wt65_xt/keymaps/zunger/keymap.c @@ -435,7 +435,7 @@ void toggle_os_mode(void) { set_os_mode((os_mode + 1) % _OS_MODES_MAX); } -void keyboard_post_init_user() { +void keyboard_post_init_user(void) { set_os_mode(_WINDOWS); } diff --git a/keyboards/wilba_tech/wt70_jb/wt70_jb.c b/keyboards/wilba_tech/wt70_jb/wt70_jb.c index d4f2c5c8daab..df44b2f9b877 100644 --- a/keyboards/wilba_tech/wt70_jb/wt70_jb.c +++ b/keyboards/wilba_tech/wt70_jb/wt70_jb.c @@ -49,7 +49,7 @@ void via_init_kb(void) } } -void keyboard_post_init_kb() { +void keyboard_post_init_kb(void) { // This is a workaround to ensure "EEPROM cleared" PCBs will // start with the RGB test mode, essential for testing LEDs. if ( g_first_execution ) { diff --git a/keyboards/woodkeys/meira/TWIlib.c b/keyboards/woodkeys/meira/TWIlib.c index 8f5658fcdba8..89e03a73d440 100755 --- a/keyboards/woodkeys/meira/TWIlib.c +++ b/keyboards/woodkeys/meira/TWIlib.c @@ -24,7 +24,7 @@ int RXBuffLen; // The total number of bytes to read (should be less than RXMAXBU TWIInfoStruct TWIInfo; -void TWIInit() +void TWIInit(void) { TWIInfo.mode = Ready; TWIInfo.errorCode = 0xFF; @@ -37,7 +37,7 @@ void TWIInit() TWCR = (1 << TWIE) | (1 << TWEN); } -uint8_t isTWIReady() +uint8_t isTWIReady(void) { if ( (TWIInfo.mode == Ready) | (TWIInfo.mode == RepeatedStartSent) ) { diff --git a/keyboards/woodkeys/meira/lighting.c b/keyboards/woodkeys/meira/lighting.c index 1a3c954bcffb..6cbe101dbc48 100755 --- a/keyboards/woodkeys/meira/lighting.c +++ b/keyboards/woodkeys/meira/lighting.c @@ -56,14 +56,14 @@ void set_backlight_by_keymap(uint8_t col, uint8_t row){ // activateLED(matrix, led_col, led_row, 255); } -void force_issi_refresh(){ +void force_issi_refresh(void){ issi_devices[0]->led_dirty = true; update_issi(0, true); issi_devices[3]->led_dirty = true; update_issi(3, true); } -void led_test(){ +void led_test(void){ #ifdef WATCHDOG_ENABLE // This test take a long time to run, disable the WTD until its complete wdt_disable(); diff --git a/keyboards/woodkeys/meira/meira.c b/keyboards/woodkeys/meira/meira.c index 87a6d11b4eed..d8c04859e2d8 100644 --- a/keyboards/woodkeys/meira/meira.c +++ b/keyboards/woodkeys/meira/meira.c @@ -86,7 +86,7 @@ bool process_record_kb(uint16_t keycode, keyrecord_t *record) { return process_record_user(keycode, record); } -void reset_keyboard_kb(){ +void reset_keyboard_kb(void){ #ifdef WATCHDOG_ENABLE MCUSR = 0; wdt_disable(); diff --git a/keyboards/xiudi/xd75/keymaps/colinta/keymap.c b/keyboards/xiudi/xd75/keymaps/colinta/keymap.c index 5cdbdd6c7439..3cf286aeb517 100644 --- a/keyboards/xiudi/xd75/keymaps/colinta/keymap.c +++ b/keyboards/xiudi/xd75/keymaps/colinta/keymap.c @@ -205,7 +205,7 @@ void taphold_tapped(uint8_t index, bool pressed) { } } -void matrix_scan_user() { +void matrix_scan_user(void) { for (uint8_t index = 0 ; index < TH_EVENTS_COUNT ; ++index ) { tap_hold_t *th_event = &th_events[index]; if ( th_event->is_pressed && timer_elapsed(th_event->timer) > LONGPRESS_DELAY) { diff --git a/keyboards/xiudi/xd96/keymaps/uuupah/keymap.c b/keyboards/xiudi/xd96/keymaps/uuupah/keymap.c index 5fb6ed2b59bb..b554860c204c 100644 --- a/keyboards/xiudi/xd96/keymaps/uuupah/keymap.c +++ b/keyboards/xiudi/xd96/keymaps/uuupah/keymap.c @@ -19,7 +19,7 @@ #define LT_ENT2 LT(2,KC_ENT) #ifdef RGBLIGHT_ENABLE -void matrix_init_user() { +void matrix_init_user(void) { rgblight_disable(); } #endif diff --git a/platforms/avr/drivers/audio_pwm_hardware.c b/platforms/avr/drivers/audio_pwm_hardware.c index 78776ee48a9f..2fc448ea5808 100644 --- a/platforms/avr/drivers/audio_pwm_hardware.c +++ b/platforms/avr/drivers/audio_pwm_hardware.c @@ -217,7 +217,7 @@ void channel_2_stop(void) { } #endif -void audio_driver_initialize() { +void audio_driver_initialize(void) { #ifdef AUDIO1_PIN_SET channel_1_stop(); setPinOutput(AUDIO1_PIN); @@ -258,7 +258,7 @@ void audio_driver_initialize() { #endif } -void audio_driver_stop() { +void audio_driver_stop(void) { #ifdef AUDIO1_PIN_SET channel_1_stop(); #endif diff --git a/platforms/chibios/drivers/audio_dac_additive.c b/platforms/chibios/drivers/audio_dac_additive.c index db07c4b39349..68ce13788ec4 100644 --- a/platforms/chibios/drivers/audio_dac_additive.c +++ b/platforms/chibios/drivers/audio_dac_additive.c @@ -281,7 +281,7 @@ static const DACConfig dac_conf = {.init = AUDIO_DAC_OFF_VALUE, .datamode = DAC_ */ static const DACConversionGroup dac_conv_cfg = {.num_channels = 1U, .end_cb = dac_end, .error_cb = dac_error, .trigger = DAC_TRG(0b000)}; -void audio_driver_initialize() { +void audio_driver_initialize(void) { if ((AUDIO_PIN == A4) || (AUDIO_PIN_ALT == A4)) { palSetLineMode(A4, PAL_MODE_INPUT_ANALOG); dacStart(&DACD1, &dac_conf); diff --git a/platforms/chibios/drivers/audio_dac_basic.c b/platforms/chibios/drivers/audio_dac_basic.c index 64439a1e3cee..5f0cbf8f8418 100644 --- a/platforms/chibios/drivers/audio_dac_basic.c +++ b/platforms/chibios/drivers/audio_dac_basic.c @@ -187,7 +187,7 @@ static void gpt_audio_state_cb(GPTDriver *gptp) { } } -void audio_driver_initialize() { +void audio_driver_initialize(void) { if ((AUDIO_PIN == A4) || (AUDIO_PIN_ALT == A4)) { palSetPadMode(GPIOA, 4, PAL_MODE_INPUT_ANALOG); dacStart(&DACD1, &dac_conf_ch1); diff --git a/quantum/action.c b/quantum/action.c index 79ea2b763598..6b5660af8b2d 100644 --- a/quantum/action.c +++ b/quantum/action.c @@ -1050,7 +1050,7 @@ void clear_keyboard_but_mods(void) { * * FIXME: Needs documentation. */ -void clear_keyboard_but_mods_and_keys() { +void clear_keyboard_but_mods_and_keys(void) { #ifdef EXTRAKEY_ENABLE host_system_send(0); host_consumer_send(0); diff --git a/quantum/action_util.c b/quantum/action_util.c index 738410a4acec..7f7d32887b6a 100644 --- a/quantum/action_util.c +++ b/quantum/action_util.c @@ -98,12 +98,12 @@ enum { # if (defined(ONESHOT_TIMEOUT) && (ONESHOT_TIMEOUT > 0)) static uint16_t oneshot_layer_time = 0; -inline bool has_oneshot_layer_timed_out() { +inline bool has_oneshot_layer_timed_out(void) { return TIMER_DIFF_16(timer_read(), oneshot_layer_time) >= ONESHOT_TIMEOUT && !(get_oneshot_layer_state() & ONESHOT_TOGGLED); } # ifdef SWAP_HANDS_ENABLE static uint16_t oneshot_swaphands_time = 0; -inline bool has_oneshot_swaphands_timed_out() { +inline bool has_oneshot_swaphands_timed_out(void) { return TIMER_DIFF_16(timer_read(), oneshot_swaphands_time) >= ONESHOT_TIMEOUT && (swap_hands_oneshot == SHO_ACTIVE); } # endif diff --git a/quantum/audio/audio.c b/quantum/audio/audio.c index c6523b908cd3..ca78a483ad8f 100644 --- a/quantum/audio/audio.c +++ b/quantum/audio/audio.c @@ -112,7 +112,7 @@ static bool audio_initialized = false; static bool audio_driver_stopped = true; audio_config_t audio_config; -void audio_init() { +void audio_init(void) { if (audio_initialized) { return; } @@ -185,7 +185,7 @@ bool audio_is_on(void) { return (audio_config.enable != 0); } -void audio_stop_all() { +void audio_stop_all(void) { if (audio_driver_stopped) { return; } diff --git a/quantum/audio/voices.c b/quantum/audio/voices.c index 1c08a3af366a..01f257f4d4e1 100644 --- a/quantum/audio/voices.c +++ b/quantum/audio/voices.c @@ -36,11 +36,11 @@ void set_voice(voice_type v) { voice = v; } -void voice_iterate() { +void voice_iterate(void) { voice = (voice + 1) % number_of_voices; } -void voice_deiterate() { +void voice_deiterate(void) { voice = (voice - 1 + number_of_voices) % number_of_voices; } diff --git a/quantum/joystick.c b/quantum/joystick.c index 057a018dffb7..02818e4acd39 100644 --- a/quantum/joystick.c +++ b/quantum/joystick.c @@ -111,7 +111,7 @@ int16_t joystick_read_axis(uint8_t axis) { return ranged_val; } -void joystick_read_axes() { +void joystick_read_axes(void) { #if JOYSTICK_AXIS_COUNT > 0 for (int i = 0; i < JOYSTICK_AXIS_COUNT; ++i) { if (joystick_axes[i].input_pin == JS_VIRTUAL_AXIS) { diff --git a/quantum/keyboard.c b/quantum/keyboard.c index 37675ded0b07..1de5f1cd0cd8 100644 --- a/quantum/keyboard.c +++ b/quantum/keyboard.c @@ -238,7 +238,7 @@ __attribute__((weak)) void keyboard_pre_init_kb(void) { * FIXME: needs doc */ -__attribute__((weak)) void keyboard_post_init_user() {} +__attribute__((weak)) void keyboard_post_init_user(void) {} /** \brief keyboard_post_init_kb * diff --git a/quantum/pointing_device/pointing_device_modes.c b/quantum/pointing_device/pointing_device_modes.c index 64a7f0c65437..54557fe0d5b5 100644 --- a/quantum/pointing_device/pointing_device_modes.c +++ b/quantum/pointing_device/pointing_device_modes.c @@ -91,7 +91,7 @@ void set_pointing_mode(pointing_mode_t pointing_mode) { // skip if same if (!memcmp(&pointing_mode_context.mode, &pointing_mode, sizeof(pointing_mode_t))) return; memcpy(&pointing_mode_context.mode, &pointing_mode, sizeof(pointing_mode_t)); - dprintf("PM status saved!\n"); + //dprintf("PM status saved!\n"); // Prevent zero divisor if (!pointing_mode_context.mode.divisor) { pointing_mode_context.mode.divisor = POINTING_DEFAULT_DIVISOR; @@ -116,7 +116,7 @@ void set_pointing_mode_id(uint8_t mode_id) { if (pointing_mode_context.mode.id != mode_id) { pointing_mode_reset(); pointing_mode_context.mode.id = mode_id; - dprintf("PMID Set: %d\n", mode_id); + //dprintf("PMID Set: %d\n", mode_id); } } @@ -130,10 +130,10 @@ void set_pointing_mode_id(uint8_t mode_id) { void toggle_pointing_mode_id(uint8_t mode_id) { if (pointing_mode_context.config.tg_mode_id == mode_id) { pointing_mode_context.config.tg_mode_id = POINTING_MODE_DEFAULT; - dprintf("Toggled PMID: %d\n Off", mode_id); + //dprintf("Toggled PMID: %d\n Off", mode_id); } else { pointing_mode_context.config.tg_mode_id = mode_id; - dprintf("Toggled PMID: %d\n On", mode_id); + //dprintf("Toggled PMID: %d\n On", mode_id); } if (pointing_mode_context.mode.id != pointing_mode_context.config.tg_mode_id) pointing_mode_reset(); } @@ -363,21 +363,24 @@ static report_mouse_t process_pointing_mode(pointing_mode_t pointing_mode, repor // drag scroll mode (sets mouse axes to mouse_report h & v with divisor) case PM_DRAG: # ifdef MOUSE_SCROLL_HIRES_ENABLE - uint8_t cur_divisor = pointing_mode.divisor; - uint8_t drag_multiplier = MAX(MOUSE_SCROLL_MULTIPLIER / cur_divisor, 1); - if (resolution_multiplier & 1 << 2) { - pointing_mode.x *= drag_multiplier; - pointing_mode.divisor = 1; - } + { + uint8_t cur_divisor = pointing_mode.divisor; + if (IS_HIRES_H_ACTIVE) { + uint8_t drag_multiplier = MAX(MOUSE_SCROLL_MULTIPLIER_H / cur_divisor, 1); + pointing_mode.x *= (int16_t)drag_multiplier; + pointing_mode.divisor = 1; + } # endif mouse_report.h = pointing_device_hv_clamp(pointing_mode.x / (int16_t)pointing_mode.divisor); pointing_mode.x -= (int16_t)mouse_report.h * (int16_t)pointing_mode.divisor; # ifdef MOUSE_SCROLL_HIRES_ENABLE - if (resolution_multiplier & 1 << 0) { - pointing_mode.y *= drag_multiplier; - pointing_mode.divisor = 1; - } else { - pointing_mode.divisor = cur_divisor; + if (IS_HIRES_V_ACTIVE) { + uint8_t drag_multiplier = MAX(MOUSE_SCROLL_MULTIPLIER_V / cur_divisor, 1); + pointing_mode.y *= (int16_t)drag_multiplier; + pointing_mode.divisor = 1; + } else { + pointing_mode.divisor = cur_divisor; + } } # endif mouse_report.v = pointing_device_hv_clamp(pointing_mode.y / (int16_t)pointing_mode.divisor); diff --git a/quantum/pointing_device/pointing_device_modes.h b/quantum/pointing_device/pointing_device_modes.h index 1a48cce596cb..5dd02a6d6f1c 100644 --- a/quantum/pointing_device/pointing_device_modes.h +++ b/quantum/pointing_device/pointing_device_modes.h @@ -63,7 +63,11 @@ # define POINTING_PRECISION_DIVISOR 2 #endif #ifndef POINTING_DRAG_DIVISOR -# define POINTING_DRAG_DIVISOR 4 +# ifdef MOUSE_SCROLL_HIRES_ENABLE +# define POINTING_DRAG_DIVISOR 8 +# else +# define POINTING_DRAG_DIVISOR 4 +# endif #endif /* error checking */ diff --git a/quantum/process_keycode/process_audio.c b/quantum/process_keycode/process_audio.c index 03b0af927794..c189dd02b713 100644 --- a/quantum/process_keycode/process_audio.c +++ b/quantum/process_keycode/process_audio.c @@ -62,5 +62,5 @@ void process_audio_all_notes_off(void) { stop_all_notes(); } -__attribute__((weak)) void audio_on_user() {} -__attribute__((weak)) void audio_off_user() {} +__attribute__((weak)) void audio_on_user(void) {} +__attribute__((weak)) void audio_off_user(void) {} diff --git a/quantum/process_keycode/process_auto_shift.c b/quantum/process_keycode/process_auto_shift.c index aaf0cf9142f9..aad1a164ae43 100644 --- a/quantum/process_keycode/process_auto_shift.c +++ b/quantum/process_keycode/process_auto_shift.c @@ -344,7 +344,7 @@ bool get_autoshift_state(void) { return autoshift_flags.enabled; } -uint16_t get_generic_autoshift_timeout() { +uint16_t get_generic_autoshift_timeout(void) { return autoshift_timeout; } __attribute__((weak)) uint16_t get_autoshift_timeout(uint16_t keycode, keyrecord_t *record) { @@ -484,7 +484,7 @@ void retroshift_poll_time(keyevent_t *event) { retroshift_time = timer_read(); } // Used to swap the times of Retro Shifted key and Auto Shift key that interrupted it. -void retroshift_swap_times() { +void retroshift_swap_times(void) { if (last_retroshift_time != 0 && autoshift_flags.in_progress) { uint16_t temp = retroshift_time; retroshift_time = last_retroshift_time; diff --git a/quantum/process_keycode/process_music.c b/quantum/process_keycode/process_music.c index ee697a0cc6fe..7c572079a719 100644 --- a/quantum/process_keycode/process_music.c +++ b/quantum/process_keycode/process_music.c @@ -317,10 +317,10 @@ void music_task(void) { } } -__attribute__((weak)) void music_on_user() {} +__attribute__((weak)) void music_on_user(void) {} -__attribute__((weak)) void midi_on_user() {} +__attribute__((weak)) void midi_on_user(void) {} -__attribute__((weak)) void music_scale_user() {} +__attribute__((weak)) void music_scale_user(void) {} #endif // defined(AUDIO_ENABLE) || (defined(MIDI_ENABLE) && defined(MIDI_BASIC)) diff --git a/quantum/process_keycode/process_steno.c b/quantum/process_keycode/process_steno.c index 30a0d4056f4e..8ba98bd4bbe6 100644 --- a/quantum/process_keycode/process_steno.c +++ b/quantum/process_keycode/process_steno.c @@ -127,7 +127,7 @@ static const uint16_t combinedmap_second[] PROGMEM = {STN_S2, STN_KL, STN_WL, ST #endif #ifdef STENO_ENABLE_ALL -void steno_init() { +void steno_init(void) { if (!eeconfig_is_enabled()) { eeconfig_init(); } diff --git a/quantum/process_keycode/process_tap_dance.c b/quantum/process_keycode/process_tap_dance.c index fbe4ce1d33b7..706f5cddbb1b 100644 --- a/quantum/process_keycode/process_tap_dance.c +++ b/quantum/process_keycode/process_tap_dance.c @@ -162,7 +162,7 @@ bool process_tap_dance(uint16_t keycode, keyrecord_t *record) { return true; } -void tap_dance_task() { +void tap_dance_task(void) { tap_dance_action_t *action; if (!active_td || timer_elapsed(last_tap_time) <= GET_TAPPING_TERM(active_td, &(keyrecord_t){})) return; diff --git a/quantum/quantum.c b/quantum/quantum.c index eebc94635375..0f68f0bd5b6d 100644 --- a/quantum/quantum.c +++ b/quantum/quantum.c @@ -457,10 +457,10 @@ void update_tri_layer(uint8_t layer1, uint8_t layer2, uint8_t layer3) { } // TODO: remove legacy api -void matrix_init_quantum() { +void matrix_init_quantum(void) { matrix_init_kb(); } -void matrix_scan_quantum() { +void matrix_scan_quantum(void) { matrix_scan_kb(); } @@ -468,9 +468,9 @@ void matrix_scan_quantum() { // Override these functions in your keymap file to play different tunes on // different events such as startup and bootloader jump -__attribute__((weak)) void startup_user() {} +__attribute__((weak)) void startup_user(void) {} -__attribute__((weak)) void shutdown_user() {} +__attribute__((weak)) void shutdown_user(void) {} void suspend_power_down_quantum(void) { suspend_power_down_kb(); diff --git a/tmk_core/protocol/chibios/usb_main.c b/tmk_core/protocol/chibios/usb_main.c index 999e4ff07064..59895f218272 100644 --- a/tmk_core/protocol/chibios/usb_main.c +++ b/tmk_core/protocol/chibios/usb_main.c @@ -70,11 +70,7 @@ uint8_t keyboard_led_state = 0; volatile uint16_t keyboard_idle_count = 0; static virtual_timer_t keyboard_idle_timer; -#if CH_KERNEL_MAJOR >= 7 static void keyboard_idle_timer_cb(struct ch_virtual_timer *, void *arg); -#elif CH_KERNEL_MAJOR <= 6 -static void keyboard_idle_timer_cb(void *arg); -#endif report_keyboard_t keyboard_report_sent = {{0}}; report_mouse_t mouse_report_sent = {0}; @@ -92,7 +88,7 @@ union { report_digitizer_t digitizer; #endif #ifdef JOYSTICK_ENABLE - joystick_report_t joystick; + report_joystick_t joystick; #endif } universal_report_blank = {0}; @@ -559,8 +555,8 @@ static void usb_event_cb(USBDriver *usbp, usbevent_t event) { } #ifdef MOUSE_SCROLL_HIRES_ENABLE /* Reset multiplier on reset */ - resolution_multiplier = 0; -#endif + resolution_multiplier_reset(); +#endif return; case USB_EVENT_WAKEUP: @@ -618,7 +614,7 @@ static void set_led_transfer_cb(USBDriver *usbp) { #ifdef MOUSE_SCROLL_HIRES_ENABLE static void set_multiplier_cb(USBDriver *usbp) { if (usbp->setup[6] == 2 && set_report_buf[0] == REPORT_ID_MULTIPLIER) { - resolution_multiplier = set_report_buf[1]; + mouse_scroll_res_report.data = set_report_buf[1]; } } #endif @@ -654,40 +650,40 @@ static bool usb_request_hook_cb(USBDriver *usbp) { return TRUE; break; # else - if (usbp->setup[2] == REPORT_ID_MULTIPLIER) { - usbSetupTransfer(usbp, (uint8_t *)&resolution_multiplier, sizeof(resolution_multiplier), NULL); - return TRUE; - break; - } else { - usbSetupTransfer(usbp, (uint8_t *)&mouse_report_sent, sizeof(mouse_report_sent), NULL); - return TRUE; - break; + switch (usbp->setup[2]) { + case REPORT_ID_MOUSE: + usbSetupTransfer(usbp, (uint8_t *)&mouse_report_sent, sizeof(mouse_report_sent), NULL); + return TRUE; + break; + case REPORT_ID_MULTIPLIER: + usbSetupTransfer(usbp, (uint8_t *)&mouse_scroll_res_report, sizeof(report_mouse_scroll_res_t), NULL); + return TRUE; + break; } # endif #endif #ifdef SHARED_EP_ENABLE case SHARED_INTERFACE: + switch (usbp->setup[2]) { # ifdef KEYBOARD_SHARED_EP - if (usbp->setup[2] == REPORT_ID_KEYBOARD) { - usbSetupTransfer(usbp, (uint8_t *)&keyboard_report_sent, KEYBOARD_REPORT_SIZE, NULL); - return TRUE; - break; - } + case REPORT_ID_KEYBOARD: + usbSetupTransfer(usbp, (uint8_t *)&keyboard_report_sent, KEYBOARD_REPORT_SIZE, NULL); + return TRUE; + break; # endif # ifdef MOUSE_SHARED_EP - if (usbp->setup[2] == REPORT_ID_MOUSE) { - usbSetupTransfer(usbp, (uint8_t *)&mouse_report_sent, sizeof(mouse_report_sent), NULL); - return TRUE; - break; - } + case REPORT_ID_MOUSE: + usbSetupTransfer(usbp, (uint8_t *)&mouse_report_sent, sizeof(mouse_report_sent), NULL); + return TRUE; + break; +# ifdef MOUSE_SCROLL_HIRES_ENABLE + case REPORT_ID_MULTIPLIER: + usbSetupTransfer(usbp, (uint8_t *)&mouse_scroll_res_report, sizeof(report_mouse_scroll_res_t), NULL); + return TRUE; + break; +# endif # endif -# ifdef MOUSE_SCROLL_HIRES_ENABLE - if (usbp->setup[2] == REPORT_ID_MULTIPLIER) { - usbSetupTransfer(usbp, (uint8_t *)&resolution_multiplier, sizeof(resolution_multiplier), NULL); - return TRUE; - break; } -# endif #endif /* SHARED_EP_ENABLE */ default: universal_report_blank.report_id = usbp->setup[2]; @@ -719,32 +715,35 @@ static bool usb_request_hook_cb(USBDriver *usbp) { #if defined(SHARED_EP_ENABLE) && !defined(KEYBOARD_SHARED_EP) case SHARED_INTERFACE: #endif -#ifndef MOUSE_SCROLL_HIRES_ENABLE +#if defined(MOUSE_ENABLE) && !defined(MOUSE_SHARED_EP) + case MOUSE_INTERFACE: +# ifndef MOUSE_SCROLL_HIRES_ENABLE usbSetupTransfer(usbp, set_report_buf, sizeof(set_report_buf), set_led_transfer_cb); return TRUE; break; -#else - if (usbp->setup[2] == REPORT_ID_MULTIPLIER) { - usbSetupTransfer(usbp, set_report_buf, sizeof(set_report_buf), set_multiplier_cb); - return TRUE; - break; - } else { - usbSetupTransfer(usbp, set_report_buf, sizeof(set_report_buf), set_led_transfer_cb); - return TRUE; - break; +# else + switch (usbp->setup[2]) { + case REPORT_ID_KEYBOARD: + usbSetupTransfer(usbp, set_report_buf, sizeof(set_report_buf), set_led_transfer_cb); + return TRUE; + break; + case REPORT_ID_MULTIPLIER: + if (usbp->setup[3] == 0x03) usbSetupTransfer(usbp, set_report_buf, sizeof(set_report_buf), set_multiplier_cb); + return TRUE; + break; } -#endif +# endif } break; case HID_SET_PROTOCOL: if ((usbp->setup[4] == KEYBOARD_INTERFACE) && (usbp->setup[5] == 0)) { /* wIndex */ keyboard_protocol = ((usbp->setup[2]) != 0x00); /* LSB(wValue) */ -#ifdef NKRO_ENABLE +# ifdef NKRO_ENABLE if (!keyboard_protocol && keyboard_idle) { -#else /* NKRO_ENABLE */ +# else /* NKRO_ENABLE */ if (keyboard_idle) { -#endif /* NKRO_ENABLE */ +# endif /* NKRO_ENABLE */ /* arm the idle timer if boot protocol & idle */ osalSysLockFromISR(); chVTSetI(&keyboard_idle_timer, 4 * TIME_MS2I(keyboard_idle), keyboard_idle_timer_cb, (void *)usbp); @@ -758,11 +757,11 @@ static bool usb_request_hook_cb(USBDriver *usbp) { case HID_SET_IDLE: keyboard_idle = usbp->setup[3]; /* MSB(wValue) */ /* arm the timer */ -#ifdef NKRO_ENABLE +# ifdef NKRO_ENABLE if (!keymap_config.nkro && keyboard_idle) { -#else /* NKRO_ENABLE */ +# else /* NKRO_ENABLE */ if (keyboard_idle) { -#endif /* NKRO_ENABLE */ +# endif /* NKRO_ENABLE */ osalSysLockFromISR(); chVTSetI(&keyboard_idle_timer, 4 * TIME_MS2I(keyboard_idle), keyboard_idle_timer_cb, (void *)usbp); osalSysUnlockFromISR(); @@ -813,23 +812,23 @@ static const USBConfig usbcfg = { /* * Initialize the USB driver */ -void init_usb_driver(USBDriver *usbp) { +void init_usb_driver(USBDriver *usbp) { for (int i = 0; i < NUM_USB_DRIVERS; i++) { -#ifdef USB_ENDPOINTS_ARE_REORDERABLE +# ifdef USB_ENDPOINTS_ARE_REORDERABLE QMKUSBDriver *driver = &drivers.array[i].driver; drivers.array[i].inout_ep_config.in_state = &drivers.array[i].in_ep_state; drivers.array[i].inout_ep_config.out_state = &drivers.array[i].out_ep_state; drivers.array[i].int_ep_config.in_state = &drivers.array[i].int_ep_state; qmkusbObjectInit(driver, &drivers.array[i].config); qmkusbStart(driver, &drivers.array[i].config); -#else - QMKUSBDriver *driver = &drivers.array[i].driver; - drivers.array[i].in_ep_config.in_state = &drivers.array[i].in_ep_state; +# else + QMKUSBDriver *driver = &drivers.array[i].driver; + drivers.array[i].in_ep_config.in_state = &drivers.array[i].in_ep_state; drivers.array[i].out_ep_config.out_state = &drivers.array[i].out_ep_state; - drivers.array[i].int_ep_config.in_state = &drivers.array[i].int_ep_state; + drivers.array[i].int_ep_config.in_state = &drivers.array[i].int_ep_state; qmkusbObjectInit(driver, &drivers.array[i].config); qmkusbStart(driver, &drivers.array[i].config); -#endif +# endif } /* @@ -850,7 +849,7 @@ __attribute__((weak)) void restart_usb_driver(USBDriver *usbp) { usbDisconnectBus(usbp); usbStop(usbp); -#if USB_SUSPEND_WAKEUP_DELAY > 0 +# if USB_SUSPEND_WAKEUP_DELAY > 0 // Some hubs, kvm switches, and monitors do // weird things, with USB device state bouncing // around wildly on wakeup, yielding race @@ -858,7 +857,7 @@ __attribute__((weak)) void restart_usb_driver(USBDriver *usbp) { // // Pause for a while to let things settle... wait_ms(USB_SUSPEND_WAKEUP_DELAY); -#endif +# endif usbStart(usbp, &usbcfg); usbConnectBus(usbp); @@ -871,12 +870,8 @@ __attribute__((weak)) void restart_usb_driver(USBDriver *usbp) { /* Idle requests timer code * callback (called from ISR, unlocked state) */ -#if CH_KERNEL_MAJOR >= 7 static void keyboard_idle_timer_cb(struct ch_virtual_timer *timer, void *arg) { (void)timer; -#elif CH_KERNEL_MAJOR <= 6 -static void keyboard_idle_timer_cb(void *arg) { -#endif USBDriver *usbp = (USBDriver *)arg; osalSysLockFromISR(); @@ -888,11 +883,11 @@ static void keyboard_idle_timer_cb(void *arg) { return; } -#ifdef NKRO_ENABLE +# ifdef NKRO_ENABLE if (!keymap_config.nkro && keyboard_idle && keyboard_protocol) { -#else /* NKRO_ENABLE */ +# else /* NKRO_ENABLE */ if (keyboard_idle && keyboard_protocol) { -#endif /* NKRO_ENABLE */ +# endif /* NKRO_ENABLE */ /* TODO: are we sure we want the KBD_ENDPOINT? */ if (!usbGetTransmitStatusI(usbp, KEYBOARD_IN_EPNUM)) { usbStartTransmitI(usbp, KEYBOARD_IN_EPNUM, (uint8_t *)&keyboard_report_sent, KEYBOARD_EPSIZE); @@ -911,104 +906,62 @@ uint8_t keyboard_leds(void) { return keyboard_led_state; } -/* prepare and start sending a report IN - * not callable from ISR or locked state */ -void send_keyboard(report_keyboard_t *report) { - osalSysLock(); - if (usbGetDriverStateI(&USB_DRIVER) != USB_ACTIVE) { - goto unlock; - } - -#ifdef NKRO_ENABLE - if (keymap_config.nkro && keyboard_protocol) { /* NKRO protocol */ - /* need to wait until the previous packet has made it through */ - /* can rewrite this using the synchronous API, then would wait - * until *after* the packet has been transmitted. I think - * this is more efficient */ - /* busy wait, should be short and not very common */ - if (usbGetTransmitStatusI(&USB_DRIVER, SHARED_IN_EPNUM)) { - /* Need to either suspend, or loop and call unlock/lock during - * every iteration - otherwise the system will remain locked, - * no interrupts served, so USB not going through as well. - * Note: for suspend, need USB_USE_WAIT == TRUE in halconf.h */ - osalThreadSuspendS(&(&USB_DRIVER)->epc[SHARED_IN_EPNUM]->in_state->thread); - - /* after osalThreadSuspendS returns USB status might have changed */ - if (usbGetDriverStateI(&USB_DRIVER) != USB_ACTIVE) { - goto unlock; - } - } - usbStartTransmitI(&USB_DRIVER, SHARED_IN_EPNUM, (uint8_t *)report, sizeof(struct nkro_report)); - } else -#endif /* NKRO_ENABLE */ - { /* regular protocol */ - /* need to wait until the previous packet has made it through */ - /* busy wait, should be short and not very common */ - if (usbGetTransmitStatusI(&USB_DRIVER, KEYBOARD_IN_EPNUM)) { - /* Need to either suspend, or loop and call unlock/lock during - * every iteration - otherwise the system will remain locked, - * no interrupts served, so USB not going through as well. - * Note: for suspend, need USB_USE_WAIT == TRUE in halconf.h */ - osalThreadSuspendS(&(&USB_DRIVER)->epc[KEYBOARD_IN_EPNUM]->in_state->thread); - - /* after osalThreadSuspendS returns USB status might have changed */ - if (usbGetDriverStateI(&USB_DRIVER) != USB_ACTIVE) { - goto unlock; - } - } - uint8_t *data, size; - if (keyboard_protocol) { - data = (uint8_t *)report; - size = KEYBOARD_REPORT_SIZE; - } else { /* boot protocol */ - data = &report->mods; - size = 8; - } - usbStartTransmitI(&USB_DRIVER, KEYBOARD_IN_EPNUM, data, size); - } - keyboard_report_sent = *report; - -unlock: - osalSysUnlock(); -} - -/* --------------------------------------------------------- - * Mouse functions - * --------------------------------------------------------- - */ - -#ifdef MOUSE_ENABLE -void send_mouse(report_mouse_t *report) { +void send_report(uint8_t endpoint, void *report, size_t size) { osalSysLock(); if (usbGetDriverStateI(&USB_DRIVER) != USB_ACTIVE) { osalSysUnlock(); return; } - if (usbGetTransmitStatusI(&USB_DRIVER, MOUSE_IN_EPNUM)) { + if (usbGetTransmitStatusI(&USB_DRIVER, endpoint)) { /* Need to either suspend, or loop and call unlock/lock during * every iteration - otherwise the system will remain locked, * no interrupts served, so USB not going through as well. * Note: for suspend, need USB_USE_WAIT == TRUE in halconf.h */ - if (osalThreadSuspendTimeoutS(&(&USB_DRIVER)->epc[MOUSE_IN_EPNUM]->in_state->thread, TIME_MS2I(10)) == MSG_TIMEOUT) { + if (osalThreadSuspendTimeoutS(&(&USB_DRIVER)->epc[endpoint]->in_state->thread, TIME_MS2I(10)) == MSG_TIMEOUT) { osalSysUnlock(); return; } } - usbStartTransmitI(&USB_DRIVER, MOUSE_IN_EPNUM, (uint8_t *)report, sizeof(report_mouse_t)); - mouse_report_sent = *report; + usbStartTransmitI(&USB_DRIVER, endpoint, report, size); osalSysUnlock(); - -# ifdef MOUSE_HIRES_SCROLL_ENABLE - enable_hires_scroll(); +} + +/* prepare and start sending a report IN + * not callable from ISR or locked state */ +void send_keyboard(report_keyboard_t *report) { + uint8_t ep = KEYBOARD_IN_EPNUM; + size_t size = KEYBOARD_REPORT_SIZE; + + /* If we're in Boot Protocol, don't send any report ID or other funky fields */ + if (!keyboard_protocol) { + send_report(ep, &report->mods, 8); + } else { +# ifdef NKRO_ENABLE + if (keymap_config.nkro) { + ep = SHARED_IN_EPNUM; + size = sizeof(struct nkro_report); + } # endif + + send_report(ep, report, size); + } + + keyboard_report_sent = *report; } -#else /* MOUSE_ENABLE */ +/* --------------------------------------------------------- + * Mouse functions + * --------------------------------------------------------- + */ + void send_mouse(report_mouse_t *report) { - (void)report; +# ifdef MOUSE_ENABLE + send_report(MOUSE_IN_EPNUM, report, sizeof(report_mouse_t)); + mouse_report_sent = *report; + osalSysUnlock(); +# endif } -#endif /* MOUSE_ENABLE */ /* --------------------------------------------------------- * Extrakey functions @@ -1016,99 +969,27 @@ void send_mouse(report_mouse_t *report) { */ void send_extra(report_extra_t *report) { -#ifdef EXTRAKEY_ENABLE - osalSysLock(); - if (usbGetDriverStateI(&USB_DRIVER) != USB_ACTIVE) { - osalSysUnlock(); - return; - } - - if (usbGetTransmitStatusI(&USB_DRIVER, SHARED_IN_EPNUM)) { - /* Need to either suspend, or loop and call unlock/lock during - * every iteration - otherwise the system will remain locked, - * no interrupts served, so USB not going through as well. - * Note: for suspend, need USB_USE_WAIT == TRUE in halconf.h */ - if (osalThreadSuspendTimeoutS(&(&USB_DRIVER)->epc[SHARED_IN_EPNUM]->in_state->thread, TIME_MS2I(10)) == MSG_TIMEOUT) { - osalSysUnlock(); - return; - } - } - - usbStartTransmitI(&USB_DRIVER, SHARED_IN_EPNUM, (uint8_t *)report, sizeof(report_extra_t)); - osalSysUnlock(); -#endif +# ifdef EXTRAKEY_ENABLE + send_report(SHARED_IN_EPNUM, report, sizeof(report_extra_t)); +# endif } void send_programmable_button(report_programmable_button_t *report) { -#ifdef PROGRAMMABLE_BUTTON_ENABLE - osalSysLock(); - if (usbGetDriverStateI(&USB_DRIVER) != USB_ACTIVE) { - osalSysUnlock(); - return; - } - - if (usbGetTransmitStatusI(&USB_DRIVER, SHARED_IN_EPNUM)) { - /* Need to either suspend, or loop and call unlock/lock during - * every iteration - otherwise the system will remain locked, - * no interrupts served, so USB not going through as well. - * Note: for suspend, need USB_USE_WAIT == TRUE in halconf.h */ - if (osalThreadSuspendTimeoutS(&(&USB_DRIVER)->epc[SHARED_IN_EPNUM]->in_state->thread, TIME_MS2I(10)) == MSG_TIMEOUT) { - osalSysUnlock(); - return; - } - } - - usbStartTransmitI(&USB_DRIVER, SHARED_IN_EPNUM, (uint8_t *)report, sizeof(report_programmable_button_t)); - osalSysUnlock(); -#endif +# ifdef PROGRAMMABLE_BUTTON_ENABLE + send_report(SHARED_IN_EPNUM, report, sizeof(report_programmable_button_t)); +# endif } void send_joystick(report_joystick_t *report) { -#ifdef JOYSTICK_ENABLE - osalSysLock(); - if (usbGetDriverStateI(&USB_DRIVER) != USB_ACTIVE) { - osalSysUnlock(); - return; - } - - if (usbGetTransmitStatusI(&USB_DRIVER, JOYSTICK_IN_EPNUM)) { - /* Need to either suspend, or loop and call unlock/lock during - * every iteration - otherwise the system will remain locked, - * no interrupts served, so USB not going through as well. - * Note: for suspend, need USB_USE_WAIT == TRUE in halconf.h */ - if (osalThreadSuspendTimeoutS(&(&USB_DRIVER)->epc[JOYSTICK_IN_EPNUM]->in_state->thread, TIME_MS2I(10)) == MSG_TIMEOUT) { - osalSysUnlock(); - return; - } - } - - usbStartTransmitI(&USB_DRIVER, JOYSTICK_IN_EPNUM, (uint8_t *)report, sizeof(report_joystick_t)); - osalSysUnlock(); -#endif +# ifdef JOYSTICK_ENABLE + send_report(JOYSTICK_IN_EPNUM, report, sizeof(report_joystick_t)); +# endif } void send_digitizer(report_digitizer_t *report) { -#ifdef DIGITIZER_ENABLE - osalSysLock(); - if (usbGetDriverStateI(&USB_DRIVER) != USB_ACTIVE) { - osalSysUnlock(); - return; - } - - if (usbGetTransmitStatusI(&USB_DRIVER, DIGITIZER_IN_EPNUM)) { - /* Need to either suspend, or loop and call unlock/lock during - * every iteration - otherwise the system will remain locked, - * no interrupts served, so USB not going through as well. - * Note: for suspend, need USB_USE_WAIT == TRUE in halconf.h */ - if (osalThreadSuspendTimeoutS(&(&USB_DRIVER)->epc[DIGITIZER_IN_EPNUM]->in_state->thread, TIME_MS2I(10)) == MSG_TIMEOUT) { - osalSysUnlock(); - return; - } - } - - usbStartTransmitI(&USB_DRIVER, DIGITIZER_IN_EPNUM, (uint8_t *)report, sizeof(report_digitizer_t)); - osalSysUnlock(); -#endif +# ifdef DIGITIZER_ENABLE + send_report(DIGITIZER_IN_EPNUM, report, sizeof(report_digitizer_t)); +# endif } /* --------------------------------------------------------- @@ -1116,7 +997,7 @@ void send_digitizer(report_digitizer_t *report) { * --------------------------------------------------------- */ -#ifdef CONSOLE_ENABLE +# ifdef CONSOLE_ENABLE int8_t sendchar(uint8_t c) { static bool timed_out = false; @@ -1165,9 +1046,9 @@ void console_task(void) { } while (size > 0); } -#endif /* CONSOLE_ENABLE */ +# endif /* CONSOLE_ENABLE */ -#ifdef RAW_ENABLE +# ifdef RAW_ENABLE void raw_hid_send(uint8_t *data, uint8_t length) { // TODO: implement variable size packet if (length != RAW_EPSIZE) { @@ -1193,9 +1074,9 @@ void raw_hid_task(void) { } while (size > 0); } -#endif +# endif -#ifdef MIDI_ENABLE +# ifdef MIDI_ENABLE void send_midi_packet(MIDI_EventPacket_t *event) { chnWrite(&drivers.midi_driver.driver, (uint8_t *)event, sizeof(MIDI_EventPacket_t)); @@ -1216,9 +1097,9 @@ void midi_ep_task(void) { } } while (size > 0); } -#endif +# endif -#ifdef VIRTSER_ENABLE +# ifdef VIRTSER_ENABLE void virtser_init(void) {} @@ -1241,4 +1122,4 @@ void virtser_task(void) { } while (numBytesReceived > 0); } -#endif +# endif diff --git a/tmk_core/protocol/host.c b/tmk_core/protocol/host.c index 2c6654e9a652..0518e244a6e3 100644 --- a/tmk_core/protocol/host.c +++ b/tmk_core/protocol/host.c @@ -115,7 +115,7 @@ void host_mouse_send(report_mouse_t *report) { #endif if (!driver) return; -#ifdef MOUSE_SHARED_EP +#if defined(MOUSE_SHARED_EP) || defined(MOUSE_SCROLL_HIRES_ENABLE) report->report_id = REPORT_ID_MOUSE; #endif #ifdef MOUSE_EXTENDED_REPORT diff --git a/tmk_core/protocol/lufa/lufa.c b/tmk_core/protocol/lufa/lufa.c index 03210248f8ea..5523b76d15f2 100644 --- a/tmk_core/protocol/lufa/lufa.c +++ b/tmk_core/protocol/lufa/lufa.c @@ -88,7 +88,7 @@ static void send_extra(report_extra_t *report); host_driver_t lufa_driver = {keyboard_leds, send_keyboard, send_mouse, send_extra}; void send_report(uint8_t endpoint, void *report, size_t size) { - uint8_t timeout = 255; + uint8_t timeout = 255; if (USB_DeviceState != DEVICE_STATE_Configured) return; @@ -260,12 +260,16 @@ static void Console_Task(void) { */ void EVENT_USB_Device_Connect(void) { print("[C]"); +#ifdef MOUSE_SCROLL_HIRES_ENABLE + /* Reset multiplier on reset */ + resolution_multiplier_reset(); +#endif /* For battery powered device */ if (!USB_IsInitialized) { USB_Disable(); USB_Init(); USB_Device_EnableSOFEvents(); - } + } } /** \brief Event USB Device Connect @@ -295,14 +299,14 @@ void EVENT_USB_Device_Reset(void) { #ifdef MOUSE_SCROLL_HIRES_ENABLE /* Reset multiplier on reset */ resolution_multiplier = 0; -#endif +#endif } /** \brief Event USB Device Connect * * FIXME: Needs doc */ -void EVENT_USB_Device_Suspend() { +void EVENT_USB_Device_Suspend(void) { print("[S]"); usb_device_state_set_suspend(USB_Device_ConfigurationNumber != 0, USB_Device_ConfigurationNumber); @@ -315,7 +319,7 @@ void EVENT_USB_Device_Suspend() { * * FIXME: Needs doc */ -void EVENT_USB_Device_WakeUp() { +void EVENT_USB_Device_WakeUp(void) { print("[W]"); #if defined(NO_USB_STARTUP_CHECK) suspend_wakeup_init(); @@ -450,23 +454,42 @@ void EVENT_USB_Device_ControlRequest(void) { // Interface switch (USB_ControlRequest.wIndex) { +#ifndef KEYBOARD_SHARED_EP case KEYBOARD_INTERFACE: - // TODO: test/check ReportData = (uint8_t *)&keyboard_report_sent; ReportSize = sizeof(keyboard_report_sent); break; -#if defined(SHARED_EP_ENABLE) && defined(MOUSE_SHARED_EP) - case SHARED_INTERFACE: -#else - case MOUSE_INTERFACE: #endif +#if defined(MOUSE_ENABLE) && !defined(MOUSE_SHARED_EP) + case MOUSE_INTERFACE: # ifdef MOUSE_SCROLL_HIRES_ENABLE - if (USB_ControlRequest.wValue == (0x0300 | REPORT_ID_MULTIPLIER)) { - ReportData = &resolution_multiplier; - ReportSize = sizeof(resolution_multiplier); + if ((USB_ControlRequest.wValue & 0xff) == REPORT_ID_MULTIPLIER) { + ReportData = (uint8_t *)&mouse_scroll_res_report; + ReportSize = sizeof(report_mouse_scroll_res_t); + break; } # endif break; +#endif +#ifdef SHARED_EP_ENABLE + case SHARED_INTERFACE: { + uint8_t report_id = USB_ControlRequest.wValue & 0xff; + switch (report_id) { +# ifdef KEYBOARD_SHARED_EP + case REPORT_ID_KEYBOARD: + ReportData = (uint8_t *)&keyboard_report_sent; + ReportSize = sizeof(keyboard_report_sent); + break; +# endif +# if defined(MOUSE_ENABLE) && defined(MOUSE_SCROLL_HIRES_ENABLE) && defined(MOUSE_SHARED_EP) + case REPORT_ID_MULTIPLIER: + ReportData = (uint8_t *)&mouse_scroll_res_report; + ReportSize = sizeof(report_mouse_scroll_res_t); + break; +# endif + } + } +#endif } /* Write the report data to the control endpoint */ Endpoint_Write_Control_Stream_LE(ReportData, ReportSize); @@ -480,7 +503,10 @@ void EVENT_USB_Device_ControlRequest(void) { switch (USB_ControlRequest.wIndex) { case KEYBOARD_INTERFACE: #if defined(SHARED_EP_ENABLE) && !defined(KEYBOARD_SHARED_EP) - case SHARED_INTERFACE: + case SHARED_INTERFACE: +#endif +#if defined(MOUSE_ENABLE) && !defined(MOUSE_SHARED_EP) + case MOUSE_INTERFACE: #endif Endpoint_ClearSETUP(); @@ -490,21 +516,18 @@ void EVENT_USB_Device_ControlRequest(void) { uint8_t report_id = USB_ControlRequest.wValue & 0xFF; // Discard report ID byte as we already have it from wValue - if (USB_ControlRequest.wLength == 2) { - Endpoint_Discard_8(); - } - switch(report_id) { + if (USB_ControlRequest.wLength > 1) Endpoint_Discard_8(); + switch (report_id) { case REPORT_ID_KEYBOARD: case REPORT_ID_NKRO: keyboard_led_state = Endpoint_Read_8(); break; #ifdef MOUSE_SCROLL_HIRES_ENABLE case REPORT_ID_MULTIPLIER: - resolution_multiplier = Endpoint_Read_8(); + mouse_scroll_res_report.data = Endpoint_Read_8(); break; #endif } - Endpoint_ClearOUT(); Endpoint_ClearStatusStage(); break; @@ -839,11 +862,11 @@ static void setup_mcu(void) { static void setup_usb(void) { // Leonardo needs. Without this USB device is not recognized. USB_Disable(); - + #ifdef MOUSE_SCROLL_HIRES_ENABLE resolution_multiplier = 0; #endif - + USB_Init(); // for Console_Task diff --git a/tmk_core/protocol/report.c b/tmk_core/protocol/report.c index c3ec36aedd70..34f3c94adc0b 100644 --- a/tmk_core/protocol/report.c +++ b/tmk_core/protocol/report.c @@ -32,9 +32,7 @@ static int8_t cb_count = 0; #endif #ifdef MOUSE_SCROLL_HIRES_ENABLE -static uint8_t prev_resolution_multiplier = 0; -uint8_t resolution_multiplier = 0; -uint8_t resolution_multiplier_stored = 0; +report_mouse_scroll_res_t mouse_scroll_res_report = { .report_id = REPORT_ID_MULTIPLIER, .data = 0 }; #endif /** \brief has_anykey @@ -298,12 +296,32 @@ __attribute__((weak)) bool has_mouse_report_changed(report_mouse_t* new_report, } # ifdef MOUSE_SCROLL_HIRES_ENABLE -void hires_scroll_disable_next(hires_axis_t axis) { - resolution_multiplier_stored &= resolution_multiplier; - resolution_multiplier ^= (1 << axis); +bool set_hires_scroll_multiplier(uint8_t axis, uint8_t value) { + static uint8_t max_multiplier; + uint8_t multiplier_temp = mouse_scroll_res_report.data; + max_multiplier |= multiplier_temp; + + uint8_t set_value = MULTIPLIER_CONVERSION(value); + + switch (axis) { + case HIRES_V: + mouse_scroll_res_report.multiplier.v = set_value; + break; + + case HIRES_H: + mouse_scroll_res_report.multiplier.h = set_value; + break; + + case HIRES_BOTH: + mouse_scroll_res_report.multiplier.v = set_value; + mouse_scroll_res_report.multiplier.h = set_value; + } + mouse_scroll_res_report.data &= max_multiplier; + return mouse_scroll_res_report.data != multiplier_temp; } -void hires_scroll_reset(void) { - resolution_multiplier &= prev_resolution_multiplier; + +void resolution_multiplier_reset(void) { + mouse_scroll_res_report.data = 0; } -# endif +# endif // MOUSE_SCROLL_HIRES_ENABLE #endif // MOUSE_ENABLE diff --git a/tmk_core/protocol/report.h b/tmk_core/protocol/report.h index c66abbf04085..4703a6a28361 100644 --- a/tmk_core/protocol/report.h +++ b/tmk_core/protocol/report.h @@ -1,16 +1,13 @@ /* Copyright 2011,2012 Jun Wako - This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 2 of the License, or (at your option) any later version. - This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. - You should have received a copy of the GNU General Public License along with this program. If not, see . */ @@ -23,14 +20,6 @@ along with this program. If not, see . // clang-format off -#ifdef MOUSE_SCROLL_HIRES_ENABLE -# ifndef MOUSE_SCROLL_MULTIPLIER -# define MOUSE_SCROLL_MULTIPLIER 120 -# elif (MOUSE_SCROLL_MULTIPLIER > 120 || MOUSE_SCROLL_MULTIPLIER < 1) -# error "MOUSE_SCROLL_MULTIPLIER out of bounds must be in range of 1-120" -# endif -# endif - /* HID report IDs */ enum hid_report_ids { REPORT_ID_KEYBOARD = 1, @@ -129,6 +118,12 @@ enum desktop_usages { SYSTEM_DISPLAY_TOGGLE_INT_EXT = 0xB5 }; +enum mouse_scroll_hires_axes { + HIRES_V, + HIRES_H, + HIRES_BOTH +}; + // clang-format on #define NKRO_SHARED_EP @@ -222,14 +217,22 @@ typedef int16_t mouse_hv_report_t; typedef int8_t mouse_hv_report_t; #endif -#ifdef MOUSE_SCROLL_HIRES_ENABLE -extern uint8_t resolution_multiplier; -# define IS_V_HIRES_ACTIVE (bool)(resolution_multiplier & (0x01 << 0)) -# define IS_H_HIRES_ACTIVE (bool)(resolution_multiplier & (0x01 << 2)) -#endif +typedef union { + uint8_t raw[2]; + struct { + uint8_t report_id; + union { + uint8_t data; + struct { + uint8_t v : 4; + uint8_t h : 4; + } multiplier; + }; + }; +} __attribute__((packed)) report_mouse_scroll_res_t; typedef struct { -#if (defined(MOUSE_SHARED_EP) || defined(MOUSE_SCROLL_HIRES_ENABLE)) +#if defined(MOUSE_SHARED_EP) || defined(MOUSE_SCROLL_HIRES_ENABLE) uint8_t report_id; #endif uint8_t buttons; @@ -364,13 +367,18 @@ bool has_mouse_report_changed(report_mouse_t* new_report, report_mouse_t* old_re #endif #ifdef MOUSE_SCROLL_HIRES_ENABLE -typedef enum { - HIRES_V = 0, - HIRES_BOTH, - HIRES_H = 2 -} hires_axis_t; -void hires_scroll_disable_next (hires_axis_t axis); -void hires_scroll_reset(void); +extern report_mouse_scroll_res_t mouse_scroll_res_report; + +bool set_hires_scroll_multiplier(uint8_t axis, uint8_t value); +void resolution_multiplier_reset(void); + +# define MOUSE_SCROLL_MULTIPLIER_RESOLUTION 8 +# define MULTIPLIER_CONVERSION(value) (uint8_t)( ((((uint16_t)value * (uint16_t)0x80) >> 8) >> 2) & 0x0F) +# define IS_HIRES_V_ACTIVE (bool)(mouse_scroll_res_report.multiplier.v) +# define IS_HIRES_H_ACTIVE (bool)(mouse_scroll_res_report.multiplier.h) +# define MOUSE_SCROLL_MULTIPLIER_DATA (mouse_scroll_res_report.data) +# define MOUSE_SCROLL_MULTIPLIER_V (uint8_t)(MAX(mouse_scroll_res_report.multiplier.v * MOUSE_SCROLL_MULTIPLIER_RESOLUTION, 1)) +# define MOUSE_SCROLL_MULTIPLIER_H (uint8_t)(MAX(mouse_scroll_res_report.multiplier.h * MOUSE_SCROLL_MULTIPLIER_RESOLUTION, 1)) #endif #ifdef __cplusplus diff --git a/tmk_core/protocol/usb_descriptor.c b/tmk_core/protocol/usb_descriptor.c index f7f36c412c43..7b33c482a8a2 100644 --- a/tmk_core/protocol/usb_descriptor.c +++ b/tmk_core/protocol/usb_descriptor.c @@ -115,7 +115,7 @@ const USB_Descriptor_HIDReport_Datatype_t PROGMEM SharedReport[] = { HID_RI_USAGE_PAGE(8, 0x01), // Generic Desktop HID_RI_USAGE(8, 0x02), // Mouse HID_RI_COLLECTION(8, 0x01), // Application -# if (defined(MOUSE_SHARED_EP) || defined(MOUSE_SCROLL_HIRES_ENABLE)) +# if defined(MOUSE_SHARED_EP) || defined(MOUSE_SCROLL_HIRES_ENABLE) HID_RI_REPORT_ID(8, REPORT_ID_MOUSE), # endif HID_RI_USAGE(8, 0x01), // Pointer @@ -153,28 +153,27 @@ const USB_Descriptor_HIDReport_Datatype_t PROGMEM SharedReport[] = { # endif HID_RI_INPUT(8, HID_IOF_DATA | HID_IOF_VARIABLE | HID_IOF_RELATIVE), - // Vertical/Horizontal Wheel (2 or 4 bytes) + // Vertical/Horizontal Wheel (2 - 5 bytes) + // Vertical wheel (1 - 2.5 bytes) # ifdef MOUSE_SCROLL_HIRES_ENABLE - HID_RI_COLLECTION(8, 0x02), // Logical collection - // Resolution Multiplier (2 bits) + HID_RI_COLLECTION(8, 0x02), // Logical collection + // Resolution Multiplier (4 bits) HID_RI_REPORT_ID(8, REPORT_ID_MULTIPLIER), - HID_RI_USAGE(8, 0x48), // Resolution Multiplier + HID_RI_USAGE(8, 0x48), // Resolution Multiplier HID_RI_REPORT_COUNT(8, 0x01), - HID_RI_REPORT_SIZE(8, 0x02), + HID_RI_REPORT_SIZE(8, 0x04), HID_RI_LOGICAL_MINIMUM(8, 0x00), - HID_RI_LOGICAL_MAXIMUM(8, 0x01), - HID_RI_PHYSICAL_MINIMUM(8, 0x01), // Min 1 - HID_RI_PHYSICAL_MAXIMUM(8, MOUSE_SCROLL_MULTIPLIER), // Max 120 + HID_RI_LOGICAL_MAXIMUM(8, 0x0F), + HID_RI_PHYSICAL_MINIMUM(8, 0x01), // Min 1 + HID_RI_PHYSICAL_MAXIMUM(8, 0x78), // Max 120 HID_RI_FEATURE(8, HID_IOF_DATA | HID_IOF_VARIABLE | HID_IOF_ABSOLUTE), - - HID_RI_REPORT_ID(8, REPORT_ID_MOUSE), -# endif // MOUSE_SCROLL_HIRES_ENABLE - // Vertical wheel (1-2 bytes) - HID_RI_USAGE(8, 0x38), // Wheel (V) -# ifdef MOUSE_SCROLL_HIRES_ENABLE HID_RI_PHYSICAL_MINIMUM(8, 0x00), // Reset Global Value HID_RI_PHYSICAL_MAXIMUM(8, 0x00), -# endif + + HID_RI_REPORT_ID(8, REPORT_ID_MOUSE), +# endif // MOUSE_SCROLL_HIRES_ENABLE + + HID_RI_USAGE(8, 0x38), // Wheel (V) # ifdef MOUSE_SCROLL_EXTENDED_REPORT HID_RI_LOGICAL_MINIMUM(16, -32767), HID_RI_LOGICAL_MAXIMUM(16, 32767), @@ -188,43 +187,35 @@ const USB_Descriptor_HIDReport_Datatype_t PROGMEM SharedReport[] = { # endif HID_RI_INPUT(8, HID_IOF_DATA | HID_IOF_VARIABLE | HID_IOF_RELATIVE), # ifdef MOUSE_SCROLL_HIRES_ENABLE - HID_RI_END_COLLECTION(0), // Logical + HID_RI_END_COLLECTION(0), // Logical # endif - // Horizontal Wheel (1 or 2 bytes) + // Horizontal Wheel (1 - 2.5 bytes) # ifdef MOUSE_SCROLL_HIRES_ENABLE - HID_RI_COLLECTION(8, 0x02), // Logical collection - // Resolution Multiplier (2 bits) + HID_RI_COLLECTION(8, 0x02), // Logical collection + // Resolution Multiplier (4 bits) HID_RI_REPORT_ID(8, REPORT_ID_MULTIPLIER), - HID_RI_USAGE(8, 0x48), // Resolution Multiplier - HID_RI_REPORT_COUNT(8, 0x01), - HID_RI_REPORT_SIZE(8, 0x02), - HID_RI_LOGICAL_MINIMUM(8, 0x00), - HID_RI_LOGICAL_MAXIMUM(8, 0x01), - HID_RI_PHYSICAL_MINIMUM(8, 0x01), // Min 1 - HID_RI_PHYSICAL_MAXIMUM(8, MOUSE_SCROLL_MULTIPLIER), // Max 120 - HID_RI_FEATURE(8, HID_IOF_DATA | HID_IOF_VARIABLE | HID_IOF_ABSOLUTE), - // Padding 4 bits + HID_RI_USAGE(8, 0x48), // Resolution Multiplier HID_RI_REPORT_SIZE(8, 0x04), - HID_RI_REPORT_COUNT(8, 0x01), - HID_RI_FEATURE(8, HID_IOF_CONSTANT), - - HID_RI_REPORT_ID(8, REPORT_ID_MOUSE), -# endif // MOUSE_SCROLL_HIRES_ENABLE - HID_RI_USAGE_PAGE(8, 0x0C), // Consumer - HID_RI_USAGE(16, 0x0238), // AC Pan (Horizontal Wheel) -# ifdef MOUSE_SCROLL_HIRES_ENABLE + HID_RI_LOGICAL_MINIMUM(8, 0x00), // Min 0 + HID_RI_LOGICAL_MAXIMUM(8, 0x0F), // Max 15 + HID_RI_PHYSICAL_MINIMUM(8, 0x01), // Min 1 + HID_RI_PHYSICAL_MAXIMUM(8, 0x78), // Max 120 + HID_RI_FEATURE(8, HID_IOF_DATA | HID_IOF_VARIABLE | HID_IOF_ABSOLUTE), HID_RI_PHYSICAL_MINIMUM(8, 0x00), // Reset Global Value HID_RI_PHYSICAL_MAXIMUM(8, 0x00), -# endif + + HID_RI_REPORT_ID(8, REPORT_ID_MOUSE), +# endif // MOUSE_SCROLL_HIRES_ENABLE + HID_RI_USAGE_PAGE(8, 0x0C), // Consumer + HID_RI_USAGE(16, 0x0238), // AC Pan (Horizontal Wheel) + # ifdef MOUSE_SCROLL_EXTENDED_REPORT HID_RI_LOGICAL_MINIMUM(16, -32767), HID_RI_LOGICAL_MAXIMUM(16, 32767), - HID_RI_REPORT_COUNT(8, 0x01), HID_RI_REPORT_SIZE(8, 0x10), # else HID_RI_LOGICAL_MINIMUM(8, -127), HID_RI_LOGICAL_MAXIMUM(8, 127), - HID_RI_REPORT_COUNT(8, 0x01), HID_RI_REPORT_SIZE(8, 0x08), # endif HID_RI_INPUT(8, HID_IOF_DATA | HID_IOF_VARIABLE | HID_IOF_RELATIVE), diff --git a/tmk_core/protocol/vusb/protocol.c b/tmk_core/protocol/vusb/protocol.c index 70a0a2a4ba07..49c45ca6eea8 100644 --- a/tmk_core/protocol/vusb/protocol.c +++ b/tmk_core/protocol/vusb/protocol.c @@ -44,7 +44,7 @@ static void initForUsbConnectivity(void) { uint8_t i = 0; #ifdef MOUSE_SCROLL_HIRES_ENABLE /* reset multiplier on initialization */ - resolution_multiplier = 0; + resolution_multiplier_reset(); #endif usbInit(); diff --git a/tmk_core/protocol/vusb/vusb.c b/tmk_core/protocol/vusb/vusb.c index 938eeb61d8af..7570a423b2ed 100644 --- a/tmk_core/protocol/vusb/vusb.c +++ b/tmk_core/protocol/vusb/vusb.c @@ -333,19 +333,19 @@ usbMsgLen_t usbFunctionSetup(uchar data[8]) { #ifdef MOUSE_SCROLL_HIRES_ENABLE // Report Type: 0x03(feature)/ReportID: REPORT_ID_MULTIPLIER if (rq->wValue.word == 0x0300 | REPORT_ID_MULTIPLIER) { - usbMsgPtr = (usbMsgPtr_t)&resolution_multiplier_report; - return sizeof(resolution_multiplier_report); + usbMsgPtr = (usbMsgPtr_t)&mouse_scroll_res_report; + return sizeof(report_mouse_scroll_res_t); } #endif case USBRQ_HID_GET_IDLE: dprint("GET_IDLE:"); usbMsgPtr = (usbMsgPtr_t)&vusb_idle_rate; return 1; - + case USBRQ_HID_SET_IDLE: vusb_idle_rate = rq->wValue.bytes[1]; dprintf("SET_IDLE: %02X", vusb_idle_rate); - + case USBRQ_HID_T: dprint("SET_REPORT:"); // Report Type: 0x02(Out)/ReportID: 0x00(none) && Interface: 0(keyboard) @@ -381,12 +381,12 @@ uchar usbFunctionWrite(uchar *data, uchar len) { keyboard_led_state = data[0]; last_req.len = 0; return 1; -#ifdef MOUSE_SCROLL_HIRES_ENABLE +#ifdef MOUSE_SCROLL_HIRES_ENABLE case SET_RES_MULT: if (len == 2 && data[0] == REPORT_ID_MULTIPLIER) { dprintf("SET_RES_MULT: %02X\n", data[1]); - resolution_multiplier = data[1]; - last_req.len = 0; + mouse_scroll_res_report.data = data[1]; + last_req.len = 0; return 1; } break; @@ -482,12 +482,12 @@ const PROGMEM uchar shared_hid_report[] = { #ifdef MOUSE_ENABLE // Mouse report descriptor - 0x05, 0x01, // Usage Page (Generic Desktop) - 0x09, 0x02, // Usage (Mouse) - 0xA1, 0x01, // Collection (Application) - 0x85, REPORT_ID_MOUSE, // Report ID (MOUSE) - 0x09, 0x01, // Usage (Pointer) - 0xA1, 0x00, // Collection (Physical) + 0x05, 0x01, // Usage Page (Generic Desktop) + 0x09, 0x02, // Usage (Mouse) + 0xA1, 0x01, // Collection (Application) + 0x85, REPORT_ID_MOUSE, // Report ID (MOUSE) + 0x09, 0x01, // Usage (Pointer) + 0xA1, 0x00, // Collection (Physical) // Buttons (8 bits) 0x05, 0x09, // Usage Page (Button) 0x19, 0x01, // Usage Minimum (Button 1) @@ -515,95 +515,87 @@ const PROGMEM uchar shared_hid_report[] = { 0x95, 0x02, // Report Count (2) 0x75, 0x08, // Report Size (8) # else - 0x16, 0x01, 0x80, // Logical Minimum (-32767) - 0x26, 0xFF, 0x7F, // Logical Maximum (32767) - 0x95, 0x02, // Report Count (2) - 0x75, 0x10, // Report Size (16) + 0x16, 0x01, 0x80, // Logical Minimum (-32767) + 0x26, 0xFF, 0x7F, // Logical Maximum (32767) + 0x95, 0x02, // Report Count (2) + 0x75, 0x10, // Report Size (16) # endif - 0x81, 0x06, // Input (Data, Variable, Relative) - - // Vertical Wheel (1-2 bytes) + 0x81, 0x06, // Input (Data, Variable, Relative) + +// Vertical Wheel (1-2 bytes) # ifdef MOUSE_SCROLL_HIRES_ENABLE - 0xA1, 0x02, // Collection (Logical) + 0xA1, 0x02, // Collection (Logical) // Resolution Multiplier (2 bits) - 0x85, REPORT_ID_MULTIPLIER, // Report ID (MULTIPLIER) - 0x09, 0x48, // Usage (Resolution Multiplier) - 0x95, 0x01, // Report Count (1) - 0x75, 0x02, // Report Size (2) - 0x15, 0x00, // Logical Minimum (0) - 0x25, 0x01, // Logical Maximum (1) - 0x35, 0x01, // Physical Minimum (1) - 0x45, MOUSE_SCROLL_MULTIPLIER, // Physical Maximum (MOUSE_SCROLL_MULTIPLIER) - 0xB1, 0x02, // Feature (Data, Variable, Absolute) - - 0x85, REPORT_ID_MOUSE, // Report ID (MOUSE) + 0x85, REPORT_ID_MULTIPLIER, // Report ID (MULTIPLIER) + 0x09, 0x48, // Usage (Resolution Multiplier) + 0x95, 0x01, // Report Count (1) + 0x75, 0x04, // Report Size (2) + 0x15, 0x00, // Logical Minimum (0) + 0x25, 0x0F, // Logical Maximum (15) + 0x35, 0x01, // Physical Minimum (1) + 0x45, 0x78, // Physical Maximum (120) + 0xB1, 0x02, // Feature (Data, Variable, Absolute) + 0x35, 0x00, // Physical Minimum (0) + 0x45, 0x00, // Physical Maximum (0) Reset Global Value + + 0x85, REPORT_ID_MOUSE, // Report ID (MOUSE) # endif // Wheel (1-2 bytes) - 0x09, 0x38, // Usage (Wheel) -# ifdef MOUSE_SCROLL_HIRES_ENABLE - 0x35, 0x00, // Physical Minimum (0) - 0x45, 0x00, // Physical Maximum (0) Reset Global Value -# endif + 0x09, 0x38, // Usage (Wheel) # ifdef MOUSE_SCROLL_EXTENDED_REPORT - 0x16, 0x01, 0x80, // Logical Minimum (-32767) - 0x26, 0xFF, 0x7F, // Logical Maximum (32767) - 0x95, 0x01, // Report Count (1) - 0x75, 0x10, // Report Size (16) + 0x16, 0x01, 0x80, // Logical Minimum (-32767) + 0x26, 0xFF, 0x7F, // Logical Maximum (32767) + 0x95, 0x01, // Report Count (1) + 0x75, 0x10, // Report Size (16) # else - 0x15, 0x81, // Logical Minimum (-127) - 0x25, 0x7F, // Logical Maximum (127) - 0x95, 0x01, // Report Count (1) - 0x75, 0x08, // Report Size (8) + 0x15, 0x81, // Logical Minimum (-127) + 0x25, 0x7F, // Logical Maximum (127) + 0x95, 0x01, // Report Count (1) + 0x75, 0x08, // Report Size (8) # endif - 0x81, 0x06, // Input (Data, Variable, Relative) + 0x81, 0x06, // Input (Data, Variable, Relative) # ifdef MOUSE_SCROLL_HIRES_ENABLE - 0xC0, // End Collection (Logical) + 0xC0, // End Collection (Logical) # endif - // Horizontal wheel (1-2 bytes) +// Horizontal wheel (1-2 bytes) # ifdef MOUSE_SCROLL_HIRES_ENABLE - 0xA1, 0x02, // Collection (Logical) + 0xA1, 0x02, // Collection (Logical) // Resolution Multiplier (2 bits) - 0x85, REPORT_ID_MULTIPLIER, // Report ID (MULTIPLIER) - 0x09, 0x48, // Usage (Resolution Multiplier) - 0x95, 0x01, // Report Count (1) - 0x75, 0x02, // Report Size (2) - 0x15, 0x00, // Logical Minimum (0) - 0x25, 0x01, // Logical Maximum (1) - 0x35, 0x01, // Physical Minimum (1) - 0x45, MOUSE_SCROLL_MULTIPLIER, // Physical Maximum (MOUSE_SCROLL_MULTIPLIER) - 0xB1, 0x02, // Feature (Data, Variable, Absolute) - // Padding (4 bits) - 0x75, 0x04, // Report Size (4) - 0x95, 0x01, // Report Count (1) - 0xB1, 0x03, // Feature (Data, Constant) - - 0x85, REPORT_ID_MOUSE, // Report ID (MOUSE) -# endif - 0x05, 0x0C, // Usage Page (Consumer) - 0x0A, 0x38, 0x02, // Usage (AC Pan) -# ifdef MOUSE_SCROLL_HIRES_ENABLE - 0x35, 0x00, // Physical Minimum (0) - 0x45, 0x00, // Physical Maximum (0) Reset Global Value + 0x85, REPORT_ID_MULTIPLIER, // Report ID (MULTIPLIER) + 0x09, 0x48, // Usage (Resolution Multiplier) + 0x95, 0x01, // Report Count (1) + 0x75, 0x02, // Report Size (2) + 0x15, 0x00, // Logical Minimum (0) + 0x25, 0x0F, // Logical Maximum (15) + 0x35, 0x01, // Physical Minimum (1) + 0x45, 0x78, // Physical Maximum (120) + 0xB1, 0x02, // Feature (Data, Variable, Absolute) + 0x35, 0x00, // Physical Minimum (0) + 0x45, 0x00, // Physical Maximum (0) Reset Global Value + + 0x85, REPORT_ID_MOUSE, // Report ID (MOUSE) # endif + 0x05, 0x0C, // Usage Page (Consumer) + 0x0A, 0x38, 0x02, // Usage (AC Pan) # ifdef MOUSE_SCROLL_EXTENDED_REPORT - 0x16, 0x01, 0x80, // Logical Minimum (-32767) - 0x26, 0xFF, 0x7F, // Logical Maximum (32767) - 0x95, 0x01, // Report Count (1) - 0x75, 0x10, // Report Size (16) + 0x16, 0x01, 0x80, // Logical Minimum (-32767) + 0x26, 0xFF, 0x7F, // Logical Maximum (32767) + 0x95, 0x01, // Report Count (1) + 0x75, 0x10, // Report Size (16) # else - 0x15, 0x81, // Logical Minimum (-127) - 0x25, 0x7F, // Logical Maximum (127) - 0x95, 0x01, // Report Count (1) - 0x75, 0x08, // Report Size (8) + 0x15, 0x81, // Logical Minimum (-127) + 0x25, 0x7F, // Logical Maximum (127) + 0x95, 0x01, // Report Count (1) + 0x75, 0x08, // Report Size (8) # endif - 0x81, 0x06, // Input (Data, Variable, Relative) + 0x81, 0x06, // Input (Data, Variable, Relative) # ifdef MOUSE_SCROLL_HIRES_ENABLE - 0xC0, // End Collection (Logical) + 0xC0, // End Collection (Logical) # endif - 0xC0, // End Collection (Physical) - 0xC0, // End Collection (Application) + 0xC0, // End Collection (Physical) + 0xC0, // End Collection (Application) #endif #ifdef EXTRAKEY_ENABLE diff --git a/users/arkag/arkag.c b/users/arkag/arkag.c index e7c82185879a..7074da18eb58 100644 --- a/users/arkag/arkag.c +++ b/users/arkag/arkag.c @@ -19,11 +19,11 @@ #define TYPING_SPEED_MAX_VALUE 200 uint8_t typing_speed = 0; -void velocikey_accelerate() { +void velocikey_accelerate(void) { if (typing_speed < TYPING_SPEED_MAX_VALUE) typing_speed += (TYPING_SPEED_MAX_VALUE / 50); } -void velocikey_decelerate() { +void velocikey_decelerate(void) { static uint16_t decay_timer = 0; if (timer_elapsed(decay_timer) > 500 || decay_timer == 0) { diff --git a/users/d4mation/d4mation.c b/users/d4mation/d4mation.c index 5aa58a9f0d76..5d1092cd72dc 100644 --- a/users/d4mation/d4mation.c +++ b/users/d4mation/d4mation.c @@ -7,12 +7,12 @@ bool process_record_keymap( uint16_t keycode, keyrecord_t *record ) { } __attribute__ ((weak)) -void matrix_init_keymap() { +void matrix_init_keymap(void) { /* If you want a matrix init specific to your keymap, you need to define this function in your keymap */ } __attribute__ ((weak)) -void matrix_scan_keymap() { +void matrix_scan_keymap(void) { /* If you want a matrix scan specific to your keymap, you need to define this function in your keymap */ } diff --git a/users/danielo515/danielo515.c b/users/danielo515/danielo515.c index ea91ec55bf63..1c7718f1d294 100644 --- a/users/danielo515/danielo515.c +++ b/users/danielo515/danielo515.c @@ -7,9 +7,9 @@ bool onMac = true; LEADER_EXTERNS(); # ifdef RGBLIGHT_ENABLE -void leader_start_user() { rgblight_setrgb_range(5, 100, 199, 10, 15); }; +void leader_start_user(void) { rgblight_setrgb_range(5, 100, 199, 10, 15); }; -void leader_end_user() { rgblight_setrgb_range(200, 200, 255, 10, 15); }; +void leader_end_user(void) { rgblight_setrgb_range(200, 200, 255, 10, 15); }; # endif void matrix_scan_user(void) { diff --git a/users/edvorakjp/edvorakjp.c b/users/edvorakjp/edvorakjp.c index c95b03d9812c..3d3b5b0ae590 100644 --- a/users/edvorakjp/edvorakjp.c +++ b/users/edvorakjp/edvorakjp.c @@ -5,7 +5,7 @@ void matrix_init_user(void) { matrix_init_keymap(); } -__attribute__((weak)) void matrix_init_keymap() {} +__attribute__((weak)) void matrix_init_keymap(void) {} layer_state_t layer_state_set_user(layer_state_t state) { state = update_tri_layer_state(state, L_EDVORAKJP_LOWER, L_EDVORAKJP_RAISE, L_EDVORAKJP_ADJUST); diff --git a/users/ericgebhart/extensions/oneshot.c b/users/ericgebhart/extensions/oneshot.c index 55c2fa1ae3d8..8d4dc2f29c8a 100644 --- a/users/ericgebhart/extensions/oneshot.c +++ b/users/ericgebhart/extensions/oneshot.c @@ -50,7 +50,7 @@ static int8_t set_modifier_state_all(oneshot_state new_state); static void set_modifier_state_all_from_to(oneshot_state oneshot_state_from, oneshot_state oneshot_state_to); static bool all_modifiers_are_off(void); -int8_t turnoff_oneshot_modifiers() { +int8_t turnoff_oneshot_modifiers(void) { return set_modifier_state_all(ONESHOT_STATE_OFF); } @@ -163,7 +163,7 @@ void set_modifier_state_all_from_to(oneshot_state oneshot_state_from, oneshot_st } } -bool all_modifiers_are_off() { +bool all_modifiers_are_off(void) { for (int8_t i = 0; i < ONESHOT_MOD_COUNT; i++) { if (modifiers_with_state[i] != ONESHOT_STATE_OFF) { return false; diff --git a/users/ericgebhart/oled/oled_stuff.c b/users/ericgebhart/oled/oled_stuff.c index a73b5b174d7f..f2c4f0f394ba 100755 --- a/users/ericgebhart/oled/oled_stuff.c +++ b/users/ericgebhart/oled/oled_stuff.c @@ -47,7 +47,7 @@ void oled_render_mod_status(uint8_t modifiers) { oled_write_P(PSTR("G"), (modifiers & MOD_MASK_GUI)); } -void oled_render_mod_lock_status(){ +void oled_render_mod_lock_status(void){ oled_render_mod_status(get_mods() | get_oneshot_mods()); oled_render_keylock_status(host_keyboard_leds()); } diff --git a/users/miles2go/babblePaste.c b/users/miles2go/babblePaste.c index cd032882bf03..65c998118621 100644 --- a/users/miles2go/babblePaste.c +++ b/users/miles2go/babblePaste.c @@ -23,7 +23,7 @@ __attribute__((weak)) void babble_modeswitch_kb(uint8_t mode) { babble_modeswitc void set_babble_mode(uint8_t id) { babble_mode = id; } -void babble_mode_increment() { +void babble_mode_increment(void) { babble_mode += 1; if (babble_mode >= BABL_MODEMAX) { babble_mode = 0; @@ -31,7 +31,7 @@ void babble_mode_increment() { babble_modeswitch_kb(babble_mode); } -void babble_mode_decrement() { +void babble_mode_decrement(void) { if (babble_mode >= 1) { babble_mode -= 1; } else { diff --git a/users/ninjonas/ninjonas.c b/users/ninjonas/ninjonas.c index d66a5b008ce3..8d37641aa376 100644 --- a/users/ninjonas/ninjonas.c +++ b/users/ninjonas/ninjonas.c @@ -22,7 +22,7 @@ layer_state_t layer_state_set_user (layer_state_t state) { #ifdef RGBLIGHT_ENABLE extern rgblight_config_t rgblight_config; #endif -void keyboard_post_init_user() { +void keyboard_post_init_user(void) { #ifdef RGBLIGHT_ENABLE // Cycles through the entire hue wheel and resetting to default color uint16_t default_hue = rgblight_config.hue; diff --git a/users/spidey3/layer_rgb.c b/users/spidey3/layer_rgb.c index 75a4b4c0a193..cff20898cd9f 100644 --- a/users/spidey3/layer_rgb.c +++ b/users/spidey3/layer_rgb.c @@ -99,7 +99,7 @@ const rgblight_segment_t *const PROGMEM _rgb_layers[] = { const uint8_t PROGMEM _n_rgb_layers = ARRAY_SIZE(_rgb_layers) - 1; -void clear_rgb_layers() { +void clear_rgb_layers(void) { for (uint8_t i = 0; i < _n_rgb_layers; i++) { rgblight_set_layer_state(i, false); } diff --git a/users/talljoe/macros.c b/users/talljoe/macros.c index e9c9b521b702..1afc1ef7f679 100644 --- a/users/talljoe/macros.c +++ b/users/talljoe/macros.c @@ -29,9 +29,9 @@ ostype_t get_os() { #define MOD_SEND(KEY) (IS_OSX() ? SEND_STRING(SS_LCMD(KEY)) : SEND_STRING(SS_LCTL(KEY))) -void macro_copy() { MOD_SEND("c"); } -void macro_paste() { MOD_SEND("v"); } -void macro_lock() { +void macro_copy(void) { MOD_SEND("c"); } +void macro_paste(void) { MOD_SEND("v"); } +void macro_lock(void) { if (IS_OSX()) { SEND_STRING(SS_LCTL(SS_LCMD("q"))); } else {