ywb
ywb
驱动牛犊
驱动牛犊
  • 注册日期2002-05-24
  • 最后登录2010-06-13
  • 粉丝0
  • 关注0
  • 积分0分
  • 威望0点
  • 贡献值0点
  • 好评度0点
  • 原创分0分
  • 专家分0分
阅读:963回复:0

dma的初级问题

楼主#
更多 发布于:2004-02-14 10:59
我用DriverWorks编的驱动,用的是Cy7c09449
我的问题是传输的回调函数怎么编
#if 1 // new way
while (pXfer->SequenceTransferDescriptors(&ptd)) {
// program the h/w using  ppTD
t << " Physical address 0x" << ptd->td_PhysAddr.LowPart << ". Length is 0x"
<< ptd->td_Length << "." << EOL;
}

#else // old way
ULONG nTds = pXfer->GetTransferDescriptors(&ptd);

t << "nTds = " << nTds  << EOL;
for (ULONG ii=0; ii < nTds; ii++)
t << " Physical address 0x" << ptd[ii].td_PhysAddr.LowPart << ". Length is 0x"
<< ptd[ii].td_Length << "." << EOL;
#endif // new/old way

这一步我已经调试得到,问题是后面我要做什么,才能完成这个DMA,如果什么都不做的话,我的程序就死机了,烦请各位大哥大姐百忙中不吝指教
游客

返回顶部