Go to file
Stefan Kerkmann 3f9d464412
[Core] usb_device_state: consolidate usb state handling across 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>
2024-10-18 09:57:08 +02:00
.github Bump JamesIves/github-pages-deploy-action from 4.6.4 to 4.6.8 (#24453) 2024-09-30 20:31:03 +01:00
.vscode
builddefs Separate RGBLight/RGB Matrix keycode handling (#23679) 2024-10-12 18:43:50 +02:00
data Add svlinky converter (#24449) 2024-10-12 00:16:25 +01:00
docs Rename RGB/HSV structs: keyboard-level code (#24476) 2024-10-12 19:00:56 +01:00
drivers [Core] usb_device_state: consolidate usb state handling across implementations (#24258) 2024-10-18 09:57:08 +02:00
keyboards [Core] usb_device_state: consolidate usb state handling across implementations (#24258) 2024-10-18 09:57:08 +02:00
layouts Remove 60_tsangan_hhkb community layout (#24355) 2024-09-05 15:21:45 +10:00
lib Merge remote-tracking branch 'origin/master' into develop 2024-09-13 20:53:01 +00:00
platforms Add svlinky converter (#24449) 2024-10-12 00:16:25 +01:00
quantum [Core] usb_device_state: consolidate usb state handling across implementations (#24258) 2024-10-18 09:57:08 +02:00
tests Remove RING_BUFFERED_6KRO_REPORT_ENABLE due to disuse. (#24433) 2024-09-24 12:53:55 +01:00
tmk_core [Core] usb_device_state: consolidate usb state handling across implementations (#24258) 2024-10-18 09:57:08 +02:00
users Remove symbolic linked userspace folder (#22548) 2023-11-27 12:49:44 +11:00
util Merge remote-tracking branch 'origin/master' into develop 2024-10-06 08:40:06 +00:00
.clang-format
.clangd clangd enhancements. (#23310) 2024-05-02 20:08:41 +10:00
.editorconfig .editorconfig: fix inline comment, tidy name section for yaml (#24416) 2024-09-21 19:48:31 +01:00
.gitattributes
.gitignore Add via keymaps to gitignore (#24329) 2024-08-26 04:33:40 +01:00
.gitmodules
Doxyfile Remove arm_atsam platform (#24337) 2024-09-02 03:48:17 +01:00
doxygen-todo
LICENSE
license_GPLv2.md
license_GPLv3.md
license_Modified_BSD.md
Makefile Add helper make targets for formatting and pytest. (#23858) 2024-06-04 12:23:25 +10:00
nose2.cfg
paths.mk
readme.md Branch point for 2024q4 breaking change 2024-08-26 10:04:37 +10:00
requirements-dev.txt
requirements.txt
setup.cfg
shell.nix Nix shell updates (Nixpkgs 2024-02-23, QMK CLI 1.1.5) (#23143) 2024-02-26 13:04:27 +11:00

THIS IS THE DEVELOP BRANCH

Warning- This is the develop branch of QMK Firmware. You may encounter broken code here. Please see Breaking Changes for more information.

Quantum Mechanical Keyboard Firmware

Current Version Discord Docs Status GitHub contributors GitHub forks

This is a keyboard firmware based on the tmk_keyboard firmware with some useful features for Atmel AVR and ARM controllers, and more specifically, the OLKB product line, the ErgoDox EZ keyboard, and the Clueboard product line.

Documentation

The docs are powered by VitePress. They are also viewable offline; see Previewing the Documentation for more details.

You can request changes by making a fork and opening a pull request.

Supported Keyboards

The project also includes community support for lots of other keyboards.

Maintainers

QMK is developed and maintained by Jack Humbert of OLKB with contributions from the community, and of course, Hasu. The OLKB product firmwares are maintained by Jack Humbert, the Ergodox EZ by ZSA Technology Labs, the Clueboard by Zach White, and the Atreus by Phil Hagelberg.

Official Website

qmk.fm is the official website of QMK, where you can find links to this page, the documentation, and the keyboards supported by QMK.