|
Modules | |
| Communication Device Class Definitions | |
Classes | |
| struct | usb_association_desc_t |
| Standard USB Interface Association Descriptor structure. More... | |
| struct | usb_conf_desc_t |
| Standard USB configuration descriptor structure. More... | |
| struct | usb_dev_bos_desc_t |
| USB Device BOS descriptor structure. More... | |
| struct | usb_dev_capa_ext_desc_t |
| USB Device Capabilities - USB 2.0 Extension Descriptor structure. More... | |
| struct | usb_dev_desc_t |
| Standard USB device descriptor structure. More... | |
| struct | usb_dev_lpm_desc_t |
| USB Device LPM Descriptor structure. More... | |
| struct | usb_dev_qual_desc_t |
| Standard USB device qualifier descriptor structure. More... | |
| struct | usb_ep_desc_t |
| Standard USB endpoint descriptor structure. More... | |
| struct | usb_iad_desc_t |
| Standard USB association descriptor structure. More... | |
| struct | usb_iface_desc_t |
| Standard USB interface descriptor structure. More... | |
| struct | usb_setup_req_t |
| A USB Device SETUP request. More... | |
| struct | usb_str_desc_t |
| A standard USB string descriptor structure. More... | |
| struct | usb_str_lgid_desc_t |
Macros | |
| #define | HIRD_1025_US 13 |
| #define | HIRD_1100_US 14 |
| #define | HIRD_1175_US 15 |
| #define | HIRD_125_US 1 |
| #define | HIRD_200_US 2 |
| #define | HIRD_275_US 3 |
| #define | HIRD_350_US 4 |
| #define | HIRD_425_US 5 |
| #define | HIRD_500_US 6 |
| #define | HIRD_50_US 0 |
| #define | HIRD_575_US 7 |
| #define | HIRD_650_US 8 |
| #define | HIRD_725_US 9 |
| #define | HIRD_800_US 10 |
| #define | HIRD_875_US 11 |
| #define | HIRD_950_US 12 |
| #define | USB_CONFIG_ATTR_BUS_POWERED (0 << 6) |
| Bus-powered. More... | |
| #define | USB_CONFIG_ATTR_MUST_SET (1 << 7) |
| Must always be set. More... | |
| #define | USB_CONFIG_ATTR_REMOTE_WAKEUP (1 << 5) |
| remote wakeup supported More... | |
| #define | USB_CONFIG_ATTR_SELF_POWERED (1 << 6) |
| Self-powered. More... | |
| #define | USB_CONFIG_MAX_POWER(ma) (((ma) + 1) / 2) |
| Max power in mA. More... | |
| #define | USB_EP_ADDR_MASK 0x0f |
| Mask selecting the index part of an endpoint address. More... | |
| #define | USB_EP_DIR_IN 0x80 |
| Endpoint transfer direction is IN. More... | |
| #define | USB_EP_DIR_OUT 0x00 |
| Endpoint transfer direction is OUT. More... | |
| #define | USB_LPM_ATTRIBUT_BLINKSTATE(value) ((value & 0xF) << 0) |
| #define | USB_LPM_ATTRIBUT_BLINKSTATE_L1 USB_LPM_ATTRIBUT_BLINKSTATE(1) |
| #define | USB_LPM_ATTRIBUT_BLINKSTATE_MASK (0xF << 0) |
| #define | USB_LPM_ATTRIBUT_FIRD(value) ((value & 0xF) << 4) |
| #define | USB_LPM_ATTRIBUT_FIRD_MASK (0xF << 4) |
| #define | USB_LPM_ATTRIBUT_REMOTEWAKE(value) ((value & 1) << 8) |
| #define | USB_LPM_ATTRIBUT_REMOTEWAKE_MASK (1 << 8) |
| #define | USB_MAX_DESC_LEN 255 |
| Maximum length in bytes of a USB descriptor. More... | |
| #define | USB_REQ_DIR_IN (1<<7) |
| Device to host. More... | |
| #define | USB_REQ_DIR_MASK (1<<7) |
| Mask. More... | |
| #define | USB_REQ_DIR_OUT (0<<7) |
| USB request data transfer direction (bmRequestType) More... | |
| #define | USB_REQ_RECIP_DEVICE (0<<0) |
| USB recipient codes (bmRequestType) More... | |
| #define | USB_REQ_RECIP_ENDPOINT (2<<0) |
| Recipient endpoint. More... | |
| #define | USB_REQ_RECIP_INTERFACE (1<<0) |
| Recipient interface. More... | |
| #define | USB_REQ_RECIP_MASK (0x1F) |
| Mask. More... | |
| #define | USB_REQ_RECIP_OTHER (3<<0) |
| Recipient other. More... | |
| #define | USB_REQ_TYPE_CLASS (1<<5) |
| Class-specific request. More... | |
| #define | USB_REQ_TYPE_MASK (3<<5) |
| Mask. More... | |
| #define | USB_REQ_TYPE_STANDARD (0<<5) |
| USB request types (bmRequestType) More... | |
| #define | USB_REQ_TYPE_VENDOR (2<<5) |
| Vendor-specific request. More... | |
| #define | USB_V2_0 0x0200 |
| Value for field bcdUSB. More... | |
| #define | USB_V2_1 0x0201 |
| USB Specification version 2.01. More... | |
Typedefs | |
| typedef uint8_t | usb_add_t |
| USB address identifier. More... | |
| typedef uint8_t | usb_ep_t |
| Endpoint identifier. More... | |
Generic definitions (Class, subclass and protocol) | |
| #define | NO_CLASS 0x00 |
| #define | CLASS_VENDOR_SPECIFIC 0xFF |
| #define | NO_SUBCLASS 0x00 |
| #define | NO_PROTOCOL 0x00 |
IAD (Interface Association Descriptor) constants | |
| #define | CLASS_IAD 0xEF |
| #define | SUB_CLASS_IAD 0x02 |
| #define | PROTOCOL_IAD 0x01 |
This module defines constants and data structures provided by the USB 2.0 specification.
| #define CLASS_IAD 0xEF |
Definition at line 70 of file usb_protocol.h.
| #define CLASS_VENDOR_SPECIFIC 0xFF |
Definition at line 63 of file usb_protocol.h.
| #define HIRD_1025_US 13 |
Definition at line 232 of file usb_protocol.h.
| #define HIRD_1100_US 14 |
Definition at line 233 of file usb_protocol.h.
| #define HIRD_1175_US 15 |
Definition at line 234 of file usb_protocol.h.
| #define HIRD_125_US 1 |
Definition at line 220 of file usb_protocol.h.
| #define HIRD_200_US 2 |
Definition at line 221 of file usb_protocol.h.
| #define HIRD_275_US 3 |
Definition at line 222 of file usb_protocol.h.
| #define HIRD_350_US 4 |
Definition at line 223 of file usb_protocol.h.
| #define HIRD_425_US 5 |
Definition at line 224 of file usb_protocol.h.
| #define HIRD_500_US 6 |
Definition at line 225 of file usb_protocol.h.
| #define HIRD_50_US 0 |
Definition at line 219 of file usb_protocol.h.
| #define HIRD_575_US 7 |
Definition at line 226 of file usb_protocol.h.
| #define HIRD_650_US 8 |
Definition at line 227 of file usb_protocol.h.
| #define HIRD_725_US 9 |
Definition at line 228 of file usb_protocol.h.
| #define HIRD_800_US 10 |
Definition at line 229 of file usb_protocol.h.
| #define HIRD_875_US 11 |
Definition at line 230 of file usb_protocol.h.
| #define HIRD_950_US 12 |
Definition at line 231 of file usb_protocol.h.
| #define NO_CLASS 0x00 |
Definition at line 62 of file usb_protocol.h.
| #define NO_PROTOCOL 0x00 |
Definition at line 65 of file usb_protocol.h.
| #define NO_SUBCLASS 0x00 |
Definition at line 64 of file usb_protocol.h.
| #define PROTOCOL_IAD 0x01 |
Definition at line 72 of file usb_protocol.h.
| #define SUB_CLASS_IAD 0x02 |
Definition at line 71 of file usb_protocol.h.
| #define USB_CONFIG_ATTR_BUS_POWERED (0 << 6) |
Bus-powered.
Definition at line 423 of file usb_protocol.h.
| #define USB_CONFIG_ATTR_MUST_SET (1 << 7) |
Must always be set.
Definition at line 422 of file usb_protocol.h.
| #define USB_CONFIG_ATTR_REMOTE_WAKEUP (1 << 5) |
remote wakeup supported
Definition at line 425 of file usb_protocol.h.
| #define USB_CONFIG_ATTR_SELF_POWERED (1 << 6) |
Self-powered.
Definition at line 424 of file usb_protocol.h.
| #define USB_CONFIG_MAX_POWER | ( | ma | ) | (((ma) + 1) / 2) |
Max power in mA.
Definition at line 427 of file usb_protocol.h.
| #define USB_EP_ADDR_MASK 0x0f |
Mask selecting the index part of an endpoint address.
Definition at line 266 of file usb_protocol.h.
| #define USB_EP_DIR_IN 0x80 |
Endpoint transfer direction is IN.
Definition at line 274 of file usb_protocol.h.
| #define USB_EP_DIR_OUT 0x00 |
Endpoint transfer direction is OUT.
Definition at line 279 of file usb_protocol.h.
| #define USB_LPM_ATTRIBUT_BLINKSTATE | ( | value | ) | ((value & 0xF) << 0) |
Definition at line 240 of file usb_protocol.h.
| #define USB_LPM_ATTRIBUT_BLINKSTATE_L1 USB_LPM_ATTRIBUT_BLINKSTATE(1) |
Definition at line 243 of file usb_protocol.h.
| #define USB_LPM_ATTRIBUT_BLINKSTATE_MASK (0xF << 0) |
Fields definition from a LPM TOKEN
Definition at line 237 of file usb_protocol.h.
| #define USB_LPM_ATTRIBUT_FIRD | ( | value | ) | ((value & 0xF) << 4) |
Definition at line 241 of file usb_protocol.h.
| #define USB_LPM_ATTRIBUT_FIRD_MASK (0xF << 4) |
Definition at line 238 of file usb_protocol.h.
| #define USB_LPM_ATTRIBUT_REMOTEWAKE | ( | value | ) | ((value & 1) << 8) |
Definition at line 242 of file usb_protocol.h.
| #define USB_LPM_ATTRIBUT_REMOTEWAKE_MASK (1 << 8) |
Definition at line 239 of file usb_protocol.h.
| #define USB_MAX_DESC_LEN 255 |
Maximum length in bytes of a USB descriptor.
The maximum length of a USB descriptor is limited by the 8-bit bLength field.
Definition at line 290 of file usb_protocol.h.
| #define USB_REQ_DIR_IN (1<<7) |
Device to host.
Definition at line 79 of file usb_protocol.h.
| #define USB_REQ_DIR_MASK (1<<7) |
Mask.
Definition at line 80 of file usb_protocol.h.
| #define USB_REQ_DIR_OUT (0<<7) |
USB request data transfer direction (bmRequestType)
Host to device
Definition at line 78 of file usb_protocol.h.
| #define USB_REQ_RECIP_DEVICE (0<<0) |
| #define USB_REQ_RECIP_ENDPOINT (2<<0) |
Recipient endpoint.
Definition at line 95 of file usb_protocol.h.
| #define USB_REQ_RECIP_INTERFACE (1<<0) |
Recipient interface.
Definition at line 94 of file usb_protocol.h.
| #define USB_REQ_RECIP_MASK (0x1F) |
Mask.
Definition at line 97 of file usb_protocol.h.
| #define USB_REQ_RECIP_OTHER (3<<0) |
Recipient other.
Definition at line 96 of file usb_protocol.h.
| #define USB_REQ_TYPE_CLASS (1<<5) |
Class-specific request.
Definition at line 86 of file usb_protocol.h.
| #define USB_REQ_TYPE_MASK (3<<5) |
Mask.
Definition at line 88 of file usb_protocol.h.
| #define USB_REQ_TYPE_STANDARD (0<<5) |
| #define USB_REQ_TYPE_VENDOR (2<<5) |
Vendor-specific request.
Definition at line 87 of file usb_protocol.h.
| #define USB_V2_0 0x0200 |
Value for field bcdUSB.
USB Specification version 2.00
Definition at line 56 of file usb_protocol.h.
| #define USB_V2_1 0x0201 |
USB Specification version 2.01.
Definition at line 57 of file usb_protocol.h.
| typedef uint8_t usb_add_t |
USB address identifier.
Definition at line 269 of file usb_protocol.h.
| typedef uint8_t usb_ep_t |
Endpoint identifier.
Definition at line 282 of file usb_protocol.h.
USB Device Capability - USB 2.0 Extension To fill bmAttributes field of usb_capa_ext_desc_t structure.
| Enumerator | |
|---|---|
| USB_DC_EXT_LPM | |
| USB_DC_EXT_LPM | |
| USB_DC_EXT_BESL | |
| USB_DC_EXT_BESL_BASELINE_VALID | |
| USB_DC_EXT_BESL_DEEP_VALID | |
Definition at line 215 of file usb_protocol.h.
| enum usb_capability_type |
USB Device Capability types.
| Enumerator | |
|---|---|
| USB_DC_USB20_EXTENSION | |
| USB_DC_USB20_EXTENSION | |
Definition at line 207 of file usb_protocol.h.
| enum usb_descriptor_type |
Standard USB descriptor types.
Definition at line 189 of file usb_protocol.h.
| enum usb_device_feature |
Standard USB device feature flags.
Definition at line 147 of file usb_protocol.h.
Test Mode possible on HS USB device.
| Enumerator | |
|---|---|
| USB_DEV_TEST_MODE_J | |
| USB_DEV_TEST_MODE_K | |
| USB_DEV_TEST_MODE_SE0_NAK | |
| USB_DEV_TEST_MODE_PACKET | |
| USB_DEV_TEST_MODE_FORCE_ENABLE | |
Definition at line 160 of file usb_protocol.h.
| enum usb_device_status |
Standard USB device status flags.
| Enumerator | |
|---|---|
| USB_DEV_STATUS_BUS_POWERED | |
| USB_DEV_STATUS_SELF_POWERED | |
| USB_DEV_STATUS_REMOTEWAKEUP | |
Definition at line 120 of file usb_protocol.h.
| enum usb_endpoint_feature |
Standard USB endpoint feature/status flags.
| Enumerator | |
|---|---|
| USB_EP_FEATURE_HALT | |
| USB_EP_FEATURE_HALT | |
Definition at line 171 of file usb_protocol.h.
| enum usb_endpoint_status |
Standard USB endpoint status flags.
| Enumerator | |
|---|---|
| USB_EP_STATUS_HALTED | |
| USB_EP_STATUS_HALTED | |
Definition at line 138 of file usb_protocol.h.
| enum usb_ep_type |
Standard USB endpoint transfer types.
| Enumerator | |
|---|---|
| USB_EP_TYPE_CONTROL | |
| USB_EP_TYPE_ISOCHRONOUS | |
| USB_EP_TYPE_BULK | |
| USB_EP_TYPE_INTERRUPT | |
| USB_EP_TYPE_MASK | |
Definition at line 248 of file usb_protocol.h.
| enum usb_interface_status |
Standard USB Interface status flags.
| Enumerator | |
|---|---|
| USB_IFACE_STATUS_RESERVED | |
| USB_IFACE_STATUS_RESERVED | |
Definition at line 130 of file usb_protocol.h.
| enum usb_langid |
Standard USB language IDs for string descriptors.
| Enumerator | |
|---|---|
| USB_LANGID_EN_US | English (United States) |
Definition at line 259 of file usb_protocol.h.
| enum usb_reqid |
Standard USB requests (bRequest)
Definition at line 102 of file usb_protocol.h.
Standard USB Test Mode Selectors.
| Enumerator | |
|---|---|
| USB_TEST_J | |
| USB_TEST_K | |
| USB_TEST_SE0_NAK | |
| USB_TEST_PACKET | |
| USB_TEST_FORCE_ENABLE | |
Definition at line 178 of file usb_protocol.h.