STM32L55 USB microphone 4 channels using external I2S
Hi,
I have an external ADC connected to my STM32L55 using the I2S interface. The ADC is sampling 4-channel 16-bit data at 48000Hz sampling rate. However, I have encountered issues while streaming a large amount of data using USB CDC. Therefore, I am considering using the Audio device class to solve this problem. By doing so, I hope to make the PC recognize the 4 channels as 4 microphones and receive all the data without losing a single sample. I've configured my ADC as a master to ensure that there is always data for the STM32 to receive.
To begin with, I plan to modify the USB descriptor so that the PC can recognize the STM32 as a microphone. My question is whether I need to make more changes than just altering the descriptor. Do I need to properly fill in these functions?
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,
};
