LUFA Library  120219
StdRequestType.h File Reference

USB control endpoint request definitions. More...

#include "../../../Common/Common.h"
#include "USBMode.h"

Data Structures

struct  USB_Request_Header_t
 Standard USB Control Request. More...

Defines

#define CONTROL_REQTYPE_DIRECTION   0x80
#define CONTROL_REQTYPE_TYPE   0x60
#define CONTROL_REQTYPE_RECIPIENT   0x1F
Control Request Data Direction Masks
#define REQDIR_HOSTTODEVICE   (0 << 7)
#define REQDIR_DEVICETOHOST   (1 << 7)
Control Request Type Masks
#define REQTYPE_STANDARD   (0 << 5)
#define REQTYPE_CLASS   (1 << 5)
#define REQTYPE_VENDOR   (2 << 5)
Control Request Recipient Masks
#define REQREC_DEVICE   (0 << 0)
#define REQREC_INTERFACE   (1 << 0)
#define REQREC_ENDPOINT   (2 << 0)
#define REQREC_OTHER   (3 << 0)

Enumerations

enum  USB_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
}
enum  USB_Feature_Selectors_t {
  FEATURE_SEL_EndpointHalt = 0x00,
  FEATURE_SEL_DeviceRemoteWakeup = 0x01,
  FEATURE_SEL_TestMode = 0x02
}

Detailed Description

This module 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.

Note:
This file should not be included directly. It is automatically included as needed by the USB driver dispatch header located in LUFA/Drivers/USB/USB.h.
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Defines