ADM-XRC SDK 2.8.1 User Guide (Linux)
© Copyright 2001-2009 Alpha Data
Prototype
ADMXRC2_STATUS ADMXRC2_DoDMAImmediate( ADMXRC2_HANDLE Card, void* Buffer, unsigned long Length, uint32_t Local, ADMXRC2_DMADIR Direction, unsigned int Channel, uint32_t DMAModeWord, uint32_t Flags, unsigned long* Timeout, void* Ignored);
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 |
Ignored | In | Pass NULL |
Return value
Value | Meaning |
ADMXRC2_SUCCESS | The DMA transfer was performed successfully |
ADMXRC2_INVALID_HANDLE | Card is not a valid handle to a card |
ADMXRC2_INVALID_PARAMETER | An invalid parameter was passed |
ADMXRC2_DEVICE_BUSY | Could not begin DMA immediately as requested |
ADMXRC2_NO_DMADESC | A DMA descriptor could not be allocated |
Description
This function behaves as a call to ADMXRC2_SetupDMA followed by a call to ADMXRC2_DoDMA followed by a call to ADMXRC2_UnsetupDMA.
The Buffer and Length parameters effectively replace the DmaDesc, Offset and Length parameters from ADMXRC2_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 Ignored all function in the same way as in ADMXRC2_DoDMA.
This function cannot guarantee deterministic runtime as the process of locking down a user buffer using ADMXRC2_SetupDMA may require disk I/O for the operating system to make all pages of a user buffer resident in physical memory.