Skip to content

HidClass::control_xxx: check interface number - #26

Merged
TeXitoi merged 2 commits into
TeXitoi:masterfrom
atykhyy:check-iface-number
Sep 28, 2020
Merged

HidClass::control_xxx: check interface number#26
TeXitoi merged 2 commits into
TeXitoi:masterfrom
atykhyy:check-iface-number

Conversation

@atykhyy

@atykhyy atykhyy commented Sep 28, 2020

Copy link
Copy Markdown
Contributor

This PR fixes a bug in HidClass::control_xxx routines which prevents it from working in composite devices (request interface number was not checked).

Reference: USB HID specification v1.11, sections 7.1.1, 7.2.1 and 7.2.2.

@TeXitoi

TeXitoi commented Sep 28, 2020

Copy link
Copy Markdown
Owner

I suppose it is related to rust-embedded-community/usb-device#42 ?

You need to rustfmt.

I'll try on my keyboard and if is works, OK to merge.

@atykhyy

atykhyy commented Sep 28, 2020

Copy link
Copy Markdown
Contributor Author

Yes it's related, but this PR is standalone. The bug it fixes prevents composite devices with multiple HID interfaces (e.g. keyboard + mouse) and nothing else - a configuration which doesn't need IADs to work on Windows - from working properly too.

@TeXitoi
TeXitoi merged commit db51deb into TeXitoi:master Sep 28, 2020
@TeXitoi

TeXitoi commented Sep 28, 2020

Copy link
Copy Markdown
Owner

published in v0.1.1. Thanks!

Hope you'll enjoy keyberon!

@atykhyy
atykhyy deleted the check-iface-number branch September 28, 2020 20:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants