![]() |
nRF5 SDK
v12.3.0
|
| Choose documentation: | nRF5 SDK | S130 SoftDevice API | S132 SoftDevice API | S212 SoftDevice API | S332 SoftDevice API |
nRF52840 only: Module with types definitions used for standard descriptors. More...
Data Structures | |
| struct | app_usbd_descriptor_header_t |
| Common descriptor header. More... | |
| struct | app_usbd_descriptor_device_t |
| Device descriptor. More... | |
| struct | app_usbd_descriptor_configuration_t |
| Configuration descriptor. More... | |
| struct | app_usbd_descriptor_string0_t |
| Raw descriptor - String descriptor zero. More... | |
| struct | app_usbd_descriptor_string_t |
| Raw descriptor - Any normal string. More... | |
| struct | app_usbd_descriptor_iface_t |
| Interface descriptor. More... | |
| struct | app_usbd_descriptor_ep_t |
| Endpoint descriptor. More... | |
| struct | app_usbd_descriptor_iad_t |
| Interface association descriptor. More... | |
Macros | |
| #define | APP_USBD_U16_TO_RAW_DSC(val) |
| Helper macro for translating unsigned 24 bit value to 2 byte raw descriptor. More... | |
| #define | APP_USBD_U24_TO_RAW_DSC(val) |
| Helper macro for translating unsigned 24 bit value to 3 byte raw descriptor. More... | |
| #define | APP_USBD_U32_TO_RAW_DSC(val) |
| Helper macro for translating unsigned 32 bit value to 4 byte raw descriptor. More... | |
| #define | APP_USBD_DESCRIPTOR_EP_ATTR_TYPE_OFFSET 0 |
| #define | APP_USBD_DESCRIPTOR_EP_ATTR_TYPE_MASK BF_MASK(2, APP_USBD_DESCRIPTOR_EP_ATTR_TYPE_OFFSET) |
| #define | APP_USBD_DESCRIPTOR_EP_ATTR_SYNC_OFFSET 2 |
| #define | APP_USBD_DESCRIPTOR_EP_ATTR_SYNC_MASK BF_MASK(2, APP_USBD_DESCRIPTOR_EP_ATTR_SYNC_OFFSET) |
| #define | APP_USBD_DESCRIPTOR_EP_ATTR_USAGE_OFFSET 4 |
| #define | APP_USBD_DESCRIPTOR_EP_ATTR_USAGE_MASK BF_MASK(2, APP_USBD_DESCRIPTOR_EP_ATTR_USAGE_OFFSET) |
Enumerations | |
| enum | app_usbd_descriptor_t { APP_USBD_DESCRIPTOR_DEVICE = 1, APP_USBD_DESCRIPTOR_CONFIGURATION = 2, APP_USBD_DESCRIPTOR_STRING = 3, APP_USBD_DESCRIPTOR_INTERFACE = 4, APP_USBD_DESCRIPTOR_ENDPOINT = 5, APP_USBD_DESCRIPTOR_DEVICE_QUALIFIER = 6, APP_USBD_DESCRIPTOR_OTHER_SPEED_CONFIGURATION = 7, APP_USBD_DESCRIPTOR_INTERFACE_POWER = 8, APP_USBD_DESCRIPTOR_OTG = 9, APP_USBD_DESCRIPTOR_DEBUG = 10, APP_USBD_DESCRIPTOR_INTERFACE_ASSOCIATION = 11 } |
| Descriptor types. More... | |
| enum | app_usbd_descriptor_configuration_attributes_t { APP_USBD_DESCRIPTOR_CONFIGURATION_ATTRIBUTE_ALWAYS_SET_MASK = 1U << 7, APP_USBD_DESCRIPTOR_CONFIGURATION_ATTRIBUTE_SELF_POWERED_MASK = 1U << 6, APP_USBD_DESCRIPTOR_CONFIGURATION_ATTRIBUTE_REMOTE_WAKEUP_MASK = 1U << 5 } |
| Attributes masks. More... | |
| enum | app_usbd_descriptor_ep_attr_bitmap_t { APP_USBD_DESCRIPTOR_EP_ATTR_TYPE_CONTROL = 0 << 0, APP_USBD_DESCRIPTOR_EP_ATTR_TYPE_ISOCHRONOUS = 1 << 0, APP_USBD_DESCRIPTOR_EP_ATTR_TYPE_BULK = 2 << 0, APP_USBD_DESCRIPTOR_EP_ATTR_TYPE_INTERRUPT = 3 << 0, APP_USBD_DESCRIPTOR_EP_ATTR_SYNC_NONE = 0 << 2, APP_USBD_DESCRIPTOR_EP_ATTR_SYNC_ASYNCHRONOUS = 1 << 2, APP_USBD_DESCRIPTOR_EP_ATTR_SYNC_ADAPTIVE = 2 << 2, APP_USBD_DESCRIPTOR_EP_ATTR_SYNC_SYNCHRONOUS = 3 << 2, APP_USBD_DESCRIPTOR_EP_ATTR_USAGE_DATA = 0 << 4, APP_USBD_DESCRIPTOR_EP_ATTR_USAGE_FEEDBACK = 1 << 4, APP_USBD_DESCRIPTOR_EP_ATTR_USAGE_IMPLICIT = 2 << 4 } |
| Endpoint attributes mnemonics. More... | |
nRF52840 only: Module with types definitions used for standard descriptors.
| #define APP_USBD_DESCRIPTOR_EP_ATTR_SYNC_MASK BF_MASK(2, APP_USBD_DESCRIPTOR_EP_ATTR_SYNC_OFFSET) |
Mask of endpoint synchronization type attribute bits
| #define APP_USBD_DESCRIPTOR_EP_ATTR_SYNC_OFFSET 2 |
Offset of endpoint synchronization type attribute bits
| #define APP_USBD_DESCRIPTOR_EP_ATTR_TYPE_MASK BF_MASK(2, APP_USBD_DESCRIPTOR_EP_ATTR_TYPE_OFFSET) |
Mask of endpoint type attribute bits
| #define APP_USBD_DESCRIPTOR_EP_ATTR_TYPE_OFFSET 0 |
Offset of endpoint type attribute bits
| #define APP_USBD_DESCRIPTOR_EP_ATTR_USAGE_MASK BF_MASK(2, APP_USBD_DESCRIPTOR_EP_ATTR_USAGE_OFFSET) |
Mask of endpoint usage type attribute bits
| #define APP_USBD_DESCRIPTOR_EP_ATTR_USAGE_OFFSET 4 |
Offset of endpoint usage type attribute bits
| #define APP_USBD_U16_TO_RAW_DSC | ( | val | ) |
Helper macro for translating unsigned 24 bit value to 2 byte raw descriptor.
| #define APP_USBD_U24_TO_RAW_DSC | ( | val | ) |
Helper macro for translating unsigned 24 bit value to 3 byte raw descriptor.
| #define APP_USBD_U32_TO_RAW_DSC | ( | val | ) |
Helper macro for translating unsigned 32 bit value to 4 byte raw descriptor.
Attributes masks.
Masks used for attributes in configuration.
Descriptor types.
Descriptor types used in two situations:
According to chapter 9.6 of USB 2.0 specification, following descriptors may be requested directly by GetDescriptor method:
| Enumerator | |
|---|---|
| APP_USBD_DESCRIPTOR_DEVICE |
Device descriptor. |
| APP_USBD_DESCRIPTOR_CONFIGURATION |
Specific configuration descriptor. Configuration descriptor is always followed by all the related interface and endpoints descriptors. |
| APP_USBD_DESCRIPTOR_STRING |
String descriptor. |
| APP_USBD_DESCRIPTOR_INTERFACE |
Interface descriptor followed by all the related endpoints descriptors.
|
| APP_USBD_DESCRIPTOR_ENDPOINT |
Endpoint descriptor.
|
| APP_USBD_DESCRIPTOR_DEVICE_QUALIFIER |
|
| APP_USBD_DESCRIPTOR_OTHER_SPEED_CONFIGURATION |
|
| APP_USBD_DESCRIPTOR_INTERFACE_POWER |
|
| APP_USBD_DESCRIPTOR_OTG |
|
| APP_USBD_DESCRIPTOR_DEBUG |
Debug channel descriptor if available, can be only reached by GetDescriptor |
| APP_USBD_DESCRIPTOR_INTERFACE_ASSOCIATION |
Descriptor used to describe that two or more interfaces are associated to the same function.
|