From d0752da10ac4f6fb96d3b942cae507399ea2ec82 Mon Sep 17 00:00:00 2001 From: Lotte Steenbrink Date: Wed, 15 Jul 2020 14:14:18 +0200 Subject: [PATCH] embedded-workshop-book: fix links to book sections/chapters --- embedded-workshop-book/src/get-descriptor-config.md | 2 +- embedded-workshop-book/src/idle-state.md | 2 +- embedded-workshop-book/src/supporting-standard-requests.md | 4 ++-- embedded-workshop-book/src/updating-device-state.md | 4 ++-- 4 files changed, 6 insertions(+), 6 deletions(-) diff --git a/embedded-workshop-book/src/get-descriptor-config.md b/embedded-workshop-book/src/get-descriptor-config.md index 84380a0..6b8b1c5 100644 --- a/embedded-workshop-book/src/get-descriptor-config.md +++ b/embedded-workshop-book/src/get-descriptor-config.md @@ -48,7 +48,7 @@ We will not need to deal with endpoint descriptors in this workshop but they are So how should we respond to the host? As our only goal is to be enumerated we'll respond with the minimum amount of information possible. **First, check the request:** -Configuration descriptors are requested by *index*, not by their configuration value. Since we reported a single configuration in our device descriptor the index in the request must be zero. Any other value should be rejected by stalling the endpoint (see section [Dealing with unknown requests: Stalling the endpoint](#dealing-with-unknown-requests-stalling-the-endpoint) for more information). +Configuration descriptors are requested by *index*, not by their configuration value. Since we reported a single configuration in our device descriptor the index in the request must be zero. Any other value should be rejected by stalling the endpoint (see section [Dealing with unknown requests: Stalling the endpoint](./unknown-requests.md#dealing-with-unknown-requests-stalling-the-endpoint) for more information). **Next, create and send a response:** The response should consist of the configuration descriptor, followed by interface descriptors and then by (optional) endpoint descriptors. We'll include a minimal single interface descriptor in the response. Since endpoints are optional we will include none. diff --git a/embedded-workshop-book/src/idle-state.md b/embedded-workshop-book/src/idle-state.md index 7286bab..b4ba40c 100644 --- a/embedded-workshop-book/src/idle-state.md +++ b/embedded-workshop-book/src/idle-state.md @@ -55,7 +55,7 @@ You can find traces for other OSes in these files (they are in the `advanced` fo - `macos-enumeration.txt` - `win-enumeration.txt` -At this point you can double check that the enumeration works by running the [`usb-list` tool](#listing-usb-devices) while `usb-4.rs` is running. +At this point you can double check that the enumeration works by running the [`usb-list` tool](./listing-usb-devices.md) while `usb-4.rs` is running. ``` console Bus 001 Device 013: ID 1366:1015 <- J-Link on the nRF52840 Development Kit diff --git a/embedded-workshop-book/src/supporting-standard-requests.md b/embedded-workshop-book/src/supporting-standard-requests.md index abfc8b8..f3cc5bb 100644 --- a/embedded-workshop-book/src/supporting-standard-requests.md +++ b/embedded-workshop-book/src/supporting-standard-requests.md @@ -2,8 +2,8 @@ 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 [Handling GET_DESCRIPTOR Configuration Requests](#handling-get_descriptor-configuration-requests) -2. `SET_CONFIGURATION`, see section [SET_CONFIGURATION](#set_configuration) of this course material +1. `GET_DESCRIPTOR Configuration`, see the section on [Handling GET_DESCRIPTOR Configuration Requests](./get-descriptor-config.md#handling-get_descriptor-configuration-requests) +2. `SET_CONFIGURATION`, see the section on [SET_CONFIGURATION](./getting-device-configured.md#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. diff --git a/embedded-workshop-book/src/updating-device-state.md b/embedded-workshop-book/src/updating-device-state.md index a81e5f0..29b69cb 100644 --- a/embedded-workshop-book/src/updating-device-state.md +++ b/embedded-workshop-book/src/updating-device-state.md @@ -8,6 +8,6 @@ Start tracking and updating the device state to move your request handling forwa 1. **Update the handling of the `USBRESET` event:** Instead of ignoring it, we now want it to change the state of the USB device. See section 9.1 USB Device States of the USB specification for details on what to do. -2. **Update the handling of `SET_ADDRESS` requests:** See the section on [Handling SET_ADDRESS Requests](#handling-set_address-requests) of this tutorial for details. +2. **Update the handling of `SET_ADDRESS` requests:** See the section on [Handling SET_ADDRESS Requests](./set-address.md#handling-set_address-requests) of this tutorial for details. -3. **Implement the handling of `GET_DESCRIPTOR Configuration` requests:** See the section on [Handling GET_DESCRIPTOR Configuration Requests](#handling-get_descriptor-configuration-requests) of this tutorial for details. +3. **Implement the handling of `GET_DESCRIPTOR Configuration` requests:** See the section on [Handling GET_DESCRIPTOR Configuration Requests](./get-descriptor-config.md#handling-get_descriptor-configuration-requests) of this tutorial for details.