usb_host_enum.c File Reference

,vThis file manages the host enumeration process. More...

#include "config.h"
#include "conf_usb.h"
#include "lib_mcu/usb/usb_drv.h"
#include "usb_host_enum.h"
#include "modules/usb/usb_task.h"
#include "usb_host_task.h"

Include dependency graph for usb_host_enum.c:

Go to the source code of this file.

Functions

U8 host_check_VID_PID (void)
 host_check_VID_PIDThis function checks if the VID and the PID are supported (if the VID/PID belongs to the VID_PID table)
U8 host_check_OTG_features (void)
 host_check_OTG_featuresThis function checks if the OTG descriptor has been received and indicates which features are supported
U8 host_check_class (void)
 host_check_classThis function checks if the device class is supported. The function looks in all interface declared in the received dewcriptors, if one of them match with the CLASS/SUB_CLASS/PROTOCOL table
U8 host_auto_configure_endpoint ()
 This function configures the pipe according to the device class of the interface selected.
U8 get_interface_descriptor_offset (U8 interface, U8 alt)
 get_interface_descriptor_offsetThis function returns the offset in data_stage where to find the interface descriptor whose number and alternate setting values are passed as parameters
U8 host_get_hwd_pipe_nb (U8 ep_addr)
 This function returns the physical pipe number linked to a logical endpoint address.
U8 host_send_control (U8 *data_pointer)
 host_send_control.This function is the generic Pipe 0 management function This function is used to send and receive control request over pipe 0

Variables

S_usb_setup_data usb_request
 For control requests management over pipe 0.
U16 registered_VID_PID [] = { 0x03EB, 1, 0x2031 }
 Const table of known devices (see conf_usb.h for table content).
U8 registered_class [] = {0x00, 0x00, 0x00, 0x08 , 0x06, 0x50, 0x03 , 0x00 , 0x02 , 0x03 , 0x01 , 0x02 , 0x03 , 0x00 , 0x00 }
 Const table of known class (see conf_usb.h for table content).
U8 ep_table [MAX_EP_NB] = {0,0,0,0,0,0,0}
 Physical EP to address device endpoints look-up table.
U8 nb_interface_supported = 0
 The number of interface the host is able to support in the device connected.
S_interface interface_supported [0x03]
U16 device_PID
 PID of device connected.
U16 device_VID
 VID of device connected.
U8 bmattributes
 bmAttributes byte of the connected device
U8 maxpower
 maxpower byte of the connected device (Caution, unit is 2mA)


Detailed Description

,vThis file manages the host enumeration process.

Copyright (c) 2004 Atmel.

Use of this program is subject to Atmel's End User License Agreement. Please read file license.txt for copyright notice.

Version:
1.13 at90usb128-otg-dual_role-toggle-1_0_0
Id
usb_host_enum.c,v 1.13 2007/02/13 10:13:50 arobert Exp
Todo:
Bug:

Definition in file usb_host_enum.c.


Variable Documentation

S_usb_setup_data usb_request

For control requests management over pipe 0.

Definition at line 193 of file usb_host_task.c.

Referenced by host_send_control().

U16 registered_VID_PID[] = { 0x03EB, 1, 0x2031 }

Const table of known devices (see conf_usb.h for table content).

Definition at line 67 of file usb_host_enum.c.

Referenced by host_check_VID_PID().

U8 registered_class[] = {0x00, 0x00, 0x00, 0x08 , 0x06, 0x50, 0x03 , 0x00 , 0x02 , 0x03 , 0x01 , 0x02 , 0x03 , 0x00 , 0x00 }

Const table of known class (see conf_usb.h for table content).

Definition at line 70 of file usb_host_enum.c.

Referenced by host_check_class().


Generated on Mon Feb 19 09:32:04 2007 for Atmel by  doxygen 1.5.1-p1