Partager via


DMA Abstraction Layer (Compact 2013)

3/26/2014

Windows Embedded Compact 2013 includes a direct memory access (DMA) abstraction library with which you can implement DMA support in a bus-independent manner. The purpose of the DMA abstraction library is to create an interface with which a device driver developer can implement DMA support, and also to provide an interface for platform-dependent DMA handler routines. By using the DMA abstraction library functions you can use an onboard or built-in DMA controller through a chip-specific DMA driver that works with a standard set of bus-independent DMA functions.

The DMA abstraction framework is made up of three components:

  • The DMA model device driver (MDD)
  • The DMA platform dependent driver (PDD)
  • The DMA abstraction functions of CEDDK.dll

CEDDK.dll forwards all function requests to the DMA driver by using IOCTLs. The following table lists the CEDDK.dll functions that are included in the DMA abstraction layer.

Function

Description

DMAAllocateChannel

Prepares the system for a DMA operation on behalf of the target device.

DMAFreeChannel

Frees a DMA channel buffer that DMAAllocateChannel allocated, together with all the resources that the DMA channel uses to transfer data.

DMAOpenBuffer

Maps a virtual buffer to a physical DMA block.

DMAGetAdapter

Returns the length and physical address of a DMA buffer block that DMAOpenBuffer creates.

DMAGetBufferPhysAddr

Returns the length and physical address of a DMA buffer block that DMAOpenBuffer creates to map a virtual buffer to physical memory.

DMAFlushBlockBuffer

Manually flushes the DMA buffer block to regain cache coherency.

DMACloseBuffer

Frees all resources that DMAOpenBuffer allocates to map a virtual buffer to a physical DMA block.

DMAStartTransfer

Puts a DMA transfer into auto start mode.

DMAIssueMultiBufferTransfer

Queues multiple DMA transfer requests.

DMAIssueRawTransfer

Sets up map descriptor registers for a channel to map a DMA channel from a locked buffer. This function fails if other DMA transfers are queued in the DMA channel.

DMAIssueTransfer

Sets up map descriptor registers for a channel to map a DMA transfer from a locked buffer. If other DMA transfers are queued in the DMA channel, this function queues this transfer.

DMARawTransferControl

Directly controls hardware-mapped DMA transfers, unless the transfer is already completed or is not queued.

DMATransferOnBlocks

Starts a subordinate DMA transfer that uses an associated memory block.

DMAGetStatus

Gets the current active or queued DMA transfer status.

DMAGetContexts

Retrieves DMA transfer object context values.

DMACancelTransfer

Cancels an active DMA transfer.

DMACloseTransfer

Closes a DMA transfer and releases all related resources.

For more information about these functions, see the reference information for each function.

See Also

Concepts

Support Direct Memory Access