1.Created a composite device for CDC and MicPhone. When the registration of mic SOF is interrupted, the device may not recognize the issue
ret = app_usbd_audio_sof_interrupt_register(class_inst_mic, mic_sof_ev_handler);
static void mic_sof_ev_handler(uint16_t framecnt)
{
UNUSED_VARIABLE(framecnt);
// make sure we're in proper state (configured)
if (APP_USBD_STATE_Configured != app_usbd_core_state_get())
{
NRF_LOG_INFO("config error");
NRF_LOG_FLUSH();
return;
}
}
2.Not use app_usbd_audio_sof_interrupt_register to register mic sof, the device can be found in pc with micphone and cdc. However, transfer is not fine with app_usbd_audio_class_tx_start, the data isn't complete and occur BUSY(ret = 17)
app_usbd_audio_class_tx_start(&m_app_audio_microphone.base, m_temp_buffer, sizeof(m_temp_buffer));