diff --git a/embedded-workshop-book/src/configuration-descriptor.md b/embedded-workshop-book/src/configuration-descriptor.md index e8b5707..6565d0f 100644 --- a/embedded-workshop-book/src/configuration-descriptor.md +++ b/embedded-workshop-book/src/configuration-descriptor.md @@ -1,7 +1,11 @@ # Configuration descriptor
- +
The configuration descriptor describes one of the device configurations to the host. The descriptor contains the following information about a particular configuration: diff --git a/embedded-workshop-book/src/control-transfers.md b/embedded-workshop-book/src/control-transfers.md index 4278470..62fdcc3 100644 --- a/embedded-workshop-book/src/control-transfers.md +++ b/embedded-workshop-book/src/control-transfers.md @@ -1,7 +1,11 @@ # Control Transfers
- +
Before we continue we need to discuss how data transfers work under the USB protocol. diff --git a/embedded-workshop-book/src/device-descriptor.md b/embedded-workshop-book/src/device-descriptor.md index 220796b..0a04d06 100644 --- a/embedded-workshop-book/src/device-descriptor.md +++ b/embedded-workshop-book/src/device-descriptor.md @@ -1,7 +1,11 @@ # Device Descriptor
- +
After receiving a GET_DESCRIPTOR request during the SETUP stage the device needs to respond with a *descriptor* during the DATA stage. diff --git a/embedded-workshop-book/src/endpoint-descriptor.md b/embedded-workshop-book/src/endpoint-descriptor.md index 0fde5e3..793d782 100644 --- a/embedded-workshop-book/src/endpoint-descriptor.md +++ b/embedded-workshop-book/src/endpoint-descriptor.md @@ -1,7 +1,11 @@ ## Endpoint descriptor
- +
We will not need to deal with endpoint descriptors in this workshop but they are specified in section 9.6.6, Endpoint, of the USB specification. diff --git a/embedded-workshop-book/src/interface-descriptor.md b/embedded-workshop-book/src/interface-descriptor.md index a2331d3..09b5f30 100644 --- a/embedded-workshop-book/src/interface-descriptor.md +++ b/embedded-workshop-book/src/interface-descriptor.md @@ -1,7 +1,11 @@ ## Interface descriptor
- +
The interface descriptor describes one of the device interfaces to the host. The descriptor contains the following information about a particular interface: diff --git a/embedded-workshop-book/src/interfaces.md b/embedded-workshop-book/src/interfaces.md index c1f44aa..2d639fb 100644 --- a/embedded-workshop-book/src/interfaces.md +++ b/embedded-workshop-book/src/interfaces.md @@ -3,7 +3,11 @@ We have covered configurations and endpoints but what is an *interface*?
- +
An interface is closest to a USB device's function. For example, a USB mouse may expose a single HID (Human Interface Device) interface to report user input to the host. USB devices can expose multiple interfaces within a configuration. For example, the nRF52840 Dongle could expose both a CDC ACM interface (AKA virtual serial port) *and* a HID interface; the first interface could be used for (`log::info!`-style) logs; and the second one could provide a RPC (Remote Procedure Call) interface to the host for controlling the nRF52840's radio. diff --git a/embedded-workshop-book/src/usb-endpoints.md b/embedded-workshop-book/src/usb-endpoints.md index 69819d2..49d8de1 100644 --- a/embedded-workshop-book/src/usb-endpoints.md +++ b/embedded-workshop-book/src/usb-endpoints.md @@ -1,7 +1,11 @@ # USB Endpoints
- +
Under the USB protocol data transfers occur over *endpoints*. @@ -11,7 +15,11 @@ Endpoints are similar to UDP or TCP ports in that they allow logical multiplexin Endpoints are identified by their address, a zero-based index, and direction. There are four types of endpoints: control endpoints, bulk endpoints, interrupt endpoints and isochronous endpoints. Each endpoint type has different properties: reliability, latency, etc. In this workshop we'll only need to deal with control endpoints.
- +
All USB devices must use "endpoint 0" as the default control endpoint. "Endpoint 0" actually refers to two endpoints: endpoint 0 IN and endpoint 0 OUT. This endpoint pair is used to establish a *control pipe*, a bidirectional communication channel between the host and device where data is exchanged using a predefined format. The default control pipe over endpoint 0 is mandatory: it must always be present and must always be active.