Configuration of the USB Device ADC Class.
Configuration of the USB Device ADC Class.
This configuration file defines:
- The assignment of the ADC class to the USB Device instance.
- USB Endpoint assignments for the ADC class with parameters for Full/Low-speed communication.
- Class Settings for the Interface Descriptor.
The settings in this configuration file are used to create the Interface Descriptor and Endpoint Descriptor of the related USB Device Class.
ADC Class Configuration File
The USB Device ADC Class configuration file USBD_Config_ADC_n.h contains the following settings:
- Assign Device Class to USB Device # selects the USB Device that is to be used for this Device Class instance.
- Isochronous Endpoint Settings
- Isochronous OUT Endpoint Settings enables or disables settings for an Isochronous OUT Endpoint.
- Isochronous OUT Endpoint Number sets the number of the endpoint to be used. Conflicting settings are flagged by compile-time error messages.
- Endpoint Settings
- Maximum Endpoint Packet Size (in bytes) specifies the physical packet size used for information exchange.
- Endpoint polling Interval (in ms) specifies the frequency of requests initiated by USB Host for getting audio samples data.
- Isochronous IN Endpoint Settings enables or disables settings for an Isochronous IN Endpoint.
- Isochronous IN Endpoint Number sets the number of the endpoint to be used. Conflicting settings are flagged by compile-time error messages.
- Endpoint Settings
- Maximum Endpoint Packet Size (in bytes) specifies the physical packet size used for information exchange.
- Endpoint polling Interval (in ms) specifies the frequency of requests initiated by USB Host for getting audio samples data.
- Audio Device Class Settings
- Audio Control Interface String is used to create USB Descriptors.
- Audio Output Settings (Speaker)
- Audio Streaming (Zero Bandwidth) Interface String is used to create USB Descriptors.
- Audio Streaming (Operational) Interface String is used to create USB Descriptors.
- Channel Configuration is used for memory allocation in the USB component.
- Sample Frequency (in Hz) is used for memory allocation in the USB component.
- Audio Subframe Size is used for memory allocation in the USB component.
- Sample Resolution is used for memory allocation in the USB component.
- Buffer Size (in samples) is used for memory allocation in the USB component.
- Audio Input Settings (Microphone)
- Audio Streaming (Zero Bandwidth) Interface String is used to create USB Descriptors.
- Audio Streaming (Operational) Interface String is used to create USB Descriptors.
- Channel Configuration is used for memory allocation in the USB component.
- Sample Frequency (in Hz) is used for memory allocation in the USB component.
- Audio Subframe Size is used for memory allocation in the USB component.
- Sample Resolution is used for memory allocation in the USB component.
- Buffer Size (in samples) is used for memory allocation in the USB component.
- OS Resource Settings
- Audio Device Class Thread Stack Size is used for memory allocation in the USB component.
- The default Audio Device Class Thread priority is osPriorityAboveNormal. This priority can be changed by changing USBD_ADCn_THREAD_PRIORITY define in this configuration file. This priority needs to be high enough so that USB Stack can react to USB events in a timely manner. Due to this requirement it is recommended to keep this setting at default.