ADM-XRC SDK 2.8.1 User Guide (Linux)
© Copyright 2001-2009 Alpha Data
Prototype
ADMXRC_STATUS ADMXRC_DoDMAImmediate( ADMXRC_HANDLE Card, void* Buffer, unsigned long Length, DWORD Local, DWORD Direction, DWORD Channel, DWORD Mode, DWORD Flags, DWORD* Timeout, PHANDLE Event);
Arguments
Argument | Type | Purpose |
Card | In | Handle of card to configure |
Buffer | In | Pointer to application buffer |
Length | In | Number of bytes to transfer |
Local | In | Address of beginning of transfer on local bus |
Direction | In | Direction of DMA transfer |
Channel | In | DMA channel to use for the transfer |
DMAModeWord | In | Mode word to use for the DMA transfer |
Flags | In | Miscellaneous flags |
Timeout | In/out | Timeout for DMA transfer |
Event | In/out | Event to use to wait for completion |
Return value
Value | Meaning |
ADMXRC_SUCCESS | The DMA transfer was performed successfully |
ADMXRC_INVALID_HANDLE | Card is not a valid handle to a card |
ADMXRC_INVALID_PARAMETER | An invalid parameter was passed |
ADMXRC_DEVICE_BUSY | Could not begin DMA immediately as requested |
ADMXRC_NO_DMADESC | A DMA descriptor could not be allocated |
Description
This function behaves as a call to ADMXRC_SetupDMA followed by a call to ADMXRC_DoDMA followed by a call to ADMXRC_UnsetupDMA.
The Buffer and Length parameters effectively replace the DmaDesc, Offset and Length parameters from ADMXRC_DoDMA in specifying the region of application memory over which the DMA transfer takes place. The other parameters Local, Direction, Channel, DMAModeWord, Flags, Timeout and Event all function in the same way as in ADMXRC_DoDMA.
This function cannot guarantee deterministic runtime as the process of locking down a user buffer using ADMXRC_SetupDMA may require disk I/O for the operating system to make all pages of a user buffer resident in physical memory.