阅读:1136回复:1
求教用windriver进行8237DMA编程的问题
按照帮助中的例子:
WD_DMA dma; BZERO(dma) dma.dwbytes = 20 * 4096; // 20 pages dma.dwOptions = DMA_KERNEL_BUFFER_ALLOC; WD_DMALock(hWD, &dma); if (dma.hDma==0) printf(\"Failed allocating kernel buffer for DMA\\n\"); else { // On return dma.pUserAddr is the user mode virtual // mapping of the allocated memory. // dma.Page[0].pPhysicalAddr points to the allocated // physical addresses. } 若每次传送字节不超过一页,怎样确定页面地址,高位地址,低位地址? 本人初学,请说详细点,最好有例子代码,谢谢! |
|
沙发#
发布于:2002-07-09 14:50
是不是把dma.Page[0].pPhysicalAddr分三部分?
|
|