LUFA Library  140928
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros Modules Pages
HostStandardReq.h File Reference

USB host standard request management. More...

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


#define USB_HOST_TIMEOUT_MS   1000


enum  USB_Host_SendControlErrorCodes_t {
  HOST_SENDCONTROL_Successful = 0,
  HOST_SENDCONTROL_DeviceDisconnected = 1,
  HOST_SENDCONTROL_SetupStalled = 3,
  HOST_SENDCONTROL_SoftwareTimeOut = 4


uint8_t USB_Host_ClearEndpointStall (const uint8_t EndpointAddress)
uint8_t USB_Host_GetDescriptor (const uint8_t Type, const uint8_t Index, void *const Buffer, const uint8_t BufferLength) ATTR_NON_NULL_PTR_ARG(3)
uint8_t USB_Host_GetDeviceConfiguration (uint8_t *const ConfigNumber) ATTR_NON_NULL_PTR_ARG(1)
static uint8_t USB_Host_GetDeviceDescriptor (USB_Descriptor_Device_t *const DeviceDescriptorPtr) ATTR_NON_NULL_PTR_ARG(1)
uint8_t USB_Host_GetDeviceStatus (uint8_t *const FeatureStatus) ATTR_NON_NULL_PTR_ARG(1)
static uint8_t USB_Host_GetDeviceStringDescriptor (const uint8_t Index, void *const Buffer, const uint8_t BufferLength) ATTR_NON_NULL_PTR_ARG(2)
uint8_t USB_Host_GetInterfaceAltSetting (const uint8_t InterfaceIndex, uint8_t *const AltSetting) ATTR_NON_NULL_PTR_ARG(2)
uint8_t USB_Host_SendControlRequest (void *const BufferPtr)
uint8_t USB_Host_SetDeviceConfiguration (const uint8_t ConfigNumber)
uint8_t USB_Host_SetInterfaceAltSetting (const uint8_t InterfaceIndex, const uint8_t AltSetting)


uint8_t USB_Host_ConfigurationNumber

Detailed Description

This file contains the function prototypes necessary for the issuing of outgoing standard control requests when the library is in USB host mode.

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.

Macro Definition Documentation

#define USB_HOST_TIMEOUT_MS   1000

Constant for the maximum software timeout period of sent USB control transactions to an attached device. If a device fails to respond to a sent control request within this period, the library will return a timeout error code.

This value may be overridden in the user project makefile as the value of the USB_HOST_TIMEOUT_MS token, and passed to the compiler using the -D switch.