导航: 老古网老古论坛XMOS公共讨论区XMOS开源项目区单片机程序设计嵌入式系统广告区域
→XMOS USB Audio 代码中从 XUD 提取出 au[hellopossibility]

 *第63509篇: XMOS USB Audio 代码中从 XUD 提取出 audio sample data 方法

  
楼 主:hellopossibility 2014年7月25日13:00
 XMOS USB Audio 代码中从 XUD 提取出 audio sample data 方法
关键是 buffer.xc 中的这一句使 audio out endpoint 能够被 decouple core 使用,decouple core 中直接用 XUD 标准函数来读数据存入数据 buffer 中:
/* Store EP's to globals so that decouple() can access them */
asm("stw %0, dp[aud_from_host_usb_ep]"::"r"(ep_aud_out));
 
So when received Audio packet HOST ->   DEVICE by the code below, the data should be on the EP first.
XUD_GetData_Select(c_aud_out, ep_aud_out, length, result):
 
Then very soon in the decouple core, the same EP will be set as ready to receive data, and store the audio sample data into the real outAudioBuff in the decouple core.
XUD_SetReady_OutPtr(aud_from_host_usb_ep, aud_from_host_wrptr+4);

>>>>>>对该主题发表你的看法

本主题贴数1,分页: [第1页]


[上一篇主题]:[原创]SPI\TTL\单片机直接读写U盘技术

[下一篇主题]:与嵌入式新手分享Linux内核编码风格(一)