Functions | Variables
usbd_audio_core.c File Reference

This file provides the high layer firmware functions to manage the following functionalities of the USB Audio Class: More...

#include "usbd_audio_core.h"
#include "usbd_audio_out_if.h"
Include dependency graph for usbd_audio_core.c:

Go to the source code of this file.

Functions

static void AUDIO_Req_GetCurrent (void *pdev, USB_SETUP_REQ *req)
 AUDIO_Req_GetCurrent Handles the GET_CUR Audio control request. More...
 
static void AUDIO_Req_SetCurrent (void *pdev, USB_SETUP_REQ *req)
 AUDIO_Req_SetCurrent Handles the SET_CUR Audio control request. More...
 
static uint8_t usbd_audio_DataIn (void *pdev, uint8_t epnum)
 usbd_audio_DataIn Handles the audio IN data stage. More...
 
static uint8_t usbd_audio_DataOut (void *pdev, uint8_t epnum)
 usbd_audio_DataOut Handles the Audio Out data stage. More...
 
static uint8_t usbd_audio_DeInit (void *pdev, uint8_t cfgidx)
 usbd_audio_Init DeInitializes the AUDIO layer. More...
 
static uint8_t usbd_audio_EP0_RxReady (void *pdev)
 usbd_audio_EP0_RxReady Handles audio control requests data. More...
 
static uint8_t * USBD_audio_GetCfgDesc (uint8_t speed, uint16_t *length)
 USBD_audio_GetCfgDesc Returns configuration descriptor. More...
 
static uint8_t usbd_audio_Init (void *pdev, uint8_t cfgidx)
 usbd_audio_Init Initilaizes the AUDIO interface. More...
 
static uint8_t usbd_audio_OUT_Incplt (void *pdev)
 usbd_audio_OUT_Incplt Handles the iso out incomplete event. More...
 
static uint8_t usbd_audio_Setup (void *pdev, USB_SETUP_REQ *req)
 usbd_audio_Setup Handles the Audio control request parsing. More...
 
static uint8_t usbd_audio_SOF (void *pdev)
 usbd_audio_SOF Handles the SOF event (data buffer update and synchronization). More...
 

Variables

USBD_Class_cb_TypeDef AUDIO_cb
 
uint8_t AudioCtl [64]
 
uint8_t AudioCtlCmd = 0
 
uint32_t AudioCtlLen = 0
 
uint8_t AudioCtlUnit = 0
 
uint8_t IsocOutBuff [TOTAL_OUT_BUF_SIZE *2]
 
uint8_t * IsocOutRdPtr = IsocOutBuff
 
uint8_t * IsocOutWrPtr = IsocOutBuff
 
static uint32_t PlayFlag = 0
 
static __IO uint32_t usbd_audio_AltSet = 0
 
static uint8_t usbd_audio_CfgDesc [AUDIO_CONFIG_DESC_SIZE]
 

Detailed Description

This file provides the high layer firmware functions to manage the following functionalities of the USB Audio Class:

Author
MCD Application Team
Version
V1.1.0
Date
19-March-2012
  • Initialization and Configuration of high and low layer
  • Enumeration as Audio Streaming Device
  • Audio Streaming data transfer
  • AudioControl requests management
  • Error management
*      
*          ===================================================================      
*                                Audio Class Driver Description
*          =================================================================== 
*           This driver manages the Audio Class 1.0 following the "USB Device Class Definition for
*           Audio Devices V1.0 Mar 18, 98".
*           This driver implements the following aspects of the specification:
*             - Device descriptor management
*             - Configuration descriptor management
*             - Standard AC Interface Descriptor management
*             - 1 Audio Streaming Interface (with single channel, PCM, Stereo mode)
*             - 1 Audio Streaming Endpoint
*             - 1 Audio Terminal Input (1 channel)
*             - Audio Class-Specific AC Interfaces
*             - Audio Class-Specific AS Interfaces
*             - AudioControl Requests: only SET_CUR and GET_CUR requests are supported (for Mute)
*             - Audio Feature Unit (limited to Mute control)
*             - Audio Synchronization type: Asynchronous
*             - Single fixed audio sampling rate (configurable in usbd_conf.h file)
*          
*           @note
*            The Audio Class 1.0 is based on USB Specification 1.0 and thus supports only
*            Low and Full speed modes and does not allow High Speed transfers.
*            Please refer to "USB Device Class Definition for Audio Devices V1.0 Mar 18, 98"
*            for more details.
* 
*           These aspects may be enriched or modified for a specific user application.
*          
*            This driver doesn't implement the following aspects of the specification 
*            (but it is possible to manage these features with some modifications on this driver):
*             - AudioControl Endpoint management
*             - AudioControl requsests other than SET_CUR and GET_CUR
*             - Abstraction layer for AudioControl requests (only Mute functionality is managed)
*             - Audio Synchronization type: Adaptive
*             - Audio Compression modules and interfaces
*             - MIDI interfaces and modules
*             - Mixer/Selector/Processing/Extension Units (Feature unit is limited to Mute control)
*             - Any other application-specific modules
*             - Multiple and Variable audio sampling rates
*             - Out Streaming Endpoint/Interface (microphone)
*      
*  
Attention

© COPYRIGHT 2012 STMicroelectronics

Licensed under MCD-ST Liberty SW License Agreement V2, (the "License"); You may not use this file except in compliance with the License. You may obtain a copy of the License at:

   http://www.st.com/software_license_agreement_liberty_v2

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

Definition in file usbd_audio_core.c.



rosflight_firmware
Author(s): Daniel Koch , James Jackson
autogenerated on Thu Oct 24 2019 03:17:21