embedded-trainings-2020/embedded-workshop-book/src/unknown-requests.md

8 lines
647 B
Markdown
Raw Normal View History

2020-07-13 11:48:24 +00:00
# Dealing with unknown requests: Stalling the endpoint
You may come across host requests other than the ones listed in previous sections.
For this situation, the USB specification defines a device-side procedure for "stalling an endpoint", which amounts to the device telling the host that it doesn't support some request.
> This procedure should be used to deal with invalid requests, requests whose SETUP stage doesn't match any USB 2.0 standard request, and requests not supported by the device for instance the SET_DESCRIPTOR request is not mandatory.
2020-07-15 16:53:31 +00:00
✅ Use the `dk::usbd::ep0stall()` helper function to stall endpoint 0 in `usb-4.rs`.