USB host operating mode configuration
[USB application configuration]


Modules

 USB host custom actions

Defines

#define CLASS_SUBCLASS_PROTOCOL
 CLASS/SUBCLASS/PROTOCOL supported table list.
#define DEVICE_ADDRESS   0x05
 The address that will be assigned to the connected device.
#define HOST_AUTO_CFG_ENDPOINT   ENABLE
 Try to configure the host pipe according to the device descriptors received.
#define HOST_CONTINUOUS_SOF_INTERRUPT   DISABLE
 Host Start-of-Frame interrupt always enabled.
#define HOST_ERROR_RESTART   ENABLE
 When host error state detected, go to detached state.
#define HOST_STRICT_VID_PID_TABLE   DISABLE
 The host controller will be limited to the strict VID/PID list.
#define ID_PIN_CHANGE_GENERATE_RESET   ENABLE
 Force CPU reset upon ID pin change.
#define MAX_EP_PER_INTERFACE   3
 The maximal number of endpoints per interface supported.
#define MAX_INTERFACE_SUPPORTED   0x03
 The maximal number of interfaces that can be supported (composite device).
#define NAK_RECEIVE_TIMEOUT   0x0FFF
 Number of NAK handshakes before time-out for receive functions (up to 0xFFFF).
#define NAK_SEND_TIMEOUT   0x0FFF
 Number of NAK handshakes before time-out for transmit functions (up to 0xFFFF).
#define NAK_TIMEOUT_ENABLE   DISABLE
 Enable cpt NAK time-out for host transfer.
#define SIZEOF_DATA_STAGE   250
 The size of RAM buffer reserved for descriptor handling.
#define TIMEOUT_DELAY   10
 Delay 1/4 s (250 ms) before time-out value.
#define TIMEOUT_DELAY_ENABLE   ENABLE
 Enable time-out delay for host transfer.
#define USB_HOST_PIPE_INTERRUPT_TRANSFER   DISABLE
 USB host pipes transfers use USB communication interrupt (allows to use non-blocking functions).
#define User_configure_endpoint()
 If no auto configuration of EP, map here user function.
#define VID_PID_TABLE   {ATMEL_VID, 1, HID_EXAMPLE_PID}
 VID/PID supported table list.

Functions

void host_sof_action (void)
 host_sof_action
void host_suspend_action (void)

Variables

Bool keyboard_hid_connected
Bool keyboard_hid_new_device_connected
volatile Bool mouse_hid_connected
volatile Bool mouse_hid_new_device_connected


Define Documentation

#define CLASS_SUBCLASS_PROTOCOL

Value:

{HID_CLASS, BOOT_SUBCLASS, KEYBOARD_PROTOCOL,\
                                   HID_CLASS, NO_SUBCLASS, KEYBOARD_PROTOCOL,\
                                   HID_CLASS, BOOT_SUBCLASS, MOUSE_PROTOCOL,\
                                   HID_CLASS, NO_SUBCLASS, MOUSE_PROTOCOL}
CLASS/SUBCLASS/PROTOCOL supported table list.

This table contains the CLASS/SUBCLASS/PROTOCOL that are supported by the reduced-host application. This table definition allows to extend the reduced application device support to an entire CLASS/ SUBCLASS/PROTOCOL instead of a simple VID/PID table list.

CLASS_SUBCLASS_PROTOCOL format definition:
#define CLASS_SUBCLASS_PROTOCOL {CLASS1, SUB_CLASS1, PROTOCOL1,
...
CLASSn, SUB_CLASSn, PROTOCOLn}

Definition at line 116 of file conf_usb.h.

#define DEVICE_ADDRESS   0x05

The address that will be assigned to the connected device.

Definition at line 125 of file conf_usb.h.

#define HOST_AUTO_CFG_ENDPOINT   ENABLE

Try to configure the host pipe according to the device descriptors received.

Definition at line 139 of file conf_usb.h.

