Host.h File Reference

USB host mode definitions. More...

#include <avr/io.h>
#include <stdbool.h>
#include <util/delay.h>
#include "../../../Common/Common.h"
#include "../HighLevel/StdDescriptors.h"
#include "Pipe.h"
#include <avr/pgmspace.h>
#include <avr/eeprom.h>
#include "../HighLevel/USBTask.h"
#include "../HighLevel/StreamCallbacks.h"
#include <avr/interrupt.h>
#include <util/atomic.h>
#include "../HighLevel/USBMode.h"
#include "../HighLevel/Events.h"
#include "LowLevel.h"

Defines

#define USB_HOST_DEVICEADDRESS   1
#define USB_HOST_TIMEOUT_MS   1000
#define HOST_DEVICE_SETTLE_DELAY_MS   1500

Enumerations

enum  USB_Host_States_t {
  HOST_STATE_WaitForDeviceRemoval = 0,
  HOST_STATE_WaitForDevice = 1,
  HOST_STATE_Unattached = 2,
  HOST_STATE_Powered = 3,
  HOST_STATE_Powered_WaitForDeviceSettle = 4,
  HOST_STATE_Powered_WaitForConnect = 5,
  HOST_STATE_Powered_DoReset = 6,
  HOST_STATE_Powered_ConfigPipe = 7,
  HOST_STATE_Default = 8,
  HOST_STATE_Default_PostReset = 9,
  HOST_STATE_Default_PostAddressSet = 10,
  HOST_STATE_Addressed = 11,
  HOST_STATE_Configured = 12,
  HOST_STATE_Suspended = 15
}
enum  USB_Host_ErrorCodes_t { HOST_ERROR_VBusVoltageDip = 0 }
enum  USB_Host_EnumerationErrorCodes_t {
  HOST_ENUMERROR_NoError = 0,
  HOST_ENUMERROR_WaitStage = 1,
  HOST_ENUMERROR_NoDeviceDetected = 2,
  HOST_ENUMERROR_ControlError = 3,
  HOST_ENUMERROR_PipeConfigError = 4
}

Functions

static void USB_Host_ResetBus (void)
static void USB_Host_IsBusResetComplete (void)
static void USB_Host_ResumeBus (void)
static void USB_Host_SuspendBus (void)
static bool USB_Host_IsBusSuspended (void)
static bool USB_Host_IsDeviceFullSpeed (void)
static bool USB_Host_IsRemoteWakeupSent (void)
static void USB_Host_ClearRemoteWakeupSent (void)
static void USB_Host_ResumeFromWakeupRequest (void)
static bool USB_Host_IsResumeFromWakeupRequestSent (void)
uint8_t USB_Host_SetDeviceConfiguration (const uint8_t ConfigNumber)
uint8_t USB_Host_GetDeviceDescriptor (void *const DeviceDescriptorPtr)
uint8_t USB_Host_GetDeviceStringDescriptor (const uint8_t Index, void *const Buffer, const uint8_t BufferLength)
uint8_t USB_Host_ClearPipeStall (uint8_t EndpointIndex)

Detailed Description

This file contains structures, function prototypes and macros related to USB host mode.

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.
Generated by  doxygen 1.6.3