AT90USBxxx USB Host Mouse Sample applicaton
Use of this program is subject to Atmel's End User License Agreement.
Please read file LICENSE.TXT for copyright notice.
This embedded application source code illustrates how to implement a simple USB host application with HID mouse support.
To use the application, the SK525 should be configured to be self powered (see STK525 hardware manual).
- Note:
- The application can also be used with the USBKey in host mode (powered with an external battery)
The application use host operating mode of the STK525. In host mode, the USB can be connected (with a mini A connector attached to the mini AB STK525 receptacle) to a standard USB mouse (or another STK525 running device mouse application). In this mode the AT90USBxxx controller will initialize and enumerate a device HID mouse application.
This source code is usable with the following compilers:
- IAR Embedded Workbench (5.11A and higher)
- AVRGCC (WinAVR 20080411 and higher).
Support for other compilers may required modifications or attention for:
- compiler.h file
- special registers declaration file
- interrupt subroutines declarations
As illustrated in the figure bellow, the application entry point is located is 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 four different tasks:
- The usb_task (usb_task.c associated source file), is the task performing the USB low level enumeration process in device mode or host mode.
- The host_mouse_task is active allows to initialize a connected device mouse and to display mouse activity on LEDs
Generated on Fri Oct 31 16:09:22 2008 for ATMEL by
1.5.3