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:Johann Fischer <johann.fischer@nordicsemi.no> Signed-off-by:
Mathieu CHOPLAIN <mathieu.choplain-ext@st.com>
Loading
Please sign in to comment