Configuration of the USB Device Custom Class in µVision.
More...
Configuration of the USB Device Custom Class in µVision.
This configuration file defines:
- The assignment of the Custom Class to the USB Device instance.
- Up to four interfaces that
- can have bulk, interrupt and isochronous IN and OUT endpoints. Every endpoint can be configured for full/low-speed or high-speed operation.
- carry their own class, subclass, and protocol code. Also, an interface string can be defined separately.
- have a independent Interface Descriptor.
- Thread stack size settings for every endpoint separately. To allow parallel functionality of the four interfaces, every endpoint (or pair of IN/OUT endpoints on the same endpoint number) uses one thread.
These settings are used to create the Interface Descriptor and Endpoint Descriptor of the related USB Device Class. It is important that the settings match the application specific behavior in the related C source file USBD_User_CustomClass_n.c.
Custom Class Configuration File
The USB Device Custom Class configuration file USBD_Config_CustomClass_n.h contains the following settings:
- Assign Device Class to USB Device # selects USB Device that is used for this Device Class instance.
- Interface
- Interface Settings
- Endpoint Settings
- XXX OUT Endpoint: Select if the specified OUT Endpoint exists in this interface.
- Endpoint Number sets the number of the endpoint to be used. Conflicting settings are flagged by compile-time error messages.
- Maximum Endpoint Packet Size (in bytes) specifies the physical packet size used for information exchange. This setting is available for low-/full- and high-speed devices.
- Maximum NAK Rate specifies the interval in which the Endpoint can NAK. This setting is available only for high-speed devices.
- XXX IN Endpoint: Select if the specified IN Endpoint exists in this interface.
- Endpoint Number sets the number of the endpoint to be used. Conflicting settings are flagged by compile-time error messages.
- Maximum Endpoint Packet Size (in bytes) specifies the physical packet size used for information exchange. This setting is available for low-/full- and high-speed devices.
- Endpoint polling Interval (in xxx) specifies the frequency of requests initiated by USB Host for getting a notification. This setting is available for low-/full- and high-speed devices.
- Additional transactions per microframe improve communication performance. This setting is available only for high-speed devices.
- String Settings
- OS Resources Settings
- Endpoint x Thread Stack Size is used for memory allocation in the USB component.