Add support for restart to bootloader via USB command #14212
Closed
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.
Description
This change will piggyback on existing HID descriptor used by shared EP for extra key and shared keyboard/mouse.
New feature report section in the HID descriptor is added to allow PC to send HID feature report to KB and thus instruct it to restart in bootloader.
Added code to distinguish between input/output/feature reports.
set_report buffer that used to handle led status is increased from (1+1 size) to (1+8 size).
This should work for any keyboard since handler uses generic bootloader_jump() function.
There is new USB_FEATURE_ENABLE option that enables shared ep just like EXTRAKEY_ENABLE. So only one option is needed but new option added for consistency in case user opted out of using EXTRAKEY or other shared ep options.
Report to send to KB is struct.pack("<II", 0x5AA555AA, 0xCC3300FF).
Types of Changes
Issues Fixed or Closed by This PR
Checklist