-
-
Notifications
You must be signed in to change notification settings - Fork 40.7k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Handle idle reports and get reports requests async
The USB idle rate handling for non-nkro keyboard endpoint was implemented via a virtual timer that fired asynchronously at the host requested idle rate. Sending was done in the callback of the virtual timer in an ISR context. This is no longer an option as the asynchronous endpoints take ownership of all used USB endpoints and thus assume that all reports will be send via it's API. This commit introduces a report storage that holds the last successfully send USB report for all USB IN **HID** endpoints. This report storage is modelled in a OOP fashion as the shared endpoint with its multiple report types complicates the handling. With this report storage we can not only fullfill the idle rate handling but also the mandatory get report requests for all USB HID IN endpoints in a generic fashion. Signed-off-by: Stefan Kerkmann <[email protected]>
- Loading branch information
Showing
12 changed files
with
571 additions
and
195 deletions.
There are no files selected for viewing
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -221,4 +221,5 @@ void protocol_post_task(void) { | |
#ifdef RAW_ENABLE | ||
raw_hid_task(); | ||
#endif | ||
usb_idle_task(); | ||
} |
This file contains 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 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 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
Oops, something went wrong.