打印
[应用相关]

usb音频功能的问题

[复制链接]
1819|2
手机看帖
扫描二维码
随时随地手机跟帖
跳转到指定楼层
楼主
dkill|  楼主 | 2008-7-10 16:51 | 只看该作者 回帖奖励 |倒序浏览 |阅读模式
做usb音频功放的例子:(usb例程)
  不解的问题:
    想知道是怎么实现采样一致的,在发送端以22khz的频率中断接受数据,但是不解的是usb接受的也应该是相同采样下来的吗  还是?
沙发
dkill|  楼主 | 2008-7-10 19:03 | 只看该作者

pbUsrBuf++;

void PMAToUserBufferCopy(u8 *pbUsrBuf, u16 wPMABufAddr, u16 wNBytes)
{
  u32 n = (wNBytes + 1) >> 1;/* /2*/
  u32 i;
  u32 *pdwVal;
  pdwVal = (u32 *)(wPMABufAddr * 2 + PMAAddr);
  for (i = n; i != 0; i--)
  {
    *(u16*)pbUsrBuf++ = *pdwVal++;
    pbUsrBuf++;
  }
}
为什么pbUsrBuf++;还要加一

使用特权

评论回复
板凳
香水城| | 2008-7-10 21:34 | 只看该作者

20.5.3 Buffer descriptor table

Although the buffer descriptor table is located inside the packet buffer memory, its entries can be considered as additional registers used to configure the location and size of the packet buffers used to exchange data between the USB macro cell and the STM32F10xxx. Due to the common APB bridge limitation on word addressability, all packet memory locations are accessed by the APB using 32-bit aligned addresses, instead of the actual memory location addresses utilized by the USB peripheral for the USB_BTABLE register and buffer description table locations.
相关链接:http://www.st.com/stonline/products/literature/rm/13902.pdf

使用特权

评论回复
发新帖 我要提问
您需要登录后才可以回帖 登录 | 注册

本版积分规则

62

主题

201

帖子

0

粉丝