MKM34Z256VLx7 Bare Metal Software Drivers  R4.1.6
Reference Manual
DMA API Specification

Overview

This section describes functions and macros of the driver's API.

Macros

#define DMA_Ack(ch)
 DMA channel transfer complete acknowledge. More...
 
#define DMA_IsCfgError(ch)
 DMA channel configuration error check. More...
 
#define DMA_IsRdError(ch)
 DMA channel bus error occurred during the read portion of a transfer. More...
 
#define DMA_IsWrError(ch)
 DMA channel bus error occurred during the write portion of a transfer. More...
 
#define DMA_IsDone(ch)
 DMA channel transfer complete check. More...
 
#define DMA_InstallCallback(ch, ip, callback)
 Installs callback function for specified DMA channel. More...
 
#define DMA_Init(ch, dma)
 DMA channel initialization. More...
 
#define DMA_AdvInit(ch, dma, chacr, umnsm)
 Advanced DMA channel initialization with access rights setting. More...
 

Macro Definition Documentation

#define DMA_Ack (   ch)

This macro acknowledges completed DMA channel transfer.

Parameters
chDMA0,DMA1,DMA2,DMA3.
Note
Implemented as an inline macro.
#define DMA_IsCfgError (   ch)

This macro checks DMA channel for configuration error.

Parameters
chDMA0,DMA1,DMA2,DMA3.
Returns
true (non-zero) channel configuration error occurred (call DMA_Ack to clear error condition),
false no configuration error exists.
Note
Implemented as an inline macro.
#define DMA_IsRdError (   ch)

This macro checks DMA channel for bus error during the read portion of a transfer.

Parameters
chDMA0,DMA1,DMA2,DMA3.
Returns
true (non-zero) bus error occurred during the read (call DMA_Ack to clear error condition),
false no bus error occurred.
Note
Implemented as an inline macro.
#define DMA_IsWrError (   ch)

This macro checks DMA channel for bus error during the write portion of a transfer.

Parameters
chDMA0,DMA1,DMA2,DMA3.
Returns
true (non-zero) bus error occurred during the write (call DMA_Ack to clear error condition),
false no bus error occurred.
Note
Implemented as an inline macro.
#define DMA_IsDone (   ch)

This macro checks DMA channel transfer complete.

Parameters
chDMA0,DMA1,DMA2,DMA3.
Returns
true (non-zero) channel DMA transfer completed call DMA_Ack to acknowledge the DMA transfer),
false DMA channel transfer is not yet complete.
Note
Implemented as an inline macro.
#define DMA_InstallCallback (   ch,
  ip,
  callback 
)

This function installs callback function for specified DMA channel.

Parameters
chDMA0,DMA1,DMA2,DMA3.
ipSelect one of the ARM Cortex-M0+ Interrupt Priority Levels.
callbackPointer to the DMA Callback Function.
Note
Implemented as a function call. A channel callback function must be installed before DMA channel is initialized using DMA_Init or DMA_AdvInit function.
See also
DMA_Init, DMA_AdvInit
#define DMA_Init (   ch,
  dma 
)

This function initializes specified DMA channel for data transfer.

Parameters
chDMA0,DMA1,DMA2,DMA3.
dmaStructure containing the initialization parameters DMA Configuration Structures
Note
Implemented as a function call. Initialize DMA channel after a channel callback function is installed using DMA_InstallCallback function.
See also
DMA_AdvInit, DMA_InstallCallback
#define DMA_AdvInit (   ch,
  dma,
  chacr,
  umnsm 
)

This function initializes specified DMA channel for data transfer. It also sets the access control attributes needed to reference the channel's transfer channel descriptor (TCDn) and defines the privileged/user and secure/nonsecure attributes for the DMA channel as it executes.

Parameters
chDMA0,DMA1,DMA2,DMA3.
dmaStructure containing the initialization parameters DMA Configuration Structures
chacrSelect one of the DMA Transfer Channel Descriptor (TCD) Access Attributes.
umnsmSelect one of the DMA Channel Access Attributes.
Note
Implemented as a function call. Initialize DMA channel after a channel callback function is installed using DMA_InstallCallback function.
See also
DMA_Init, DMA_InstallCallback