cancel
Showing results for 
Search instead for 
Did you mean: 

USB DEVICE Audio generated code MX vs UAC1 extension code. Where found Appnote or an step by step ? Why 24bit dont works when user config changed?

MM..1
Chief II

I generate CubeMX project with selected USB FS DEVICE Audio

part of IF code

/** @defgroup USBD_AUDIO_IF_Private_FunctionPrototypes USBD_AUDIO_IF_Private_FunctionPrototypes
  * @brief Private functions declaration.
  * @{
  */
 
static int8_t AUDIO_Init_FS(uint32_t AudioFreq, uint32_t Volume, uint32_t options);
static int8_t AUDIO_DeInit_FS(uint32_t options);
static int8_t AUDIO_AudioCmd_FS(uint8_t* pbuf, uint32_t size, uint8_t cmd);
static int8_t AUDIO_VolumeCtl_FS(uint8_t vol);
static int8_t AUDIO_MuteCtl_FS(uint8_t cmd);
static int8_t AUDIO_PeriodicTC_FS(uint8_t *pbuf, uint32_t size, uint8_t cmd);
static int8_t AUDIO_GetState_FS(void);
 
/* USER CODE BEGIN PRIVATE_FUNCTIONS_DECLARATION */
 
/* USER CODE END PRIVATE_FUNCTIONS_DECLARATION */
 
/**
  * @}
  */
 
USBD_AUDIO_ItfTypeDef USBD_AUDIO_fops_FS =
{
  AUDIO_Init_FS,
  AUDIO_DeInit_FS,
  AUDIO_AudioCmd_FS,
  AUDIO_VolumeCtl_FS,
  AUDIO_MuteCtl_FS,
  AUDIO_PeriodicTC_FS,
  AUDIO_GetState_FS,
};
 
 

build run and windows detect it but drivr hang ... code is empty.

Then i compare with USB Extension UAC zip code

#include "usbd_audio_if.h"
 
/* Private typedef -----------------------------------------------------------*/
 
/* Private macro -------------------------------------------------------------*/
/* Private function prototypes -----------------------------------------------*/
static int8_t  AUDIO_USB_Init(USBD_AUDIO_FunctionDescriptionfTypeDef* usb_audio_class_function, uint32_t private_data);
static int8_t  AUDIO_USB_DeInit(USBD_AUDIO_FunctionDescriptionfTypeDef* audio_function, uint32_t private_data);
static int8_t  AUDIO_USB_GetState(uint32_t private_data);
static int8_t  AUDIO_USB_GetConfigDesc (uint8_t ** pdata, uint16_t * psize, uint32_t private_data);
/* exported  variable ---------------------------------------------------------*/

here function isnt empty. And is some more files here.

Have ST an documentation how migrate this two codes to one ?

0 REPLIES 0