Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

usb-device-hid: Fix boot protocol config in descriptor, default protocol mode, and protocol mode recover.#1036

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Open
hyx0329 wants to merge2 commits intomicropython:master
base:master
Choose a base branch
Loading
fromhyx0329:usb-hid-boot-protocol

Conversation

@hyx0329
Copy link
Contributor

Set the subclass value of the HID interface descriptor according to the supported interface protocol specified. Therefore BIOS will enumerate the keyboard.

The default interface protocol is set to report protocol according to the specification.

Since BIOS doesn't depend on the HID report descriptor, reset the device to report protocol when the report descriptor is read.

This is tested with a laptop and a RP2040 board with mpy 1.25.0 official release.

I use this to implement a NKRO keyboard with boot protocol support.


My understanding of 2 protocols:

  • Boot protocol: device acts like a predefined HID device, regardless of the report descriptor.
  • Report protocol: device acts just like what its report descriptor says.

Subclass in HID interface descriptor is a flag of boot protocol support.Set it according to the interface protocol settings.HID devices should come up in non-boot mode according to Device ClassDefinition for Human Interface Devices (HID) v1.11 Appendix F.5. Set theinitial state of interface protocol to report protocol.Signed-off-by: Hyx <hyx0329@outlook.com>
So HID device will exit boot protocol mode when entering normal OS.Signed-off-by: Hyx <hyx0329@outlook.com>
@hyx0329hyx0329force-pushed theusb-hid-boot-protocol branch frome89d0d9 to7f8899dCompareJuly 30, 2025 15:33
Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment

Reviewers

No reviews

Assignees

No one assigned

Labels

None yet

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

1 participant

@hyx0329

[8]ページ先頭

©2009-2025 Movatter.jp