Необходимо по юсб принять аудиопоток на стм. Собрал в CubeMX проект, потом подправил дескрипторы под 48kHz, 24bit, увеличил стек и кучу чтоб все завелось.
Устройство в виндовсе определяется без ошибок, аудио выплёвывает.
Теперь вопрос, а где эти данные искать в микроконтроллере?!? В описании библиотеки:
Цитата
How to use this driver
This driver uses an abstraction layer for hardware driver (i.e. HW Codec, I2S interface, I2C
control interface...). This abstraction is performed through a lower layer (i.e.
usbd_audio_if.c) which you can modify depending on the hardware available for your
application.
To use this driver:
Through the file usbd_conf.h, you can configure:
• The audio sampling rate (define USBD_AUDIO_FREQ)
Call the function USBD_AUDIO_Init() at startup to configure all necessary firmware and
hardware components (application-specific hardware configuration functions are also called
by this function). The hardware components are managed by a lower layer interface (i.e.
usbd_audio_if.c) and can be modified by user depending on the application needs.
The entire transfer is managed by the following functions (no need for user to call any
function for out transfers):
• usbd_audio_DataIn() and usbd_audio_DataOut() which update the audio buffers with
the received or transmitted data. For Out transfers, when data are received, they are
directly copied into the audiobuffer and the write buffer (wr_ptr) is incremented.
The Audio Control requests are managed by the functions USBD_AUDIO_Setup() and
USBD_AUDIO_EP0_RxReady(). These functions route the Audio Control requests to the
lower layer (i.e. usbd_audio_if.c). In the current version, only SET_CUR and GET_CUR
requests are managed and are used for mute control only.
This driver uses an abstraction layer for hardware driver (i.e. HW Codec, I2S interface, I2C
control interface...). This abstraction is performed through a lower layer (i.e.
usbd_audio_if.c) which you can modify depending on the hardware available for your
application.
To use this driver:
Through the file usbd_conf.h, you can configure:
• The audio sampling rate (define USBD_AUDIO_FREQ)
Call the function USBD_AUDIO_Init() at startup to configure all necessary firmware and
hardware components (application-specific hardware configuration functions are also called
by this function). The hardware components are managed by a lower layer interface (i.e.
usbd_audio_if.c) and can be modified by user depending on the application needs.
The entire transfer is managed by the following functions (no need for user to call any
function for out transfers):
• usbd_audio_DataIn() and usbd_audio_DataOut() which update the audio buffers with
the received or transmitted data. For Out transfers, when data are received, they are
directly copied into the audiobuffer and the write buffer (wr_ptr) is incremented.
The Audio Control requests are managed by the functions USBD_AUDIO_Setup() and
USBD_AUDIO_EP0_RxReady(). These functions route the Audio Control requests to the
lower layer (i.e. usbd_audio_if.c). In the current version, only SET_CUR and GET_CUR
requests are managed and are used for mute control only.
Причём функция usbd_audio_DataIn пустая и программа в неё даже не заходит. Где искать этот самый audiobuffer?