Skip to content
Commit 3d523a9c authored by Tomasz Moń's avatar Tomasz Moń Committed by Carles Cufí
Browse files

nrf_usbd_common: Refactor interrupt handling code



Ensure strict order within interrupt processing to eliminate workaround
in IN transfer acknowledged handler. EPDATASTATUS and DMA done events
are processed in a way that eliminates the possibility for race condions
between interrupt handler and host IN tokens.

Store last started DMA endpoint and use it in common handler for all DMA
finished events. Unify use of ep dma waiting variable because atomics
only make sense if all accesses are through atomic functions - here the
accesses are guarded with critical section.

Do not disable SETUP interrupt when DMA transfers data on endpoint 0 but
simply postpone handling if currently active DMA is on endpoint 0.

Signed-off-by: default avatarTomasz Moń <tomasz.mon@nordicsemi.no>
parent fc59ed70
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment