aboutsummaryrefslogtreecommitdiff
path: root/tmk_core/protocol/vusb/vusb.c
Commit message (Collapse)AuthorAgeFilesLines
* Joystick: add support for 8-way hat switch (#24515)Ryan2024-11-091-0/+17
|
* [Core] `usb_device_state`: consolidate usb state handling across ↵Stefan Kerkmann2024-10-181-24/+20
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | implementations (#24258) * usb_device_state: add idle_rate, led and protocol Previously all usb drivers and platform implementations (expect for our oddball atsam) tracked the same two global variables: - keyboard_protocol: to indicate if we are in report or boot protocol - keyboard_idle: for the idle_rate of the keyboard endpoint And a local variable that was exposed trough some indirection: - keyboard_led_state: for the currently set indicator leds (caps lock etc.) These have all been moved into the usb_device_state struct wich is accessible by getters and setters. This reduces code duplication and centralizes the state management across platforms and drivers. Signed-off-by: Stefan Kerkmann <karlk90@pm.me> * usb_device_state: reset protocol on reset The usb hid specification section 7.2.6 states: When initialized, all devices default to report protocol. However the host should not make any assumptions about the device’s state and should set the desired protocol whenever initializing a device. Thus on reset we should always do exactly that. Signed-off-by: Stefan Kerkmann <karlk90@pm.me> * keyboards: fix oversize warnings Signed-off-by: Stefan Kerkmann <karlk90@pm.me> --------- Signed-off-by: Stefan Kerkmann <karlk90@pm.me>
* Merge remote-tracking branch 'origin/master' into developQMK Bot2024-10-151-1/+1
|\
| * Digitizer: fix units tag in report descriptor (#24482)Ryan2024-10-151-1/+1
| |
* | Extended wheel reports (#24422)eynsai2024-10-061-8/+22
|/ | | extended wheel reports
* Refactor vusb to protocol use pre/post task (#14944)Joel Challis2024-03-141-1/+9
|
* Remove console out endpoint (#22304)Joel Challis2024-01-091-17/+0
|
* V-USB: implement NKRO (#22398)Ryan2023-11-261-4/+45
|
* V-USB: Add generic `send_report()` function (#22323)Ryan2023-11-261-90/+53
|
* V-USB: Fix `GET_IDLE/SET_IDLE` (#22332)Ryan2023-10-271-16/+12
| | | | Co-authored-by: Sergey Vlasov <sigprof@gmail.com>
* V-USB: Implement `GET_PROTOCOL` and `SET_PROTOCOL` handling (#22324)Ryan2023-10-251-24/+38
|
* Separate 6KRO and NKRO report structs (#22267)Ryan2023-10-231-1/+7
|
* Update keyboard report descriptor for USB compliance (#21626)Stefan Kerkmann2023-07-281-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | Running the "HID Tests" suite of the USB 3 Command Verifier (USB3CV) tool resulted in the following error: (HID: 3.2.61) The report descriptor returned in response to a GetDescriptor(Report) must be compliant with the HID specification. Byte Number: 37h ( 55d) Data Field: 91 02 Mnemonic: Output Value: (Variable) Errors: Error: LOGICAL MAX MUST be bounded by Report Size The error stems from the fact that logical minimum and maximum are global items, which means that the next item in a report descriptor inherits the value from the previously set value. In this case the status leds item inherited the logical minimum (=0) and maximum (=255) from the keycodes item. As the status leds set a report size of 1 bit, wich can only hold a boolean, it becomes clear that this range would never fit. The fix is straightforward, we just define a appropriate logical maximum (=1), the mismatch is solved and our keyboard now passes the compliance tests. Defining the logical minimum is redundant in this case but is kept to form a logical block.
* Detect host OS based on USB fingerprint (#18463)Ruslan Sayfutdinov2022-12-091-0/+7
| | | | Co-authored-by: Drashna Jaelre <drashna@live.com> Co-authored-by: Nick Brassel <nick@tzarc.org>
* Joystick feature improvements (#19052)Ryan2022-11-271-3/+74
|
* Digitizer feature improvements (#19034)Ryan2022-11-121-13/+11
|
* Refactor `send_extra` (#18615)Ryan2022-10-061-11/+3
|
* Refactor more host code (programmable button & digitizer) (#18565)Ryan2022-10-051-10/+3
|
* Adjust `EXTRAKEY_ENABLE` ifdefs for `send_extra()` (#18249)Ryan2022-09-021-2/+2
|
* Simplify extrakeys sending at the host driver level (#18230)Ryan2022-09-021-15/+2
| | | | | | | | | * Simplify extrakeys sending at the host driver level * There are two arguments here * Wrong syntax * Adjust keyboards which use a custom host driver
* Switch over MANUFACTURER and PRODUCT to string literals (#18183)Ryan2022-08-281-6/+6
|
* Add support for large Mouse Reports (#16371)Drashna Jaelre2022-06-081-1/+15
| | | | Co-authored-by: Sergey Vlasov <sigprof@gmail.com> Co-authored-by: Ryan <fauxpark@gmail.com>
* Format code according to conventions (#16322)QMK Bot2022-02-121-177/+181
|
* Remove Deprecated USB Polling comment from vusb.c (#15420)Drashna Jaelre2021-12-071-1/+0
|
* Fix up issues shown by clang-format of vusb (#15004)Joel Challis2021-11-011-2/+3
|
* Add Support for USB programmable buttons (#12950)Thomas Weißschuh2021-09-151-1/+35
|
* Digitizer HID interface : absolute coordinates for mouse cursor (#12851)a-chol2021-08-181-1/+47
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Add digitizer HID interface for setting the mouse cursor position at absolute screen coordinates. Tested on Pro Micro, Proton C and Blackpill. * Update docs/feature_digitizer.md Co-authored-by: Ryan <fauxpark@gmail.com> * Update tmk_core/protocol/usb_descriptor.c Co-authored-by: Ryan <fauxpark@gmail.com> * Add missing copyrights Add V-USB support * Add support for digitizer dedicated endpoint for lufa and chibios. Fix formatting issues Move digitizer_task definition to the feature's base implementation file * Run cformat on modified files * Change digitizer report usage to Digitizer instead of Pen to avoid pointer disappearing on Windows. * Update tmk_core/protocol/vusb/vusb.c Co-authored-by: Ryan <fauxpark@gmail.com> * Run cformat from docker image * Remove send_digitizer from host_driver_t and instead rely on the declaration being the interface to the implementation in each HW-specific usb implementation. * Fix build : send_digitizer shouldn't be static in vusb and add weak-linkage implementation for tests without usb implementation * Change digitizer user interface to match pointing device's * Update documentation with new API Co-authored-by: a-chol <nothing@none.com> Co-authored-by: Ryan <fauxpark@gmail.com>
* Use string literals for `SERIAL_NUMBER` (#13403)Ryan2021-07-161-2/+2
|
* [Core] ChibiOS fix O3 and LTO breakage of extra keys and joystick (#12819)Stefan Kerkmann2021-06-061-1/+2
|
* Add support for 8 buttons to mouse report (#10807)Drashna Jaelre2021-01-281-7/+3
| | | | | | | | | | | | | | | | | | | | | * Add support for 8 buttons to mouse report This includes support for 8 buttons in mousekeys. However, this does move the keys around due to the fact that the last mousekey keycode is already 0xFF, so any past that would not work with register_code and the like, breaking them for tap hold keys, encoders, and other features. * Update mouse key docs * Add changes based on feedback * Fix VUSB report size comment Because drashna red gud * Fix typo in action.c * Fix IS_MOUSE_BUTTON check * Change start range for mousekeys so that the end is 0xFF properly * condense mousekeys check
* Add support for shared EP on V-USB boards (#11103)Ryan2021-01-111-33/+90
|
* Fix small typo in V-USB configuration descriptor (#11253)Ryan2020-12-211-1/+1
|
* Omit serial number if not defined (#11104)Ryan2020-12-051-4/+8
|
* Update vusb to match 3rd endpoint. (#9020)yiancar2020-08-291-7/+11
| | | | | | | | | | | | | | | | | | | | | | | | | * Update vusb to match 3rd endpoint. - With the addition of https://github.com/qmk/v-usb/pull/1 a 3rd endpoint (endpoint4) becomes available. - We can assign mouse/extrakeys to that endpoint as its a desirable feature and leave rawhid and console to compete for the 2nd endpoint. NOTE: The version of vusb.c in future branch is older than master. Just remember that it will need a #error if both raw_hid and console are enabled at the same time. * Final Fixes * Update tmk_core/protocol/vusb/vusb.c * Update tmk_core/protocol/vusb/vusb.c * Update tmk_core/protocol/vusb/usbconfig.h * Update tmk_core/protocol/vusb/usbconfig.h * Update tmk_core/protocol/vusb/usbconfig.h * Update tmk_core/protocol/vusb/usbconfig.h * Updated vusb submodule to latest commit
* Additional cleanups for V-USB code (#9310)Ryan2020-08-291-59/+43
|
* Various tidyups for USB descriptor code (#9005)Ryan2020-08-291-14/+10
|
* 2020 May 30 Breaking Changes Update (#9215)James Young2020-05-301-17/+17
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Branch point for 2020 May 30 Breaking Change * Migrate `ACTION_LAYER_TOGGLE` to `TG()` (#8954) * Migrate `ACTION_MODS_ONESHOT` to `OSM()` (#8957) * Migrate `ACTION_DEFAULT_LAYER_SET` to `DF()` (#8958) * Migrate `ACTION_LAYER_MODS` to `LM()` (#8959) * Migrate `ACTION_MODS_TAP_KEY` to `MT()` (#8968) * Convert V-USB usbdrv to a submodule (#8321) * Unify Tap Hold functions and documentation (#8348) * Changing board names to prevent confusion (#8412) * Move the Keyboardio Model01 to a keyboardio/ subdir (#8499) * Move spaceman keyboards (#8830) * Migrate miscellaneous `fn_actions` entries (#8977) * Migrate `ACTION_MODS_KEY` to chained mod keycodes (#8979) * Organizing my keyboards (plaid, tartan, ergoinu) (#8537) * Refactor Lily58 to use split_common (#6260) * Refactor zinc to use split_common (#7114) * Add a message if bin/qmk doesn't work (#9000) * Fix conflicting types for 'tfp_printf' (#8269) * Fixed RGB_DISABLE_AFTER_TIMEOUT to be seconds based & small internals cleanup (#6480) * Refactor and updates to TKC1800 code (#8472) * Switch to qmk forks for everything (#9019) * audio refactor: replace deprecated PLAY_NOTE_ARRAY (#8484) * Audio enable corrections (2/3) (#8903) * Split HHKB to ANSI and JP layouts and Add VIA support for each (#8582) * Audio enable corrections (Part 4) (#8974) * Fix typo from PR7114 (#9171) * Augment future branch Changelogs (#8978) * Revert "Branch point for 2020 May 30 Breaking Change"
* Allow for overriding RAW endpoint usage page and ID. (#8834)Nick Brassel2020-05-211-3/+4
| | | | | | | * Allow for overriding RAW endpoint usage page and ID. * Move usb_descriptor_common.h. * Docs update.
* V-USB Interface reorder (#9090)yiancar2020-05-141-67/+73
|
* Initial vusb console support (#8559)Joel Challis2020-05-031-26/+187
|
* V-USB: Remove some stuff from usbconfig.h that should not be configurable ↵Ryan2020-04-051-24/+10
| | | | | | | | | | | (#8656) * V-USB: Remove some stuff from usbconfig.h that should not be configurable * Clean up some ifdefs * And some more * Even more
* V-USB remote wakeup (#7627)Drashna Jaelre2020-04-051-5/+1
| | | | | | | | | * V-USB remote wakeup Backport from tmk/tmk_keyboard@391c979be751eaf113c8f53c36644a6bb6ff12f6 * Change vusb.c remote wake config as per fauxpark's suggestion
* Strip out features to allow minimum firmware sizes (#8645)Joel Challis2020-04-011-0/+2
|
* Updated V-USB template to allow usbFunctionWriteOut (#8634)yiancar2020-04-011-2/+0
|
* add hid_raw feature to VUSB (#8380)Takuya Urakawa2020-03-301-1/+156
| | | | | | | | | | | | | | | | | | | * rewrite usbhid feature on vusb * Apply suggestions from code review Co-Authored-By: Ryan <fauxpark@gmail.com> * fix typo * fix typo again * Update tmk_core/protocol/vusb/vusb.c Co-Authored-By: Ryan <fauxpark@gmail.com> * clean up defines Co-authored-by: Ryan <fauxpark@gmail.com>
* V-USB: Use structs for USB descriptors (#8572)Ryan2020-03-281-100/+146
| | | | | | | * V-USB: Use structs for USB descriptors * Update usbconfigs * cformat pass
* V-USB: Use manufacturer and product strings from config.h (#7797)Ryan2020-03-261-0/+58
| | | | | * V-USB: Use manufacturer and product strings from config.h * Update board configs
* Run clang-format manually to fix recently changed files (#8552)Joel Challis2020-03-251-14/+14
|
* Improvements to extrakey HID descriptors (#8156)Ryan2020-02-251-18/+37
|
* format code according to conventions [skip ci]QMK Bot2020-02-121-58/+58
|