Download UM1021 - STMicroelectronics

Transcript
USB device library
UM1021
Additional functions could be added as the IsoINIncomplete and IsoOUTIncomplete
could be eventually used to handle incomplete isochronous transfers (for more information,
refer to the USB audio device example). EP0_TxSent and EP0_RxReady could be
eventually used when the application needs to handle events occurring before the Zero
Length Packets (see the DFU example).
6.8
Application layer description
Figure 13. Folder organization
For each example, the source folder is split into src (sources) and inc (includes).
The sources directory includes the following files:
●
app.c: contains the main function
●
stm32fxxx_it.c: contains the system interrupt handlers
●
system_stm32fxxx.c: system clock configuration file for STM32Fxxx devices.
●
usb_bsp.c: contains the function implementation (declared in the usb_bsp.h in the USB
OTG low level driver) to initialize the GPIO for the core, time delay methods and
interrupts enabling/disabling process.
●
usbd_usr: contains the function implementation (declared in the usbd_usr.h in the USB
library) to handle the library events from user layer (event messages).
●
usbd_desc.c: This file is provided within USB Device examples and implements
callback bodies. This file offers a set of functions used to change the device and string
descriptors at application runtime.
The includes directory contains the following files:
62/107
●
stm32fxxx_it.h: header file of the stm32fxxx_it.c file
●
usb_conf.h: configuration files for the USB OTG low level driver.
●
usbd_conf.h: configuration files for the USB device library.
Doc ID 18153 Rev 3