usbd_audio_core.c
Go to the documentation of this file.
1 
79 /* Includes ------------------------------------------------------------------*/
80 
81 #include "usbd_audio_core.h"
82 #include "usbd_audio_out_if.h"
83 
122 /*********************************************
123  AUDIO Device library callbacks
124  *********************************************/
125 static uint8_t usbd_audio_Init (void *pdev, uint8_t cfgidx);
126 static uint8_t usbd_audio_DeInit (void *pdev, uint8_t cfgidx);
127 static uint8_t usbd_audio_Setup (void *pdev, USB_SETUP_REQ *req);
128 static uint8_t usbd_audio_EP0_RxReady(void *pdev);
129 static uint8_t usbd_audio_DataIn (void *pdev, uint8_t epnum);
130 static uint8_t usbd_audio_DataOut (void *pdev, uint8_t epnum);
131 static uint8_t usbd_audio_SOF (void *pdev);
132 static uint8_t usbd_audio_OUT_Incplt (void *pdev);
133 
134 /*********************************************
135  AUDIO Requests management functions
136  *********************************************/
137 static void AUDIO_Req_GetCurrent(void *pdev, USB_SETUP_REQ *req);
138 static void AUDIO_Req_SetCurrent(void *pdev, USB_SETUP_REQ *req);
139 static uint8_t *USBD_audio_GetCfgDesc (uint8_t speed, uint16_t *length);
147 /* Main Buffer for Audio Data Out transfers and its relative pointers */
151 
152 /* Main Buffer for Audio Control Rrequests transfers and its relative variables */
153 uint8_t AudioCtl[64];
154 uint8_t AudioCtlCmd = 0;
155 uint32_t AudioCtlLen = 0;
156 uint8_t AudioCtlUnit = 0;
157 
158 static uint32_t PlayFlag = 0;
159 
160 static __IO uint32_t usbd_audio_AltSet = 0;
162 
163 /* AUDIO interface class callbacks structure */
165 {
169  NULL, /* EP0_TxSent */
174  NULL,
177 #ifdef USB_OTG_HS_CORE
178  USBD_audio_GetCfgDesc, /* use same config as per FS */
179 #endif
180 };
181 
182 /* USB AUDIO device Configuration Descriptor */
184 {
185  /* Configuration 1 */
186  0x09, /* bLength */
187  USB_CONFIGURATION_DESCRIPTOR_TYPE, /* bDescriptorType */
188  LOBYTE(AUDIO_CONFIG_DESC_SIZE), /* wTotalLength 109 bytes*/
190  0x02, /* bNumInterfaces */
191  0x01, /* bConfigurationValue */
192  0x00, /* iConfiguration */
193  0xC0, /* bmAttributes BUS Powred*/
194  0x32, /* bMaxPower = 100 mA*/
195  /* 09 byte*/
196 
197  /* USB Speaker Standard interface descriptor */
198  AUDIO_INTERFACE_DESC_SIZE, /* bLength */
199  USB_INTERFACE_DESCRIPTOR_TYPE, /* bDescriptorType */
200  0x00, /* bInterfaceNumber */
201  0x00, /* bAlternateSetting */
202  0x00, /* bNumEndpoints */
203  USB_DEVICE_CLASS_AUDIO, /* bInterfaceClass */
204  AUDIO_SUBCLASS_AUDIOCONTROL, /* bInterfaceSubClass */
205  AUDIO_PROTOCOL_UNDEFINED, /* bInterfaceProtocol */
206  0x00, /* iInterface */
207  /* 09 byte*/
208 
209  /* USB Speaker Class-specific AC Interface Descriptor */
210  AUDIO_INTERFACE_DESC_SIZE, /* bLength */
211  AUDIO_INTERFACE_DESCRIPTOR_TYPE, /* bDescriptorType */
212  AUDIO_CONTROL_HEADER, /* bDescriptorSubtype */
213  0x00, /* 1.00 */ /* bcdADC */
214  0x01,
215  0x27, /* wTotalLength = 39*/
216  0x00,
217  0x01, /* bInCollection */
218  0x01, /* baInterfaceNr */
219  /* 09 byte*/
220 
221  /* USB Speaker Input Terminal Descriptor */
222  AUDIO_INPUT_TERMINAL_DESC_SIZE, /* bLength */
223  AUDIO_INTERFACE_DESCRIPTOR_TYPE, /* bDescriptorType */
224  AUDIO_CONTROL_INPUT_TERMINAL, /* bDescriptorSubtype */
225  0x01, /* bTerminalID */
226  0x01, /* wTerminalType AUDIO_TERMINAL_USB_STREAMING 0x0101 */
227  0x01,
228  0x00, /* bAssocTerminal */
229  0x01, /* bNrChannels */
230  0x00, /* wChannelConfig 0x0000 Mono */
231  0x00,
232  0x00, /* iChannelNames */
233  0x00, /* iTerminal */
234  /* 12 byte*/
235 
236  /* USB Speaker Audio Feature Unit Descriptor */
237  0x09, /* bLength */
238  AUDIO_INTERFACE_DESCRIPTOR_TYPE, /* bDescriptorType */
239  AUDIO_CONTROL_FEATURE_UNIT, /* bDescriptorSubtype */
240  AUDIO_OUT_STREAMING_CTRL, /* bUnitID */
241  0x01, /* bSourceID */
242  0x01, /* bControlSize */
243  AUDIO_CONTROL_MUTE, /* bmaControls(0) */
244  0x00, /* bmaControls(1) */
245  0x00, /* iTerminal */
246  /* 09 byte*/
247 
248  /*USB Speaker Output Terminal Descriptor */
249  0x09, /* bLength */
250  AUDIO_INTERFACE_DESCRIPTOR_TYPE, /* bDescriptorType */
251  AUDIO_CONTROL_OUTPUT_TERMINAL, /* bDescriptorSubtype */
252  0x03, /* bTerminalID */
253  0x01, /* wTerminalType 0x0301*/
254  0x03,
255  0x00, /* bAssocTerminal */
256  0x02, /* bSourceID */
257  0x00, /* iTerminal */
258  /* 09 byte*/
259 
260  /* USB Speaker Standard AS Interface Descriptor - Audio Streaming Zero Bandwith */
261  /* Interface 1, Alternate Setting 0 */
262  AUDIO_INTERFACE_DESC_SIZE, /* bLength */
263  USB_INTERFACE_DESCRIPTOR_TYPE, /* bDescriptorType */
264  0x01, /* bInterfaceNumber */
265  0x00, /* bAlternateSetting */
266  0x00, /* bNumEndpoints */
267  USB_DEVICE_CLASS_AUDIO, /* bInterfaceClass */
268  AUDIO_SUBCLASS_AUDIOSTREAMING, /* bInterfaceSubClass */
269  AUDIO_PROTOCOL_UNDEFINED, /* bInterfaceProtocol */
270  0x00, /* iInterface */
271  /* 09 byte*/
272 
273  /* USB Speaker Standard AS Interface Descriptor - Audio Streaming Operational */
274  /* Interface 1, Alternate Setting 1 */
275  AUDIO_INTERFACE_DESC_SIZE, /* bLength */
276  USB_INTERFACE_DESCRIPTOR_TYPE, /* bDescriptorType */
277  0x01, /* bInterfaceNumber */
278  0x01, /* bAlternateSetting */
279  0x01, /* bNumEndpoints */
280  USB_DEVICE_CLASS_AUDIO, /* bInterfaceClass */
281  AUDIO_SUBCLASS_AUDIOSTREAMING, /* bInterfaceSubClass */
282  AUDIO_PROTOCOL_UNDEFINED, /* bInterfaceProtocol */
283  0x00, /* iInterface */
284  /* 09 byte*/
285 
286  /* USB Speaker Audio Streaming Interface Descriptor */
288  AUDIO_INTERFACE_DESCRIPTOR_TYPE, /* bDescriptorType */
289  AUDIO_STREAMING_GENERAL, /* bDescriptorSubtype */
290  0x01, /* bTerminalLink */
291  0x01, /* bDelay */
292  0x01, /* wFormatTag AUDIO_FORMAT_PCM 0x0001*/
293  0x00,
294  /* 07 byte*/
295 
296  /* USB Speaker Audio Type III Format Interface Descriptor */
297  0x0B, /* bLength */
298  AUDIO_INTERFACE_DESCRIPTOR_TYPE, /* bDescriptorType */
299  AUDIO_STREAMING_FORMAT_TYPE, /* bDescriptorSubtype */
300  AUDIO_FORMAT_TYPE_III, /* bFormatType */
301  0x02, /* bNrChannels */
302  0x02, /* bSubFrameSize : 2 Bytes per frame (16bits) */
303  16, /* bBitResolution (16-bits per sample) */
304  0x01, /* bSamFreqType only one frequency supported */
305  SAMPLE_FREQ(USBD_AUDIO_FREQ), /* Audio sampling frequency coded on 3 bytes */
306  /* 11 byte*/
307 
308  /* Endpoint 1 - Standard Descriptor */
309  AUDIO_STANDARD_ENDPOINT_DESC_SIZE, /* bLength */
310  USB_ENDPOINT_DESCRIPTOR_TYPE, /* bDescriptorType */
311  AUDIO_OUT_EP, /* bEndpointAddress 1 out endpoint*/
312  USB_ENDPOINT_TYPE_ISOCHRONOUS, /* bmAttributes */
313  AUDIO_PACKET_SZE(USBD_AUDIO_FREQ), /* wMaxPacketSize in Bytes (Freq(Samples)*2(Stereo)*2(HalfWord)) */
314  0x01, /* bInterval */
315  0x00, /* bRefresh */
316  0x00, /* bSynchAddress */
317  /* 09 byte*/
318 
319  /* Endpoint - Audio Streaming Descriptor*/
321  AUDIO_ENDPOINT_DESCRIPTOR_TYPE, /* bDescriptorType */
322  AUDIO_ENDPOINT_GENERAL, /* bDescriptor */
323  0x00, /* bmAttributes */
324  0x00, /* bLockDelayUnits */
325  0x00, /* wLockDelay */
326  0x00,
327  /* 07 byte*/
328 } ;
329 
345 static uint8_t usbd_audio_Init (void *pdev,
346  uint8_t cfgidx)
347 {
348  /* Open EP OUT */
349  DCD_EP_Open(pdev,
350  AUDIO_OUT_EP,
353 
354  /* Initialize the Audio output Hardware layer */
355  if (AUDIO_OUT_fops.Init(USBD_AUDIO_FREQ, DEFAULT_VOLUME, 0) != USBD_OK)
356  {
357  return USBD_FAIL;
358  }
359 
360  /* Prepare Out endpoint to receive audio data */
361  DCD_EP_PrepareRx(pdev,
362  AUDIO_OUT_EP,
363  (uint8_t*)IsocOutBuff,
365 
366  return USBD_OK;
367 }
368 
376 static uint8_t usbd_audio_DeInit (void *pdev,
377  uint8_t cfgidx)
378 {
379  DCD_EP_Close (pdev , AUDIO_OUT_EP);
380 
381  /* DeInitialize the Audio output Hardware layer */
382  if (AUDIO_OUT_fops.DeInit(0) != USBD_OK)
383  {
384  return USBD_FAIL;
385  }
386 
387  return USBD_OK;
388 }
389 
397 static uint8_t usbd_audio_Setup (void *pdev,
398  USB_SETUP_REQ *req)
399 {
400  uint16_t len=USB_AUDIO_DESC_SIZ;
401  uint8_t *pbuf=usbd_audio_CfgDesc + 18;
402 
403  switch (req->bmRequest & USB_REQ_TYPE_MASK)
404  {
405  /* AUDIO Class Requests -------------------------------*/
406  case USB_REQ_TYPE_CLASS :
407  switch (req->bRequest)
408  {
409  case AUDIO_REQ_GET_CUR:
410  AUDIO_Req_GetCurrent(pdev, req);
411  break;
412 
413  case AUDIO_REQ_SET_CUR:
414  AUDIO_Req_SetCurrent(pdev, req);
415  break;
416 
417  default:
418  USBD_CtlError (pdev, req);
419  return USBD_FAIL;
420  }
421  break;
422 
423  /* Standard Requests -------------------------------*/
425  switch (req->bRequest)
426  {
428  if( (req->wValue >> 8) == AUDIO_DESCRIPTOR_TYPE)
429  {
430 #ifdef USB_OTG_HS_INTERNAL_DMA_ENABLED
431  pbuf = usbd_audio_Desc;
432 #else
433  pbuf = usbd_audio_CfgDesc + 18;
434 #endif
435  len = MIN(USB_AUDIO_DESC_SIZ , req->wLength);
436  }
437 
438  USBD_CtlSendData (pdev,
439  pbuf,
440  len);
441  break;
442 
443  case USB_REQ_GET_INTERFACE :
444  USBD_CtlSendData (pdev,
445  (uint8_t *)&usbd_audio_AltSet,
446  1);
447  break;
448 
449  case USB_REQ_SET_INTERFACE :
450  if ((uint8_t)(req->wValue) < AUDIO_TOTAL_IF_NUM)
451  {
452  usbd_audio_AltSet = (uint8_t)(req->wValue);
453  }
454  else
455  {
456  /* Call the error management function (command will be nacked */
457  USBD_CtlError (pdev, req);
458  }
459  break;
460  }
461  }
462  return USBD_OK;
463 }
464 
471 static uint8_t usbd_audio_EP0_RxReady (void *pdev)
472 {
473  /* Check if an AudioControl request has been issued */
475  {/* In this driver, to simplify code, only SET_CUR request is managed */
476  /* Check for which addressed unit the AudioControl request has been issued */
478  {/* In this driver, to simplify code, only one unit is manage */
479  /* Call the audio interface mute function */
481 
482  /* Reset the AudioCtlCmd variable to prevent re-entering this function */
483  AudioCtlCmd = 0;
484  AudioCtlLen = 0;
485  }
486  }
487 
488  return USBD_OK;
489 }
490 
498 static uint8_t usbd_audio_DataIn (void *pdev, uint8_t epnum)
499 {
500  return USBD_OK;
501 }
502 
510 static uint8_t usbd_audio_DataOut (void *pdev, uint8_t epnum)
511 {
512  if (epnum == AUDIO_OUT_EP)
513  {
514  /* Increment the Buffer pointer or roll it back when all buffers are full */
516  {/* All buffers are full: roll back */
518  }
519  else
520  {/* Increment the buffer pointer */
522  }
523 
524  /* Toggle the frame index */
525  ((USB_OTG_CORE_HANDLE*)pdev)->dev.out_ep[epnum].even_odd_frame =
526  (((USB_OTG_CORE_HANDLE*)pdev)->dev.out_ep[epnum].even_odd_frame)? 0:1;
527 
528  /* Prepare Out endpoint to receive next audio packet */
529  DCD_EP_PrepareRx(pdev,
530  AUDIO_OUT_EP,
531  (uint8_t*)(IsocOutWrPtr),
533 
534  /* Trigger the start of streaming only when half buffer is full */
535  if ((PlayFlag == 0) && (IsocOutWrPtr >= (IsocOutBuff + ((AUDIO_OUT_PACKET * OUT_PACKET_NUM) / 2))))
536  {
537  /* Enable start of Streaming */
538  PlayFlag = 1;
539  }
540  }
541 
542  return USBD_OK;
543 }
544 
552 static uint8_t usbd_audio_SOF (void *pdev)
553 {
554  /* Check if there are available data in stream buffer.
555  In this function, a single variable (PlayFlag) is used to avoid software delays.
556  The play operation must be executed as soon as possible after the SOF detection. */
557  if (PlayFlag)
558  {
559  /* Start playing received packet */
560  AUDIO_OUT_fops.AudioCmd((uint8_t*)(IsocOutRdPtr), /* Samples buffer pointer */
561  AUDIO_OUT_PACKET, /* Number of samples in Bytes */
562  AUDIO_CMD_PLAY); /* Command to be processed */
563 
564  /* Increment the Buffer pointer or roll it back when all buffers all full */
566  {/* Roll back to the start of buffer */
568  }
569  else
570  {/* Increment to the next sub-buffer */
572  }
573 
574  /* If all available buffers have been consumed, stop playing */
575  if (IsocOutRdPtr == IsocOutWrPtr)
576  {
577  /* Pause the audio stream */
578  AUDIO_OUT_fops.AudioCmd((uint8_t*)(IsocOutBuff), /* Samples buffer pointer */
579  AUDIO_OUT_PACKET, /* Number of samples in Bytes */
580  AUDIO_CMD_PAUSE); /* Command to be processed */
581 
582  /* Stop entering play loop */
583  PlayFlag = 0;
584 
585  /* Reset buffer pointers */
588  }
589  }
590 
591  return USBD_OK;
592 }
593 
600 static uint8_t usbd_audio_OUT_Incplt (void *pdev)
601 {
602  return USBD_OK;
603 }
604 
605 /******************************************************************************
606  AUDIO Class requests management
607 ******************************************************************************/
615 static void AUDIO_Req_GetCurrent(void *pdev, USB_SETUP_REQ *req)
616 {
617  /* Send the current mute state */
618  USBD_CtlSendData (pdev,
619  AudioCtl,
620  req->wLength);
621 }
622 
630 static void AUDIO_Req_SetCurrent(void *pdev, USB_SETUP_REQ *req)
631 {
632  if (req->wLength)
633  {
634  /* Prepare the reception of the buffer over EP0 */
635  USBD_CtlPrepareRx (pdev,
636  AudioCtl,
637  req->wLength);
638 
639  /* Set the global variables indicating current request and its length
640  to the function usbd_audio_EP0_RxReady() which will process the request */
641  AudioCtlCmd = AUDIO_REQ_SET_CUR; /* Set the request value */
642  AudioCtlLen = req->wLength; /* Set the request data length */
643  AudioCtlUnit = HIBYTE(req->wIndex); /* Set the request target unit */
644  }
645 }
646 
654 static uint8_t *USBD_audio_GetCfgDesc (uint8_t speed, uint16_t *length)
655 {
656  *length = sizeof (usbd_audio_CfgDesc);
657  return usbd_audio_CfgDesc;
658 }
671 /************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/
void USBD_CtlError(USB_OTG_CORE_HANDLE *pdev, USB_SETUP_REQ *req)
USBD_CtlError Handle USB low level Error.
Definition: usbd_req.c:813
#define USB_REQ_TYPE_STANDARD
Definition: usbd_def.h:67
#define AUDIO_OUT_PACKET
static uint32_t PlayFlag
uint8_t(* AudioCmd)(uint8_t *pbuf, uint32_t size, uint8_t cmd)
#define AUDIO_SUBCLASS_AUDIOCONTROL
uint32_t DCD_EP_Close(USB_OTG_CORE_HANDLE *pdev, uint8_t ep_addr)
called when an EP is disabled
Definition: usb_dcd.c:204
#define AUDIO_INTERFACE_DESC_SIZE
static uint8_t usbd_audio_EP0_RxReady(void *pdev)
usbd_audio_EP0_RxReady Handles audio control requests data.
#define AUDIO_REQ_SET_CUR
#define USB_OTG_EP_ISOC
Definition: usb_dcd.h:50
#define AUDIO_PACKET_SZE(frq)
static uint8_t usbd_audio_DeInit(void *pdev, uint8_t cfgidx)
usbd_audio_Init DeInitializes the AUDIO layer.
static __IO uint32_t usbd_audio_AltSet
uint32_t AudioCtlLen
#define USB_REQ_TYPE_CLASS
Definition: usbd_def.h:68
USBD_Status USBD_CtlSendData(USB_OTG_CORE_HANDLE *pdev, uint8_t *buf, uint16_t len)
USBD_CtlSendData send data on the ctl pipe.
Definition: usbd_ioreq.c:95
#define AUDIO_FORMAT_TYPE_III
#define USB_REQ_SET_INTERFACE
Definition: usbd_def.h:86
#define USB_REQ_GET_INTERFACE
Definition: usbd_def.h:85
#define AUDIO_STREAMING_ENDPOINT_DESC_SIZE
#define USB_DEVICE_CLASS_AUDIO
#define AUDIO_ENDPOINT_GENERAL
static uint8_t usbd_audio_DataOut(void *pdev, uint8_t epnum)
usbd_audio_DataOut Handles the Audio Out data stage.
#define AUDIO_SUBCLASS_AUDIOSTREAMING
#define AUDIO_OUT_STREAMING_CTRL
#define OUT_PACKET_NUM
#define AUDIO_DESCRIPTOR_TYPE
static uint8_t usbd_audio_OUT_Incplt(void *pdev)
usbd_audio_OUT_Incplt Handles the iso out incomplete event.
#define AUDIO_STREAMING_INTERFACE_DESC_SIZE
#define AUDIO_PROTOCOL_UNDEFINED
#define MIN(a, b)
Definition: usb_defines.h:178
#define USB_CONFIGURATION_DESCRIPTOR_TYPE
Definition: usbd_cdc_core.h:56
#define TOTAL_OUT_BUF_SIZE
#define USB_ENDPOINT_TYPE_ISOCHRONOUS
#define __IO
Definition: core_cm0.h:198
uint16_t wIndex
Definition: usb_core.h:185
uint32_t DCD_EP_Open(USB_OTG_CORE_HANDLE *pdev, uint8_t ep_addr, uint16_t ep_mps, uint8_t ep_type)
Configure an EP.
Definition: usb_dcd.c:165
USBD_Status USBD_CtlPrepareRx(USB_OTG_CORE_HANDLE *pdev, uint8_t *pbuf, uint16_t len)
USBD_CtlPrepareRx receive data on the ctl pipe.
Definition: usbd_ioreq.c:138
static void AUDIO_Req_GetCurrent(void *pdev, USB_SETUP_REQ *req)
AUDIO_Req_GetCurrent Handles the GET_CUR Audio control request.
#define AUDIO_REQ_GET_CUR
static uint8_t * USBD_audio_GetCfgDesc(uint8_t speed, uint16_t *length)
USBD_audio_GetCfgDesc Returns configuration descriptor.
#define AUDIO_INTERFACE_DESCRIPTOR_TYPE
#define AUDIO_STANDARD_ENDPOINT_DESC_SIZE
#define SAMPLE_FREQ(frq)
#define USB_INTERFACE_DESCRIPTOR_TYPE
Definition: usbd_cdc_core.h:58
uint8_t(* Init)(uint32_t AudioFreq, uint32_t Volume, uint32_t options)
static uint8_t usbd_audio_Init(void *pdev, uint8_t cfgidx)
usbd_audio_Init Initilaizes the AUDIO interface.
AUDIO_FOPS_TypeDef AUDIO_OUT_fops
#define USB_REQ_GET_DESCRIPTOR
Definition: usbd_def.h:81
uint8_t bmRequest
Definition: usb_core.h:182
#define USB_AUDIO_DESC_SIZ
uint32_t DCD_EP_PrepareRx(USB_OTG_CORE_HANDLE *pdev, uint8_t ep_addr, uint8_t *pbuf, uint16_t buf_len)
DCD_EP_PrepareRx.
Definition: usb_dcd.c:231
#define AUDIO_CONTROL_FEATURE_UNIT
#define AUDIO_CONTROL_HEADER
uint8_t IsocOutBuff[TOTAL_OUT_BUF_SIZE *2]
#define AUDIO_INPUT_TERMINAL_DESC_SIZE
#define AUDIO_CONTROL_OUTPUT_TERMINAL
static uint8_t usbd_audio_DataIn(void *pdev, uint8_t epnum)
usbd_audio_DataIn Handles the audio IN data stage.
uint16_t wLength
Definition: usb_core.h:186
uint8_t * IsocOutRdPtr
uint8_t bRequest
Definition: usb_core.h:183
#define AUDIO_CONFIG_DESC_SIZE
static void AUDIO_Req_SetCurrent(void *pdev, USB_SETUP_REQ *req)
AUDIO_Req_SetCurrent Handles the SET_CUR Audio control request.
#define NULL
Definition: usbd_def.h:50
#define AUDIO_STREAMING_GENERAL
#define HIBYTE(x)
Definition: usbd_def.h:126
#define LOBYTE(x)
Definition: usbd_def.h:125
static uint8_t usbd_audio_Setup(void *pdev, USB_SETUP_REQ *req)
usbd_audio_Setup Handles the Audio control request parsing.
header file for the usbd_audio_out_if.c file.
#define USB_ENDPOINT_DESCRIPTOR_TYPE
Definition: usbd_cdc_core.h:59
header file for the usbd_audio_core.c file.
#define AUDIO_ENDPOINT_DESCRIPTOR_TYPE
#define AUDIO_STREAMING_FORMAT_TYPE
#define AUDIO_CONTROL_INPUT_TERMINAL
uint8_t(* DeInit)(uint32_t options)
uint8_t AudioCtl[64]
uint8_t * IsocOutWrPtr
#define USB_REQ_TYPE_MASK
Definition: usbd_def.h:70
uint8_t AudioCtlUnit
USBD_Class_cb_TypeDef AUDIO_cb
uint8_t AudioCtlCmd
uint16_t wValue
Definition: usb_core.h:184
static uint8_t usbd_audio_CfgDesc[AUDIO_CONFIG_DESC_SIZE]
#define AUDIO_CONTROL_MUTE
uint8_t(* MuteCtl)(uint8_t cmd)
static uint8_t usbd_audio_SOF(void *pdev)
usbd_audio_SOF Handles the SOF event (data buffer update and synchronization).


rosflight_firmware
Author(s): Daniel Koch , James Jackson
autogenerated on Thu Apr 15 2021 05:07:50