StdRequestType.h File Reference


Defines

#define CONTROL_REQTYPE_DIRECTION   0b10000000
#define CONTROL_REQTYPE_TYPE   0b01100000
#define CONTROL_REQTYPE_RECIPIENT   0b00011111
#define REQDIR_HOSTTODEVICE   (0 << 7)
#define REQDIR_DEVICETOHOST   (1 << 7)
#define REQTYPE_STANDARD   (0 << 5)
#define REQTYPE_CLASS   (1 << 5)
#define REQTYPE_VENDOR   (2 << 5)
#define REQREC_DEVICE   (0 << 0)
#define REQREC_INTERFACE   (1 << 0)
#define REQREC_ENDPOINT   (2 << 0)
#define REQREC_OTHER   (3 << 0)

Enumerations

enum  Control_Request_t {
  REQ_GetStatus = 0,
  REQ_ClearFeature = 1,
  REQ_SetFeature = 3,
  REQ_SetAddress = 5,
  REQ_GetDescriptor = 6,
  REQ_SetDescriptor = 7,
  REQ_GetConfiguration = 8,
  REQ_SetConfiguration = 9,
  REQ_GetInterface = 10,
  REQ_SetInterface = 11,
  REQ_SynchFrame = 12
}

Detailed Description

Contains definitions for the various control request parameters, so that the request details (such as data direction, request recipient, etc.) can be extracted via masking.

Define Documentation

#define CONTROL_REQTYPE_DIRECTION   0b10000000

Mask for the request type parameter, to indicate the direction of the request data (Host to Device or Device to Host). The result of this mask should then be compared to the request direction masks.

See also:
REQDIR_* macros for masks indicating the request data direction.

#define CONTROL_REQTYPE_RECIPIENT   0b00011111

Mask for the request type parameter, to indicate the recipient of the request (Standard, Class or Vendor Specific). The result of this mask should then be compared to the request recipient masks.

See also:
REQREC_* macros for masks indicating the request recipient.

#define CONTROL_REQTYPE_TYPE   0b01100000

Mask for the request type parameter, to indicate the type of request (Device, Class or Vendor Specific). The result of this mask should then be compared to the request type masks.

See also:
REQTYPE_* macros for masks indicating the request type.

#define REQDIR_DEVICETOHOST   (1 << 7)

Request data direction mask, indicating that the request data will flow from device to host.

See also:
CONTROL_REQTYPE_DIRECTION macro.

#define REQDIR_HOSTTODEVICE   (0 << 7)

Request data direction mask, indicating that the request data will flow from host to device.

See also:
CONTROL_REQTYPE_DIRECTION macro.

#define REQREC_DEVICE   (0 << 0)

Request recipient mask, indicating that the request is to be issued to the device as a whole.

See also:
CONTROL_REQTYPE_RECIPIENT macro.

#define REQREC_ENDPOINT   (2 << 0)

Request recipient mask, indicating that the request is to be issued to an endpoint in the currently selected configuration.

See also:
CONTROL_REQTYPE_RECIPIENT macro.

#define REQREC_INTERFACE   (1 << 0)

Request recipient mask, indicating that the request is to be issued to an interface in the currently selected configuration.

See also:
CONTROL_REQTYPE_RECIPIENT macro.

#define REQREC_OTHER   (3 << 0)

Request recipient mask, indicating that the request is to be issued to an unspecified element in the currently selected configuration.

See also:
CONTROL_REQTYPE_RECIPIENT macro.

#define REQTYPE_CLASS   (1 << 5)

Request type mask, indicating that the request is a class-specific request.

See also:
CONTROL_REQTYPE_TYPE macro.

#define REQTYPE_STANDARD   (0 << 5)

Request type mask, indicating that the request is a standard request.

See also:
CONTROL_REQTYPE_TYPE macro.

#define REQTYPE_VENDOR   (2 << 5)

Request type mask, indicating that the request is a vendor specific request.

See also:
CONTROL_REQTYPE_TYPE macro.


Enumeration Type Documentation

Enumeration for the various standard request commands. These commands are applicable when the request type is REQTYPE_STANDARD (with the exception of REQ_GetDescriptor, which is always handled regardless of the request type value).

See also:
Chapter 9 of the USB 2.0 Specification.
Enumerator:
REQ_GetStatus  Implemented in the library for device, endpoint and interface recipients. Passed to the user application for other recipients via the USB_UnhandledControlPacket() event when received in device mode.
REQ_ClearFeature  Implemented in the library for device, endpoint and interface recipients. Passed to the user application for other recipients via the USB_UnhandledControlPacket() event when received in device mode.
REQ_SetFeature  Implemented in the library for device, endpoint and interface recipients. Passed to the user application for other recipients via the USB_UnhandledControlPacket() event when received in device mode.
REQ_SetAddress  Implemented in the library for the device recipient. Passed to the user application for other recipients via the USB_UnhandledControlPacket() event when received in device mode.
REQ_GetDescriptor  Implemented in the library for all recipients and all request types.
REQ_SetDescriptor  Not implemented in the library, passed to the user application via the USB_UnhandledControlPacket() event when received in device mode.
REQ_GetConfiguration  Implemented in the library for the device recipient. Passed to the user application for other recipients via the USB_UnhandledControlPacket() event when received in device mode.
REQ_SetConfiguration  Implemented in the library for the device recipient. Passed to the user application for other recipients via the USB_UnhandledControlPacket() event when received in device mode.
REQ_GetInterface  Not implemented in the library, passed to the user application via the USB_UnhandledControlPacket() event when received in device mode.
REQ_SetInterface  Not implemented in the library, passed to the user application via the USB_UnhandledControlPacket() event when received in device mode.
REQ_SynchFrame  Not implemented in the library, passed to the user application via the USB_UnhandledControlPacket() event when received in device mode.


Generated on Thu Jul 31 09:24:16 2008 for MyUSB Library by  doxygen 1.5.5