Public Types | Public Attributes

mxusb::Setup Struct Reference

#include <ep0.h>

List of all members.

Public Types

enum  bmRequest {
  DIR_MASK = 0x80, DIR_IN = 0x80, TYPE_MASK = 3<<5, TYPE_STANDARD = 0<<5,
  TYPE_CLASS = 1<<5, TYPE_VENDOR = 2<<5, RECIPIENT_MASK = 0x1f, RECIPIENT_DEVICE = 0,
  RECIPIENT_INTERFACE = 1, RECIPIENT_ENDPOINT = 2, RECIPIENT_OTHER = 3
}
enum  RequestCodes {
  GET_STATUS = 0, CLEAR_FEATURE = 1, SET_FEATURE = 3, SET_ADDRESS = 5,
  GET_DESCRIPTOR = 6, SET_DESCRIPTOR = 7, GET_CONFIGURATION = 8, SET_CONFIGURATION = 9,
  GET_INTERFACE = 10, SET_INTERFACE = 11, SYNCH_FRAME = 12
}
enum  FeatureSelector { DEVICE_REMOTE_WAKEUP = 1, ENDPOINT_HALT = 0, TEST_MODE = 2 }

Public Attributes

unsigned char bmRequestType
 Request type, direction and recipient.
unsigned char bRequest
 Request code.
unsigned short wValue
 A two byte parameter.
unsigned short wIndex
 A two byte parameter.
unsigned short wLength
 Length of data stage.

Detailed Description

Format of a setup packet


Member Enumeration Documentation

Flags for the bmRequestType field

Enumerator:
DIR_MASK 

Used to mask only the direction field.

DIR_IN 

Device to host.

TYPE_MASK 

Used to mask only the type field.

TYPE_STANDARD 

Standard request type.

TYPE_CLASS 

Class request type.

TYPE_VENDOR 

Vendor request type.

RECIPIENT_MASK 

Used to mask only the recipient field.

RECIPIENT_DEVICE 

Recipient is device.

RECIPIENT_INTERFACE 

Recipient is interface.

RECIPIENT_ENDPOINT 

Recipient is endpoint.

RECIPIENT_OTHER 

Recipient is other.

Passed as wValue when bRequest==SET/CLEAR_FEATURE

Enumerator:
DEVICE_REMOTE_WAKEUP 

Targeted to whole device.

ENDPOINT_HALT 

Targeted to single endpoints.

TEST_MODE 

Targeted to whole device.

Possible values for the bRequestType field

Enumerator:
GET_STATUS 

GET_STATUS.

CLEAR_FEATURE 

CLEAR_FEATURE.

SET_FEATURE 

SET_FEATURE.

SET_ADDRESS 

SET_ADDRESS.

GET_DESCRIPTOR 

GET_DESCRIPTOR.

SET_DESCRIPTOR 

SET_DESCRIPTOR.

GET_CONFIGURATION 

GET_CONFIGURATION.

SET_CONFIGURATION 

SET_CONFIGURATION.

GET_INTERFACE 

GET_INTERFACE.

SET_INTERFACE 

SET_INTERFACE.

SYNCH_FRAME 

SYNCH_FRAME.


The documentation for this struct was generated from the following file: