none
How to find the address of the buffer that the request object describes by using WdfDmaTransactionInitializeUsingRequest? RRS feed

  • Question

  • I used WdfDmaTransactionInitializeUsingRequest to initialize my DMA transaction.

    status = WdfDmaTransactionInitializeUsingRequest(
    dmaTransaction,
    Request,
    qd41EvtProgramDma,
    WdfDmaDirectionReadFromDevice);

    As you know, in qd41EvtProgramDma I should set a destination address register of DMA controller.

    I try to use sglist to get the address of the buffer that the request object describes,as following:

    deviceContext->Dma_address = SgList->Elements[0].Address.LowPart;
    deviceContext->Dma_length = SgList->Elements[0].Length;

    Is this a correct idea? Thanks for your help!

    NOTICE:my dma hardware does not support Scatter/Gather.

    Monday, November 2, 2015 4:40 AM