#define HOST_CONTINUOUS_SOF_INTERRUPT   DISABLE

Host Start-of-Frame interrupt always enabled.

Definition at line 142 of file conf_usb.h.

#define HOST_ERROR_RESTART   ENABLE

When host error state detected, go to detached state.

Definition at line 145 of file conf_usb.h.

#define HOST_STRICT_VID_PID_TABLE   DISABLE

The host controller will be limited to the strict VID/PID list.

When enabled, if the device VID/PID does not belong to the supported list, the host controller software will not go to deeper configuration, but to error state.

Definition at line 136 of file conf_usb.h.

#define ID_PIN_CHANGE_GENERATE_RESET   ENABLE

Force CPU reset upon ID pin change.

Definition at line 151 of file conf_usb.h.

#define MAX_EP_PER_INTERFACE   3

The maximal number of endpoints per interface supported.

Definition at line 131 of file conf_usb.h.

#define MAX_INTERFACE_SUPPORTED   0x03

The maximal number of interfaces that can be supported (composite device).

Definition at line 128 of file conf_usb.h.

#define NAK_RECEIVE_TIMEOUT   0x0FFF

Number of NAK handshakes before time-out for receive functions (up to 0xFFFF).

Definition at line 166 of file conf_usb.h.

#define NAK_SEND_TIMEOUT   0x0FFF

Number of NAK handshakes before time-out for transmit functions (up to 0xFFFF).

Definition at line 163 of file conf_usb.h.

#define NAK_TIMEOUT_ENABLE   DISABLE

Enable cpt NAK time-out for host transfer.

Definition at line 160 of file conf_usb.h.

#define SIZEOF_DATA_STAGE   250

The size of RAM buffer reserved for descriptor handling.

Definition at line 122 of file conf_usb.h.

Referenced by host_hid_get_descriptor(), and host_hid_get_report().

#define TIMEOUT_DELAY   10

Delay 1/4 s (250 ms) before time-out value.

Definition at line 157 of file conf_usb.h.

#define TIMEOUT_DELAY_ENABLE   ENABLE

Enable time-out delay for host transfer.

Definition at line 154 of file conf_usb.h.

#define USB_HOST_PIPE_INTERRUPT_TRANSFER   DISABLE

USB host pipes transfers use USB communication interrupt (allows to use non-blocking functions).

Definition at line 148 of file conf_usb.h.

 
#define User_configure_endpoint (  ) 

If no auto configuration of EP, map here user function.

Definition at line 170 of file conf_usb.h.

#define VID_PID_TABLE   {ATMEL_VID, 1, HID_EXAMPLE_PID}

VID/PID supported table list.

This table contains the VID/PID that are supported by the reduced-host application.

VID_PID_TABLE format definition:
#define VID_PID_TABLE {VID1, number_of_PIDs_for_VID1, PID11_value, ..., PID1X_Value,
...
VIDn, number_of_PIDs_for_VIDn, PIDn1_value, ..., PIDnY_Value}

Definition at line 104 of file conf_usb.h.


Function Documentation

void host_sof_action ( void   ) 

host_sof_action

This function increments the sof_cnt counter each time the USB Start-of-Frame interrupt subroutine is executed (1 ms). Useful to manage time delays

Definition at line 203 of file host_keyboard_hid_task.c.

00204 {
00205   sof_cnt++;
00206 }

void host_suspend_action ( void   ) 


Variable Documentation

volatile Bool mouse_hid_connected

Definition at line 83 of file host_mouse_hid_task.c.

Referenced by host_mouse_hid_task(), and host_mouse_hid_task_init().

Definition at line 82 of file host_mouse_hid_task.c.

Referenced by host_mouse_hid_task(), and host_mouse_hid_task_init().


Generated on Fri Feb 19 02:33:00 2010 for AVR32 - USB HID FreeRTOS Example by  doxygen 1.5.5