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

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

   hellopossibility 
hellopossibility发表的帖子 

 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);


发表时间:2014年7月25日13:00:43

  
回复该帖

本主题共有 1 帖,分页:>>>>>该主题的所有内容[1]条

 *树形目录 只列出部分跟帖的标题以及简单的摘要信息 该主题的部分跟帖如下:

[上一篇帖子]:[原创]SPI\TTL\单片机直接读写U盘技术单片机读写U盘就是USB HOST接口模块,
[下一篇帖子]:与嵌入式新手分享Linux内核编码风格(一) /P P 这是一份简短的,描述linux