Skip to content
Commit c2f2d8ce authored by Tomasz Moń's avatar Tomasz Moń Committed by Fabio Baltieri
Browse files

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: default avatarTomasz Moń <tomasz.mon@nordicsemi.no>
parent 2c78a4d2
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment