I’m implementing a KL25 USB device based on the following example:
Freescale_BM_USB_Stack_v5.0\Src\example\device\audio\generator
The example waits for enumeration, then calls USB_Class_Audio_Send_Data() in a loop. This appears to work fine unless the stack is not ready for the next packet (this depends on the host latency). I cannot find a callback or a method to poll that tells me it is safe to call USB_Class_Audio_Send_Data(). I think I can poll the OWN bit in the BDT, is there an easier way?
解決済! 解決策の投稿を見る。
Hi Deek,
For the Audio send/receive, there are two conditions needs before they can be called.
Hope that helps,
Have a great day,
Kan
-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------
Hi Deek,
I am sorry, but I dont understand "This appears to work fine unless the stack is not ready for the next packet (this depends on the host latency). " would you please explain your concern in details? Thanks for your patience!
Have a great day,
Kan
-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------
Kan,
Thanks for the reply. My question is the proper usage of USB_Class_Audio_Send_Data(). Does this call block until the data is sent, or do I need to wait for a notification that I can send more data? If I need to wait for a notification, is that USB_DEV_EVENT_SEND_COMPLETE or something else? The USB_Stack_Device_Reference_Manual.pdf is not clear.
Regards...
Hi Deek,
For the Audio send/receive, there are two conditions needs before they can be called.
Hope that helps,
Have a great day,
Kan
-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------