Skip to content
Commit 5bef4a9d authored by Mathieu CHOPLAIN's avatar Mathieu CHOPLAIN Committed by Henrik Brix Andersen
Browse files

drivers: usb: udc: skeleton: handle special case of set_halt() for EP0



The UDC stack assumes that 'halt' on control endpoints is automatically
cleared by device drivers and never calls udc_ep_clear_halt() for such
endpoints. In practice, most controllers do perform this automatic clear
in hardware, but this requires special handling in udc_ep_set_halt() for
control endpoints (EP0), as setting the 'halted' bit on such endpoints will
lead to the software getting out-of-sync with the hardware.

Update the UDC skeleton driver to handle this edge case and add a comment
documenting the stack's behavior, along with the hardware behavior expected
by the code added to the skeleton driver for it to be functional.

Co-authored-by: default avatarJohann Fischer <johann.fischer@nordicsemi.no>
Signed-off-by: default avatarMathieu CHOPLAIN <mathieu.choplain-ext@st.com>
parent 32c67762
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment