diff --git a/embedded-workshop-book/src/get-descriptor-config.md b/embedded-workshop-book/src/get-descriptor-config.md index e56a2a0..84380a0 100644 --- a/embedded-workshop-book/src/get-descriptor-config.md +++ b/embedded-workshop-book/src/get-descriptor-config.md @@ -2,7 +2,7 @@ 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. + A GET_DESCRIPTOR Configuration request is a GET_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*? @@ -80,4 +80,3 @@ The interface descriptor in the response should contain these fields: Again, we strongly recommend that you use the `usb2::configuration::Descriptor` and `usb2::interface::Descriptor` abstractions here. Each descriptor instance can be transformed into its byte representation using the `bytes` method -- the method returns an array. To concatenate both arrays you can use an stack-allocated [`heapless::Vec`] buffer. If you haven't the `heapless` crate before you can find example usage in the the `src/bin/vec.rs` file. [`heapless::Vec`]: https://docs.rs/heapless/0.5.5/heapless/struct.Vec.html - diff --git a/embedded-workshop-book/src/setup-stage.md b/embedded-workshop-book/src/setup-stage.md index fdcb30a..0cc43ab 100644 --- a/embedded-workshop-book/src/setup-stage.md +++ b/embedded-workshop-book/src/setup-stage.md @@ -15,7 +15,7 @@ The definition of `Descriptor::Configuration` as well as the associated test has Your task now is to parse the data of this SETUP stage. We will start with the GET_DESCRIPTOR request, which is described in detail in section 9.4.3 of the USB specification. All the constants you will need are described in Tables 9-3, 9-4 and 9-5. The fields of a GET_DESCRIPTOR request are as follows: -- `bmrequesttype` is 0b10000000 +- `bmRequestType` is 0b10000000 - `bRequest` is GET_DESCRIPTOR - the high byte of `wValue` contains the descriptor type, whereas the low byte contains the descriptor index - `wIndex` is set to 0 for our purposes @@ -56,4 +56,3 @@ INFO:usb_2 -- Goal reached; move to the next section You can find a solution to step 1. in `advanced/common/usb/get-descriptor-device.rs`. You can find a solution to step 2. in `advanced/firmware/src/bin/usb-2-solution.rs`. -