
MOTOROLA
Appendix E. MPC8240 Drivers
E-3
E.1.3
DMA Application Program Interface (API)
API functions description
The DMA API function prototypes, defined return values, and enumerated input parameter
values are declared in drivers/dma/dma_export.h.
The functions are defined in the source file drivers/dma/dma1.c.
DMA_Status DMA_Initialize(int(*app_print_function)(char*,...));
app_print_function is the address of the optional application's print function,
otherwise NULL if not available
Return: DMA_Status return value is either DMA_SUCCESS or DMA_ERROR.
Description:
Configure the DMA driver prior to use, as follows:
The optional print function, if supplied by the application, must be similar to the C standard
library printf library function: accepts a format string and a variable number (zero or more)
of additional arguments. This optional function may be used by the library functions to
report error and status condition information. If no print function is supplied by the
application, the application must provide a NULL value for this parameter, in which case
the library will not attempt to access a print function.
NOTE
Each DMA transfer will be configured individually by the
function call that initiates the transfer. If it is desirable to
establish a default configuration, these could be added as
parameters. Alternately, the first (or most recent) transfer
configuration values could also be used to establish defaults.
This function call triggers the DMA library to read the eumbbar
so that it is available to the driver, so it is a requirement that the
application first call DMA_Initialize before starting any DMA
transfers. This could be eliminated if the other functions read
the eumbbar if it has not already been done.
DMA_Status DMA_direct_transfer( DMA_INTERRUPT_STEER int_steer,
DMA_TRANSFER_TYPE type,
unsigned int source,
unsigned int dest,
unsigned int len,
DMA_CHANNEL channel,
DMA_SNOOP_MODE snoop);
F
Freescale Semiconductor, Inc.
For More Information On This Product,
Go to: www.freescale.com
n
.