alambe94 / I-CUBE-USBD-Composite

Create STM32 USB Composite devices with ease.
MIT License
142 stars 30 forks source link

How to send Mic Data? #28

Open MrFreekstorm opened 1 year ago

MrFreekstorm commented 1 year ago

This is probably a noob question and I've only just started to try to use USB, so please bear with me.

The file usbd_audio_mic_if.c/h has lots of stubs that don't do anything. If I breakpoint them I can see them being called, this is fine, this allows me to hook can do various things.

But how do I send the audio data.? In usbd_aucio_mic.c there is a function uint8_t USBD_AUDIO_MIC_Data_Transfer(USBD_HandleTypeDef *pdev, int16_t *audioData, uint16_t PCMSamples) Which looks like the right one, but how do I find a reference to USBD_HandleTypeDef *pdev ?

Please can you tell me how to send the data? Thank you.