USB Device Framework Usage
Default mainpageat91libusbUSB Device Framework Usage
Description
usb.dir::USB Device Framework Usage
 
File Architecture
The USB framework is made up of the following files: at91lib\boards: device register definition, board-related code and device startup code in assembly language
at91lib\utility: debug methods and definitions
at91lib\peripherals\dbgu: DBGU port usage for debug
at91lib\peripherals\pio: PIO interface usage for Vbus ...
at91lib\peripherals\aic: Interrupt configurationi functions
at91lib\usb\common\core: structures and methods of standard descriptors and requests
at91lib\usb\device\core: UDP controller driver methods and USBD API definitions
usb-device-core-project: basic enumeration program, with main.c and Makefile to build the project


Headers
When programming your own application, most if not all the headers described in the file architecture of the framework must be included. However, since each header has its own dependencies, they must be included in a particular order.

Here is the standard inclusion order:
#include <usb/common/core/USBGenericDescriptor.h>
#include <usb/common/core/USBDeviceDescriptor.h>
#include <usb/common/core/USBConfigurationDescriptor.h>
#include <usb/common/core/USBInterfaceDescriptor.h>
#include <usb/common/core/USBGenericRequest.h>
#include <usb/device/core/USBD.h>
#include <usb/device/core/USBDDriver.h>
#include <usb/device/core/USBDDriverDescriptors.h>
#include <usb/device/core/USBDCallbacks.h>
If a custom class driver has been added, then its header must probably be linked last.

Building the Framework
A Makefile is provided to make it easier to compile the framework. The make program and arm-elf-gcc is necessary to use it.

Several options are available to build the framework in different ways:
 
Source
The documentation for this Page was generated from the following file:
  • usb.dir