usb_host_enum.c File Reference


Detailed Description

Processing of USB host enumeration requests.

This file contains the USB control pipe management routines corresponding to the standard enumeration process (refer to chapter 9 of the USB specification).

Author:
Atmel Corporation: http://www.atmel.com
Support and FAQ: http://support.atmel.no/

Definition in file usb_host_enum.c.

#include "conf_usb.h"
#include "compiler.h"
#include "usb_drv.h"
#include "usb_host_enum.h"
#include "usb_host_task.h"
#include "usb_task.h"

Go to the source code of this file.

Defines

#define REG_CLASS_CNT   (sizeof(registered_class) / sizeof(registered_class[0]))
#define REG_VID_PID_CNT   (sizeof(registered_VID_PID) / sizeof(registered_VID_PID[0]))

Functions

Bool host_check_class (void)
 This function checks if the device class is supported.
Bool host_check_VID_PID (void)
 This function checks if the VID and the PID are supported (if the VID & PID belong to the VID_PID table).
U32 host_get_timeout (void)
Status_t host_transfer_control (void *data_pointer)
 This function is the generic control pipe management function.

Variables

volatile U8 bmattributes
 bmAttributes byte of connected device
volatile U16 device_PID
 PID of connected device.
volatile U16 device_VID
 VID of connected device.
volatile S_interface interface_supported [MAX_INTERFACE_SUPPORTED]
 Supported interfaces.
volatile U8 maxpower
 maxpower byte of connected device (unit is 2 mA)
volatile U8 nb_interface_supported = 0
 Number of interfaces the host is able to support in the connected device.
static const U8 registered_class [] = CLASS_SUBCLASS_PROTOCOL
 Table of registered classes (see conf_usb.h for table contents).
static const U16 registered_VID_PID [] = VID_PID_TABLE
 Table of registered devices (see conf_usb.h for table contents).


Define Documentation

#define REG_CLASS_CNT   (sizeof(registered_class) / sizeof(registered_class[0]))

Definition at line 78 of file usb_host_enum.c.

Referenced by host_check_class().

#define REG_VID_PID_CNT   (sizeof(registered_VID_PID) / sizeof(registered_VID_PID[0]))

Definition at line 74 of file usb_host_enum.c.

Referenced by host_check_VID_PID().


Function Documentation

U32 host_get_timeout ( void   ) 

Definition at line 675 of file usb_task.c.

References private_sof_counter.

Referenced by host_transfer_control().

00676 {
00677   return private_sof_counter;
00678 }


Variable Documentation

const U8 registered_class[] = CLASS_SUBCLASS_PROTOCOL [static]

Table of registered classes (see conf_usb.h for table contents).

Definition at line 77 of file usb_host_enum.c.

Referenced by host_check_class().

const U16 registered_VID_PID[] = VID_PID_TABLE [static]

Table of registered devices (see conf_usb.h for table contents).

Definition at line 73 of file usb_host_enum.c.

Referenced by host_check_VID_PID().


Generated on Fri Feb 19 02:27:51 2010 for AVR32 - USB Enumeration Example by  doxygen 1.5.5