forked from nrfconnect/sdk-zephyr
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
drivers: usb: udc_dwc2: Replace queue with events
When the queue is full, all messages posted inside interrupt handlers are simply dropped. This problem can be remedied by having the message queue large enough, but determining the maximum number of messages that can ever be posted in the system is really complex task. Hopefully in DWC2 driver there is finite number of events that have to be processed inside thread handler. Therefore it is unnecessary to determine the maximum queue size for the events if the events are posted to k_event object instead of send to k_msgq object. Use combination of three k_event structures to handle all possible event sources. This not only guarantees by design that no event will be lost, but also slightly reduces the memory usage. Signed-off-by: Tomasz Moń <[email protected]>
- Loading branch information
1 parent
2c78a4d
commit c2f2d8c
Showing
2 changed files
with
128 additions
and
96 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
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