Data Structures | Enumerations

USB Chapter 9 Enumerations and Descriptors
[Public API]

Packet structs from Chapter 9 of the USB spec which deals with device enumeration. More...

Data Structures

struct  setup_packet
 The SETUP packet, as defined by the USB specification. More...
struct  device_descriptor
 Device Descriptor. More...
struct  configuration_descriptor
 Configuration Descriptor. More...
struct  interface_descriptor
 Interface Descriptor. More...
struct  endpoint_descriptor
 Endpoint Descriptor. More...
struct  string_descriptor
 String Descriptor. More...
struct  interface_association_descriptor
 Interface Association Descriptor. More...

Enumerations

enum  PID {
  PID_OUT = 0x01, PID_IN = 0x09, PID_SOF = 0x05, PID_SETUP = 0x0D,
  PID_DATA0 = 0x03, PID_DATA1 = 0x0B, PID_DATA2 = 0x07, PID_MDATA = 0x0F,
  PID_ACK = 0x02, PID_NAK = 0x0A, PID_STALL = 0x0E, PID_NYET = 0x06,
  PID_PRE = 0x0C, PID_ERR = 0x0C, PID_SPLIT = 0x08, PID_PING = 0x04,
  PID_RESERVED = 0x00
}
 

USB PIDs.


enum  DestinationType { DEST_DEVICE = 0, DEST_INTERFACE = 1, DEST_ENDPOINT = 2, DEST_OTHER_ELEMENT = 3 }
 

Destination type.

More...
enum  RequestType { REQUEST_TYPE_STANDARD = 0, REQUEST_TYPE_CLASS = 1, REQUEST_TYPE_VENDOR = 2, REQUEST_TYPE_RESERVED = 3 }
 

Request type.

More...
enum  StandardControlRequest {
  GET_STATUS = 0x0, CLEAR_FEATURE = 0x1, SET_FEATURE = 0x3, SET_ADDRESS = 0x5,
  GET_DESCRIPTOR = 0x6, SET_DESCRIPTOR = 0x7, GET_CONFIGURATION = 0x8, SET_CONFIGURATION = 0x9,
  GET_INTERFACE = 0xA, SET_INTERFACE = 0xB, SYNCH_FRAME = 0xC
}
 

Control Request.

More...
enum  DescriptorTypes {
  DESC_DEVICE = 0x1, DESC_CONFIGURATION = 0x2, DESC_STRING = 0x3, DESC_INTERFACE = 0x4,
  DESC_ENDPOINT = 0x5, DESC_DEVICE_QUALIFIER = 0x6, DESC_OTHER_SPEED_CONFIGURATION = 0x7, DESC_INTERFACE_POWER = 0x8,
  DESC_OTG = 0x9, DESC_DEBUG = 0xA, DESC_INTERFACE_ASSOCIATION = 0xB
}
 

Standard Descriptor Types.


enum  DeviceClassCodes { DEVICE_CLASS_DEFINED_AT_INTERFACE_LEVEL = 0x0, DEVICE_CLASS_MISC = 0xef, DEVICE_CLASS_APPLICATION_SPECIFIC = 0xfe, DEVICE_CLASS_VENDOR_SPECIFIC = 0xff }
 

Device Classes.

More...
enum  EndpointAttributes { EP_CONTROL = 0x0, EP_ISOCHRONOUS = 0x1, EP_BULK = 0x2, EP_INTERRUPT = 0x3 }
 

Endpoint Attributes.



Detailed Description

Packet structs from Chapter 9 of the USB spec which deals with device enumeration.

For more information about these structures, see Chapter 9 of the USB specification, available from http://www.usb.org .


Enumeration Type Documentation

Destination type.

This is present in the SETUP packet's bmRequestType field as Direction.

Device Classes.

Some Device class constants which don't correspond to actual classes.

Device class codes which correspond to actual device classes are defined in that device class's header file (for M-Stack supported device classes).

Request type.

These are present in the SETUP packet's bmRequestType field as Type.

Control Request.

These are requests sent in the SETUP packet's bRequest field.

 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator