AM275 FreeRTOS SDK  11.00.00
All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros Modules Pages

Introduction

This module contains APIs to program and use DMA drivers available in the SoC with MCSPI.

Data Structures

struct  MCSPI_DmaFxns
 Driver implementation callbacks. More...
 
struct  MCSPI_DmaConfig
 MCSPI DMA Configuration, these are filled by SysCfg based on the DMA driver that is selected. More...
 

Functions

MCSPI_DmaHandle MCSPI_dmaOpen (int32_t dmaConfigIndex)
 API to open an MCSPI DMA channel. More...
 
int32_t MCSPI_dmaClose (MCSPI_Handle handle, const MCSPI_ChConfig *chCfg)
 API to close an MCSPI DMA channel. More...
 
int32_t MCSPI_dmaChInit (MCSPI_Handle handle, const MCSPI_ChConfig *chCfg, const MCSPI_DmaChConfig *dmaChCfg)
 API to init a DMA Channel opened. More...
 
int32_t MCSPI_dmaTransfer (MCSPI_Object *obj, MCSPI_ChObject *chObj, const MCSPI_Attrs *attrs, MCSPI_Transaction *transaction)
 API to do a DMA transfer using a specific DMA driver - UDMA, EDMA etc. More...
 
int32_t MCSPI_dmaStop (MCSPI_Object *obj, const MCSPI_Attrs *attrs, MCSPI_ChObject *chObj, uint32_t chNum)
 API to Stop DMA using a specific DMA driver - UDMA, EDMA etc. More...
 

Typedefs

typedef void * MCSPI_DmaHandle
 Handle to the MCSPI DMA Config Object returned by MCSPI_dmaOpen. More...
 
typedef int32_t(* MCSPI_dmaOpenFxn) (void *mcspiDmaArgs)
 Driver implementation to open a specific DMA driver channel - UDMA, EDMA etc. More...
 
typedef int32_t(* MCSPI_dmaCloseFxn) (MCSPI_Handle handle, const MCSPI_ChConfig *chCfg)
 Driver implementation to close a specific DMA driver channel - UDMA, EDMA etc. More...
 
typedef int32_t(* MCSPI_dmaChInitFxn) (MCSPI_Handle handle, const MCSPI_ChConfig *chCfg, const MCSPI_DmaChConfig *dmaChCfg)
 Driver implementation to init a DMA channel params using a specific DMA driver - UDMA, EDMA etc. More...
 
typedef int32_t(* MCSPI_dmaTransferMasterFxn) (MCSPI_Object *obj, MCSPI_ChObject *chObj, const MCSPI_Attrs *attrs, MCSPI_Transaction *transaction)
 Driver implementation to do a DMA transfer using a specific DMA driver - UDMA, EDMA etc. More...
 
typedef int32_t(* MCSPI_dmaStopFxn) (MCSPI_Object *obj, const MCSPI_Attrs *attrs, MCSPI_ChObject *chObj, uint32_t chNum)
 Driver implementation to Stop DMA using a specific DMA driver - UDMA, EDMA etc. More...
 

Typedef Documentation

◆ MCSPI_DmaHandle

typedef void* MCSPI_DmaHandle

Handle to the MCSPI DMA Config Object returned by MCSPI_dmaOpen.

◆ MCSPI_dmaOpenFxn

typedef int32_t(* MCSPI_dmaOpenFxn) (void *mcspiDmaArgs)

Driver implementation to open a specific DMA driver channel - UDMA, EDMA etc.

Typically this callback is hidden from the end application and is implemented when a new DMA driver needs to be supported.

Parameters
mcspiDmaArgs[in] DMA specific arguments, obtained from the config
Returns
SystemP_SUCCESS on success, else failure

◆ MCSPI_dmaCloseFxn

typedef int32_t(* MCSPI_dmaCloseFxn) (MCSPI_Handle handle, const MCSPI_ChConfig *chCfg)

Driver implementation to close a specific DMA driver channel - UDMA, EDMA etc.

Typically this callback is hidden from the end application and is implemented when a new DMA driver needs to be supported.

Parameters
handle[in] MCSPI DMA Object handle returned from MCSPI_dmaOpen
chCfg[in] DMA specific arguments, obtained from the config
Returns
SystemP_SUCCESS on success, else failure

◆ MCSPI_dmaChInitFxn

typedef int32_t(* MCSPI_dmaChInitFxn) (MCSPI_Handle handle, const MCSPI_ChConfig *chCfg, const MCSPI_DmaChConfig *dmaChCfg)

Driver implementation to init a DMA channel params using a specific DMA driver - UDMA, EDMA etc.

Typically this callback is hidden from the end application and is implemented when a new DMA driver needs to be supported.

