- Notifications
You must be signed in to change notification settings - Fork 7.7k
Make USBHIDKeyboard work at boot #6964
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 our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from all commits
Commits
Show all changes
23 commits Select commit Hold shift + click to select a range
1201a79 Make USBHIDKeyboard work at boot
RefactorFactory 849c62c Merge branch 'master' into master
SuGlider a10e950 Merge branch 'master' into master
RefactorFactory 0c12eec Merge branch 'master' into master
RefactorFactory b7ac500 Merge branch 'master' into master
RefactorFactory 6041393 Merge branch 'master' into master
RefactorFactory 94eebf3 Merge branch 'master' into master
RefactorFactory 5500ccd Merge branch 'master' into master
RefactorFactory d06aa27 Merge branch 'master' into master
RefactorFactory 2e67a32 Merge branch 'master' into master
RefactorFactory 9f0bcaf Merge branch 'master' into master
RefactorFactory a30d36c Merge branch 'master' into master
RefactorFactory c28a6a6 Merge branch 'master' into master
RefactorFactory e0d2042 Merge branch 'espressif:master' into master
RefactorFactory e94a8c9 Merge branch 'master' into master
RefactorFactory 1896f96 Merge branch 'master' into master
RefactorFactory 16caa73 Merge branch 'master' into master
RefactorFactory ce9049c Merge branch 'master' into master
RefactorFactory e3e612a Merge branch 'master' into master
RefactorFactory d8a61e1 Merge branch 'master' into master
RefactorFactory b2643de Merge branch 'master' into master
RefactorFactory 6ab100c Merge branch 'master' into master
me-no-dev aee11ba Merge branch 'master' into master
P-R-O-C-H-Y File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
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
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
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
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
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
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Without this reservation of endpoints IN 1, OUT 1, USBCDC will reserve OUT 3, IN 4, IN 5 (line 665), then when
USBHID.cpp:tusb_hid_load_descriptor()callstinyusb_get_free_in_endpoint()/tinyusb_get_free_out_endpoint(), those functions will return IN 3, OUT 4 because those functions prefer returning endpoints whose opposite is already used.Some alternatives to calling
tinyusb_reserve_out_endpoint()/tinyusb_reserve_in_endpoint()here to reserve IN 1, OUT 1:USBHID.cpp:tusb_hid_load_descriptor()could calltinyusb_get_free_duplex_endpoint()which would likely get endpoints IN 1, OUT 1 becauseUSBHID.cpp:tusb_hid_load_descriptor()runs early enough.tinyusb_get_free_in_endpoint()/tinyusb_get_free_out_endpoint()not to prefer returning endpoints whose opposite is already used. Or add a flag parameter.