HostChapter9.h File Reference

#include <avr/io.h>
#include <stdbool.h>
#include "LowLevel.h"
#include "StdRequestType.h"

Data Structures

struct  USB_Host_Request_Header_t

Enumerations

enum  USB_Host_SendControlErrorCodes_t {
  HOST_SENDCONTROL_Successful = 0,
  HOST_SENDCONTROL_DeviceDisconnect = 1,
  HOST_SENDCONTROL_PipeError = 2,
  HOST_SENDCONTROL_SetupStalled = 3,
  HOST_SENDCONTROL_SoftwareTimeOut = 4
}

Functions

uint8_t USB_Host_SendControlRequest (void *BufferPtr)

Variables

USB_Host_Request_Header_t USB_HostRequest

Detailed Description

Module for host mode request processing. This module allows for the transmission of standard, class and vendor control requests to the default control endpoint of an attached device while in host mode.

See also:
Chapter 9 of the USB 2.0 specification.

Enumeration Type Documentation

Enum for the USB_Host_SendControlRequest() return code, indicating the reason for the error if the transfer of the request is unsucessful.

Enumerator:
HOST_SENDCONTROL_Successful  No error occurred in the request transfer.
HOST_SENDCONTROL_DeviceDisconnect  The attached device was disconnected during the request transfer.
HOST_SENDCONTROL_PipeError  An error occured in the pipe while sending the request.
HOST_SENDCONTROL_SetupStalled  The attached device stalled the request, unusally indicating that the request is unsupported on the device.
HOST_SENDCONTROL_SoftwareTimeOut  The request or data transfer timed out.


Function Documentation

uint8_t USB_Host_SendControlRequest ( void *  BufferPtr  ) 

Sends the request stored in the USB_HostRequest global structure to the attached device, and transfers the data stored in the buffer to the device, or from the device to the buffer as requested.

Parameters:
BufferPtr Pointer to the start of the data buffer if the request has a data stage, or NULL if the request transfers no data to or from the device.
Returns:
A value from the USB_Host_SendControlErrorCodes_t enum to indicate the result.


Variable Documentation

Global for the request to send via the USB_Host_SendControlRequest() function. This global should be filled with the correct control request data before sending the request to the attached device while in host mode.


Generated on Thu Oct 2 18:01:17 2008 for MyUSB Library by  doxygen 1.5.5