- No category
advertisement
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).
Figure 13.
Folder organization
62/107
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:
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
advertisement
* Your assessment is very important for improving the workof artificial intelligence, which forms the content of this project
advertisement
Table of contents
- 8 Reference information
- 8 Glossary
- 9 USB host and device library overview
- 9 Main features
- 10 USB host and device library folder structure
- 11 USB OTG core
- 11 USB OTG full speed core
- 11 OTG_FS interface main features
- 11 USB OTG high speed core
- 13 USB OTG low level driver
- 13 USB OTG low level driver architecture
- 13 USB OTG low level driver files
- 14 USB OTG low level driver configuration
- 15 USB OTG driver programming manual
- 15 Low level driver structures
- 15 Programming considerations when using internal DMA
- 17 Selecting USB physical interface
- 17 Programming device drivers
- 20 Programming host drivers
- 23 USB device library
- 23 USB device library overview
- 24 USB device library files
- 24 USB device library description
- 24 USB device library flow
- 27 USB device library process
- 28 USB device data flow
- 29 USB device library configuration
- 29 USB data transfer handling
- 30 Using the multi-packet feature
- 30 USB control functions
- 30 FIFO size customization
- 32 USB device library functions
- 35 USB device class interface
- 36 USB device user interface
- 38 USB device classes
- 39 HID class
- 40 Mass storage class
- 45 Device firmware upgrade (DFU) class
- 52 Audio class
- 56 Communication device class (CDC)
- 61 Adding a custom class
- 62 Application layer description
- 63 Starting the USB device library
- 64 USB device examples
- 64 USB mass storage device example
- 65 USB human interface device example
- 67 Dual core USB device example
- 68 USB device firmware upgrade example
- 70 USB virtual com port (VCP) device example
- 73 USB audio device example
- 74 Known limitations
- 75 USB host library
- 75 Overview
- 76 USB host library files
- 77 USB host library description
- 77 Host core state machine
- 78 Device enumeration
- 79 Control transfer state machine
- 79 USB I/O request module
- 79 Host channel control module
- 79 USB host library configuration
- 79 USB host library functions
- 81 USB host class interface
- 81 USB host classes
- 81 Mass storage class
- 85 HID class
- 88 USB host user interface
- 88 Library user API
- 88 User callback functions
- 88 Class callback functions
- 92 Application layer description
- 93 Starting the USB host library
- 94 USB host examples
- 95 USB mass storage host example
- 98 USB HID Host example
- 99 USB dual core host example
- 100 USB manual dual role device example
- 102 Frequently-asked questions
- 105 Troubleshooting
- 106 Revision history