Parameters
handle[in] MCSPI_Handle returned from MCSPI_open()
chCfg[in] Pointer to MCSPI_ChConfig. This parameter can't be NULL
dmaChCfg[in] Pointer to MCSPI_DmaChConfig. This parameter can't be NULL
Returns
SystemP_SUCCESS on success, else failure

◆ MCSPI_dmaTransferMasterFxn

typedef int32_t(* MCSPI_dmaTransferMasterFxn) (MCSPI_Object *obj, MCSPI_ChObject *chObj, const MCSPI_Attrs *attrs, MCSPI_Transaction *transaction)

Driver implementation to do a DMA transfer using a specific DMA driver - UDMA, EDMA etc.

Typically this callback is hidden from the end application and is implemented when a new DMA driver needs to be supported.

Parameters
obj[in] Pointer to MCSPI object
chObj[in] Pointer to MCSPI_ChObject. This parameter can't be NULL
attrs[in] Pointer to MCSPI_Attrs. This parameter can't be NULL
transaction[in] Pointer to MCSPI_Transaction. This parameter can't be NULL
Returns
SystemP_SUCCESS on success, else failure

◆ MCSPI_dmaStopFxn

typedef int32_t(* MCSPI_dmaStopFxn) (MCSPI_Object *obj, const MCSPI_Attrs *attrs, MCSPI_ChObject *chObj, uint32_t chNum)

Driver implementation to Stop DMA using a specific DMA driver - UDMA, EDMA etc.

Typically this callback is hidden from the end application and is implemented when a new DMA driver needs to be supported.

Parameters
obj[in] Pointer to MCSPI object
attrs[in] Pointer to MCSPI_Attrs. This parameter can't be NULL
chObj[in] Pointer to MCSPI_ChObject. This parameter can't be NULL
chNum[in] Channel number
Returns
SystemP_SUCCESS on success, else failure

Function Documentation

◆ MCSPI_dmaOpen()

MCSPI_DmaHandle MCSPI_dmaOpen ( int32_t  dmaConfigIndex)

API to open an MCSPI DMA channel.

This API will open a DMA Channel using the appropriate DMA driver callbacks and the registered via Sysconfig

Parameters
dmaConfigIndex[in] Index of the DMA Config selected for this particular MCSPI driver instance
Returns
Handle to the MCSPI DMA Config Object

◆ MCSPI_dmaClose()

int32_t MCSPI_dmaClose ( MCSPI_Handle  handle,
const MCSPI_ChConfig chCfg 
)

API to close an MCSPI DMA channel.

This API will open a DMA Channel using the appropriate DMA driver callbacks registered via Sysconfig

Parameters
handle[in] MCSPI_Handle returned from MCSPI_open()
chCfg[in] Pointer to MCSPI_ChConfig. This parameter can't be NULL
Returns
SystemP_SUCCESS on success, else failure

◆ MCSPI_dmaChInit()

int32_t MCSPI_dmaChInit ( MCSPI_Handle  handle,
const MCSPI_ChConfig chCfg,
const MCSPI_DmaChConfig dmaChCfg 
)

API to init a DMA Channel opened.

This API will open a DMA Channel using the appropriate DMA driver callbacks registered via Sysconfig

Parameters
handle[in] MCSPI_Handle returned from MCSPI_open()
chCfg[in] Pointer to MCSPI_ChConfig. This parameter can't be NULL
dmaChCfg[in] Pointer to MCSPI_DmaChConfig. This parameter can't be NULL
Returns
SystemP_SUCCESS on success, else failure

◆ MCSPI_dmaTransfer()

int32_t MCSPI_dmaTransfer ( MCSPI_Object obj,
MCSPI_ChObject chObj,
const MCSPI_Attrs attrs,
MCSPI_Transaction transaction 
)

API to do a DMA transfer using a specific DMA driver - UDMA, EDMA etc.

Typically this callback is hidden from the end application and is implemented when a new DMA driver needs to be supported.

Parameters
obj[in] Pointer to MCSPI object
chObj[in] Pointer to MCSPI_ChObject. This parameter can't be NULL
attrs[in] Pointer to MCSPI_Attrs. This parameter can't be NULL
transaction[in] Pointer to MCSPI_Transaction. This parameter can't be NULL
Returns
SystemP_SUCCESS on success, else failure

◆ MCSPI_dmaStop()

int32_t MCSPI_dmaStop ( MCSPI_Object obj,
const MCSPI_Attrs attrs,
MCSPI_ChObject chObj,
uint32_t  chNum 
)

API to Stop DMA using a specific DMA driver - UDMA, EDMA etc.

Typically this callback is hidden from the end application and is implemented when a new DMA driver needs to be supported.

Parameters
obj[in] Pointer to MCSPI object
attrs[in] Pointer to MCSPI_Attrs. This parameter can't be NULL
chObj[in] Pointer to MCSPI_ChObject. This parameter can't be NULL
chNum[in] Channel number
Returns
SystemP_SUCCESS on success, else failure