Fix 835 hid cleanup#837
Merged
Merged
Conversation
- add tud_hid_n_interface_protocol() - rename tud_hid_n_boot_mode() to tud_hid_n_get_protocol() - rename tud_hid_boot_mode_cb() to tud_hid_set_protocol_cb() - add HID_PROTOCOL_BOOT/REPORT to avoid magic number 0,1 - rename HID_PROTOCOL_NONE/KEYBOARD/MOUSE to HID_ITF_PROTOCOL_ to avoid confusion
Owner
Author
|
@dhalbert the value return by API get_protocol and in set_protocol is now follow HID spec, either as HID_PROTOCOL_BOOT/REPORT. Although the boot_mode() is easy for new user, the invert logic cause confusion for people that are familiar with HID. You should re-read the API() description. |
Contributor
|
Thanks! This makes it consistent internally and externally, and having the names instead of a bool is great. |
7FM
pushed a commit
to 7FM/tinyusb
that referenced
this pull request
Aug 23, 2025
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

Describe the PR
Fix #835 and more
confusion
itftoinstancein multiple API to have a better meaning.