Data Structures | |
struct | PACKED |
USB_CDC_GET/SET_LINE_CODING request-specific data. More... | |
#define USB_RTYPE_DIR_IN 0x80 |
Referenced by USBHCDStringDescriptorGet(), and USBHHIDGetReportDescriptor().
#define USB_RTYPE_DIR_OUT 0x00 |
#define USB_RTYPE_TYPE_M 0x60 |
#define USB_RTYPE_VENDOR 0x40 |
#define USB_RTYPE_CLASS 0x20 |
Referenced by USBHHIDSetIdle(), USBHHIDSetProtocol(), USBHHIDSetReport(), and USBHostAudioVolumeSet().
#define USB_RTYPE_STANDARD 0x00 |
#define USB_RTYPE_RECIPIENT_M 0x1f |
#define USB_RTYPE_OTHER 0x03 |
#define USB_RTYPE_ENDPOINT 0x02 |
#define USB_RTYPE_INTERFACE 0x01 |
#define USB_RTYPE_DEVICE 0x00 |
Referenced by USBHCDSetAddress(), USBHCDSetConfig(), and USBHCDStringDescriptorGet().
#define USBREQ_GET_STATUS 0x00 |
#define USBREQ_CLEAR_FEATURE 0x01 |
#define USBREQ_SET_FEATURE 0x03 |
#define USBREQ_SET_ADDRESS 0x05 |
Referenced by USBHCDSetAddress().
#define USBREQ_GET_DESCRIPTOR 0x06 |
Referenced by USBHCDStringDescriptorGet(), and USBHHIDGetReportDescriptor().
#define USBREQ_SET_DESCRIPTOR 0x07 |
#define USBREQ_GET_CONFIG 0x08 |
#define USBREQ_SET_CONFIG 0x09 |
Referenced by USBHCDSetConfig().
#define USBREQ_GET_INTERFACE 0x0a |
#define USBREQ_SET_INTERFACE 0x0b |
Referenced by USBHCDSetInterface().
#define USBREQ_SYNC_FRAME 0x0c |
#define USB_STATUS_SELF_PWR 0x0001 |
Referenced by USBDCDPowerStatusSet().
#define USB_STATUS_BUS_PWR 0x0000 |
Referenced by USBDCDPowerStatusSet().
#define USB_STATUS_PWR_M 0x0001 |
Referenced by USBDCDPowerStatusSet().
#define USB_STATUS_REMOTE_WAKE 0x0002 |
Referenced by USBDCDRemoteWakeupRequest(), and USBDeviceEnumResetHandler().
#define USB_FEATURE_EP_HALT 0x0000 |
#define USB_FEATURE_REMOTE_WAKE 0x0001 |
#define USB_FEATURE_TEST_MODE 0x0002 |
#define USB_REQ_EP_NUM_M 0x007F |
#define USB_REQ_EP_DIR_M 0x0080 |
#define USB_REQ_EP_DIR_IN 0x0080 |
#define USB_REQ_EP_DIR_OUT 0x0000 |
#define USB_DTYPE_DEVICE 1 |
#define USB_DTYPE_CONFIGURATION 2 |
#define USB_DTYPE_STRING 3 |
Referenced by USBHCDStringDescriptorGet().
#define USB_DTYPE_INTERFACE 4 |
#define USB_DTYPE_ENDPOINT 5 |
Referenced by USBDCDConfigGetInterfaceEndpoint(), USBDescGetInterfaceEndpoint(), and USBDeviceConfig().
#define USB_DTYPE_DEVICE_QUAL 6 |
#define USB_DTYPE_OSPEED_CONF 7 |
#define USB_DTYPE_INTERFACE_PWR 8 |
#define USB_DTYPE_OTG 9 |
#define USB_DTYPE_INTERFACE_ASC 11 |
#define USB_DTYPE_CS_INTERFACE 36 |
#define USB_DTYPE_HUB 41 |
#define USB_CLASS_DEVICE 0x00 |
#define USB_CLASS_AUDIO 0x01 |
#define USB_CLASS_CDC 0x02 |
#define USB_CLASS_HID 0x03 |
#define USB_CLASS_PHYSICAL 0x05 |
#define USB_CLASS_IMAGE 0x06 |
#define USB_CLASS_PRINTER 0x07 |
#define USB_CLASS_MASS_STORAGE 0x08 |
#define USB_CLASS_HUB 0x09 |
#define USB_CLASS_CDC_DATA 0x0a |
#define USB_CLASS_SMART_CARD 0x0b |
#define USB_CLASS_SECURITY 0x0d |
#define USB_CLASS_VIDEO 0x0e |
#define USB_CLASS_HEALTHCARE 0x0f |
#define USB_CLASS_DIAG_DEVICE 0xdc |
#define USB_CLASS_WIRELESS 0xe0 |
#define USB_CLASS_MISC 0xef |
#define USB_CLASS_APP_SPECIFIC 0xfe |
#define USB_CLASS_VEND_SPECIFIC 0xff |
#define USB_CLASS_EVENTS 0xffffffff |
#define USB_SUBCLASS_UNDEFINED 0x00 |
#define USB_PROTOCOL_UNDEFINED 0x00 |
#define USB_MISC_SUBCLASS_SYNC 0x01 |
#define USB_MISC_SUBCLASS_COMMON 0x02 |
#define USB_MISC_PROTOCOL_IAD 0x01 |
#define USB_HUB_PROTOCOL_FS 0x00 |
#define USB_HUB_PROTOCOL_SINGLE 0x01 |
#define USB_HUB_PROTOCOL_MULTI 0x02 |
#define USB_CONF_ATTR_PWR_M 0xC0 |
#define USB_CONF_ATTR_SELF_PWR 0xC0 |
#define USB_CONF_ATTR_BUS_PWR 0x80 |
#define USB_CONF_ATTR_RWAKE 0xA0 |
#define USB_EP_DESC_OUT 0x00 |
#define USB_EP_DESC_IN 0x80 |
Referenced by USBDeviceConfig().
#define USB_EP_DESC_NUM_M 0x0f |
Referenced by USBDeviceConfig().
#define USB_EP_MAX_PACKET_COUNT_M 0x07FF |
#define USB_EP_ATTR_CONTROL 0x00 |
#define USB_EP_ATTR_ISOC 0x01 |
#define USB_EP_ATTR_BULK 0x02 |
#define USB_EP_ATTR_INT 0x03 |
#define USB_EP_ATTR_TYPE_M 0x03 |
#define USB_EP_ATTR_ISOC_M 0x0c |
#define USB_EP_ATTR_ISOC_NOSYNC 0x00 |
#define USB_EP_ATTR_ISOC_ASYNC 0x04 |
#define USB_EP_ATTR_ISOC_ADAPT 0x08 |
#define USB_EP_ATTR_ISOC_SYNC 0x0c |
#define USB_EP_ATTR_USAGE_M 0x30 |
#define USB_EP_ATTR_USAGE_DATA 0x00 |
#define USB_EP_ATTR_USAGE_FEEDBACK 0x10 |
#define USB_EP_ATTR_USAGE_IMPFEEDBACK 0x20 |
#define USBShort | ( | ui16Value | ) | (ui16Value & 0xff), (ui16Value >> 8) |
Write a 16-bit value to a USB descriptor block.
ui16Value | is the 16-bit value to write to the descriptor. |
This helper macro is used in descriptor definitions to write two-byte values. Since the configuration descriptor contains all interface and endpoint descriptors in a contiguous block of memory, these descriptors are typically defined using an array of bytes rather than as packed structures.
#define USB3Byte | ( | ui32Value | ) |
Write a 24-bit value to a USB descriptor block.
ui32Value | is the 24-bit value that to write to the descriptor. |
This helper macro is used in descriptor definitions to write three-byte values. Since the configuration descriptor contains all interface and endpoint descriptors in a contiguous block of memory, these descriptors are typically defined using an array of bytes rather than as packed structures.
#define USBLong | ( | ui32Value | ) |
Write a 32-bit value to a USB descriptor block.
ui32Value | is the 32-bit value that to write to the descriptor. |
This helper macro is used in descriptor definitions to write four-byte values. Since the configuration descriptor contains all interface and endpoint descriptors in a contiguous block of memory, these descriptors are typically defined using an array of bytes rather than as packed structures.
#define NEXT_USB_DESCRIPTOR | ( | ptr | ) |
Traverse to the next USB descriptor in a block.
ptr | points to the first byte of a descriptor in a block of USB descriptors. |
This macro aids in traversing lists of descriptors by returning a pointer to the next descriptor in the list given a pointer to the current one.
Referenced by USBDescGet(), USBDescGetNum(), and USBDescGetNumAlternateInterfaces().