<< Previous | Next >> | |
|
int DMAioe2mem( dma_chan_t handle, dma_addr_t dest, unsigned int src, unsigned int len, unsigned int flags );
Description
- This function performs an immediate DMA operation from external I/O to memory.
Parameters
- handle
- Handle for channel to use in transfer
- dest
- Memory destination address
- src
- External I/O location source address
- len
- Length to send (cannot equal zero)
- flags
- Various flag options.
DMA_F_INTERRUPT
indicates an interrupt will be triggered at the completion of the transfer. The interrupt vector and function must be set up in the user's code.
DMA_F_LAST_SPECIAL
(only for Ethernet or HDLC peripherals)
Internal Source: Status byte written to initial buffer descriptor before last data.
Internal Destination: Last byte written to offset address for frame termination.
All Others: no effect.
DMA_F_SRC_DEC
only for transfers with memory source. Indicates the source address should be decremented.
DMA_F_DEST_DEC
only for transfers with memory destination. Indicates the destination address should be incremented.
DMA_F_STOP_MATCH
indicates whether or not to stop the dma transfer when a character is reached. The match byte and mask should have previously been set by calling theDMAmatchSetup()
function.
DMA_F_TIMER
indicates the DMA timer will be used. The divisor should have already been set by calling theDMAtimerSetup()
function.
DMA_F_TIMER_1BPR
indicates that the timed transfers will send one byte per request instead of the entire descriptor
- Only one of the following flags (if any) should be set. They indicate that the DMA transfer is gated using the named pin:
- The following flags indicate the polarity of the gating signal:
Return Value
0
: Success
-EINVAL
: Invalid handle
-EBUSY
: Resources are busyLibrary
- DMA.LIB
See Also
- DMAmem2mem, DMAcompleted, DMAstop
Dynamic C Functions | << Previous | Next >> | rabbit.com |