AT90USBxxxx USB OTG Library - HID Demonstration

License

Use of this program is subject to Atmel's End User License Agreement.

Please read file license.txt for copyright notice.

Description

This embedded application source code illustrates how to implement a simple application using the USB OTG library. User must connect this board to another one that supports the OTG protocol, and that has the same firmware. At the time of writing, only STK525 and USBKEY are OTG compatible (but not totally compliant), and can be connected together. This application is customizable, please look at "conf_usb.h".

About the sample application

This package is compatible with STK525 and USBKEY, user has just to set the board name in TARGET_BOARD ("config.h"). Boards must be configured in SELF POWERED mode (external power source). The application uses both peripheral and host operating mode of the micro. This application is reserved to OTG demonstration, and may not run correctly when attached to a standard PC (non-OTG). Concept is simple : user has to press a button on the Peripheral board to toggle the LED state of the Host board. But USB OTG features the following possibilities : PERIPHERAL MODE (default if MiniB inserted at start up)

HOST MODE (default if MiniA inserted at start up)

MESSAGING FEATURE

Architecture

As illustrated in the figure below, the application entry point is located in the main.c file. The main function first performs the initialization of a scheduler module and then runs it in an infinite loop. The scheduler is a simple infinite loop calling all its tasks defined in the conf_scheduler.h file. No real time schedule is performed, when a task ends, the scheduler calls the next task defined in the configuration file (conf_scheduler.h).

The application is based on two different tasks:

Refer to the corresponding Application Note (OTG Add-on to USB Library) for a complete information guide about OTG and for more information about this package.


Generated on Mon Feb 19 09:31:46 2007 for Atmel by  doxygen 1.5.1-p1