advanced/README.md: GET_DESCRIPTOR Configuration -> prose

This commit is contained in:
Lotte Steenbrink 2020-07-13 16:17:09 +02:00
parent 57214ec7fa
commit 678f1e5314
2 changed files with 4 additions and 2 deletions

View file

@ -1,6 +1,8 @@
# Handling GET_DESCRIPTOR Configuration Requests
When the host issues a GET_DESCRIPTOR request the device needs to respond with the requested configuration descriptor *plus* all the interface and endpoint descriptors associated to that configuration descriptor during the DATA stage.
When the host issues a GET_DESCRIPTOR *Configuration* request the device needs to respond with the requested configuration descriptor *plus* all the interface and endpoint descriptors associated to that configuration descriptor during the DATA stage.
A GET_DESCRIPTOR Configuration request is a GERT_DESCRIPTOR request where the descriptor type encoded in the high bit of `wValue` is CONFIGURATION.
We have covered configurations and endpoints but what is an *interface*?

View file

@ -2,7 +2,7 @@
After responding to the `GET_DESCRIPTOR Device` request the host will start sending different requests. The parser in `common/usb` will need to be updated to handle these requests:
1. `GET_DESCRIPTOR Configuration`, see section 9.4.3 of the USB spec
1. `GET_DESCRIPTOR Configuration`, see section [Handling GET_DESCRIPTOR Configuration Requests](#handling-get_descriptor-configuration-requests)
2. `SET_CONFIGURATION`, see section [SET_CONFIGURATION](#set_configuration) of this course material
The starter `common/usb` code contains unit tests for these other requests as well as extra `Request` variants for these requests. All of them have been commented out using a `#[cfg(TODO)]` attribute which you can remove once you need any new variant or new unit test.