- Main Page
- Modules
- Data Structures
- Files
- Related Pages

# AT90USBxxx Mouse + Mass Storage 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 composite device that gather an HID mouse and a Mass Storage device over the AT90USBxxx controller.

## About the sample application

The sample code is delivered for STK526.

## Architecture

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 sample dual role application is based on two different tasks:

- The usb_task (usb_task.c associated source file), is the task performing the USB low level enumeration process in device mode.
- The mouse task performs mouse events decoding and report construction to the USB host.
- The storage_task handles Mass Storage class commands, and manages low level memory drivers