The MCUXpresso SDK provides a peripheral driver for the SMART DMA module of MCUXpresso SDK devices.
typedef void(* smartdma_callback_t)(void *param) |
void SMARTDMA_Init |
( |
uint32_t |
apiMemAddr, |
|
|
const void * |
firmware, |
|
|
uint32_t |
firmwareSizeByte |
|
) |
| |
void SMARTDMA_InitWithoutFirmware |
( |
void |
| ) |
|
void SMARTDMA_InstallFirmware |
( |
uint32_t |
apiMemAddr, |
|
|
const void * |
firmware, |
|
|
uint32_t |
firmwareSizeByte |
|
) |
| |
- Parameters
-
apiMemAddr | The address firmware will be copied to. |
firmware | The firmware to use. |
firmwareSizeByte | Size of firmware. |
- Note
- Only call this function when SMARTDMA is not busy.
- Parameters
-
callback | The callback called when smartdma program finished. |
param | Parameter for the callback. |
- Note
- Only call this function when SMARTDMA is not busy.
void SMARTDMA_Boot |
( |
uint32_t |
apiIndex, |
|
|
void * |
pParam, |
|
|
uint8_t |
mask |
|
) |
| |
- Parameters
-
apiIndex | Index of the API to call. |
pParam | Pointer to the parameter allocated by caller. |
mask | Value set to register SMARTDMA->ARM2EZH[0:1]. |
- Note
- Only call this function when SMARTDMA is not busy.
-
The memory *pParam shall not be freed before the SMARTDMA function finished.
void SMARTDMA_Boot1 |
( |
uint32_t |
apiIndex, |
|
|
const smartdma_param_t * |
pParam, |
|
|
uint8_t |
mask |
|
) |
| |
This function is similar with SMARTDMA_Boot, the only difference is, this function copies the *pParam to a local variable, upper layer can free the pParam's memory before the SMARTDMA execution finished, for example, upper layer can define the param as a local variable.
- Parameters
-
apiIndex | Index of the API to call. |
pParam | Pointer to the parameter. |
mask | Value set to SMARTDMA_ARM2SMARTDMA[0:1]. |
- Note
- Only call this function when SMARTDMA is not busy.