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 UART.

Data Structures

struct  UART_DmaFxns
 Driver implementation callbacks. More...
 
struct  UART_DmaConfig
 UART DMA Configuration, these are filled by SysCfg based on the DMA driver that is selected. More...
 

Functions

UART_DmaHandle UART_dmaOpen (UART_Handle uartHandle, int32_t index)
 API to open an UART DMA channel. More...
 
int32_t UART_dmaClose (UART_Handle handle)
 API to close an UART DMA channel. More...
 
int32_t UART_dmaDisableChannel (UART_Handle handle, uint32_t isChannelTx)
 API to disable an DMA channel. More...
 
int32_t UART_writeInterruptDma (UART_Object *obj, const UART_Attrs *attrs, UART_Transaction *transaction)
 API to write data using an UART DMA channel. More...
 
int32_t UART_readInterruptDma (UART_Object *obj, const UART_Attrs *attrs, UART_Transaction *transaction)
 API to read data using an UART DMA channel. More...
 

Typedefs

typedef void * UART_DmaHandle
 Handle to the UART DMA Config Object returned by UART_dmaOpen. More...
 
typedef int32_t(* UART_dmaOpenFxn) (UART_Handle uartHandle, void *uartDmaArgs)
 Driver implementation to open a specific DMA driver channel - UDMA, EDMA etc. More...
 
typedef int32_t(* UART_dmaTransferReadFxn) (UART_Object *obj, const UART_Attrs *attrs, UART_Transaction *transaction)
 Driver implementation to do a DMA read using a specific DMA driver - UDMA, EDMA etc. More...
 
typedef int32_t(* UART_dmaTransferWriteFxn) (UART_Object *obj, const UART_Attrs *attrs, UART_Transaction *transaction)
 Driver implementation to do a DMA write using a specific DMA driver - UDMA, EDMA etc. More...
 
typedef int32_t(* UART_dmaCloseFxn) (UART_Handle handle)
 Driver implementation to close a specific DMA driver channel - UDMA, EDMA etc. More...
 
typedef int32_t(* UART_dmaDisableChannelFxn) (UART_Handle handle, uint32_t isChannelTx)
 Driver implementation to diisable a specific DMA driver channel - UDMA, EDMA etc. More...
 

Typedef Documentation

◆ UART_DmaHandle

typedef void* UART_DmaHandle

Handle to the UART DMA Config Object returned by UART_dmaOpen.

◆ UART_dmaOpenFxn

typedef int32_t(* UART_dmaOpenFxn) (UART_Handle uartHandle, void *uartDmaArgs)

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
uartHandle[in] UART Handle
uartDmaArgs[in] DMA specific arguments, obtained from the config
Returns
SystemP_SUCCESS on success, else failure

◆ UART_dmaTransferReadFxn

typedef int32_t(* UART_dmaTransferReadFxn) (UART_Object *obj, const UART_Attrs *attrs, UART_Transaction *transaction)

Driver implementation to do a DMA read 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 UART object
attrs[in] Pointer to UART attributes.
transaction[in] Pointer to UART_Transaction. This parameter can't be NULL
Returns
SystemP_SUCCESS on success, else failure

◆ UART_dmaTransferWriteFxn

typedef int32_t(* UART_dmaTransferWriteFxn) (UART_Object *obj, const UART_Attrs *attrs, UART_Transaction *transaction)

Driver implementation to do a DMA write 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 UART object.
attrs[in] Pointer to UART attributes.
transaction[in] Pointer to UART_Transaction. This parameter can't be NULL
Returns
SystemP_SUCCESS on success, else failure

◆ UART_dmaCloseFxn

typedef int32_t(* UART_dmaCloseFxn) (UART_Handle handle)

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] UART handle returned from UART_open
Returns
SystemP_SUCCESS on success, else failure

◆ UART_dmaDisableChannelFxn

typedef int32_t(* UART_dmaDisableChannelFxn) (UART_Handle handle, uint32_t isChannelTx)

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

Parameters
handle[in] UART handle returned from UART_open
isChannelTx[in] Variable to indicate if it is TX/RX Channel
Returns
SystemP_SUCCESS on success, else failure

Function Documentation

◆ UART_dmaOpen()

UART_DmaHandle UART_dmaOpen ( UART_Handle  uartHandle,
int32_t  index 
)

API to open an UART DMA channel.

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

Parameters
uartHandle[in] UART Handle
index[in] Index of the DMA Config selected for this particular UART driver instance
Returns
Handle to the UART DMA Config Object

◆ UART_dmaClose()

int32_t UART_dmaClose ( UART_Handle  handle)

API to close an UART DMA channel.

Parameters
handle[in] UART handle returned from UART_open
Returns
SystemP_SUCCESS on success, else failure

◆ UART_dmaDisableChannel()

int32_t UART_dmaDisableChannel ( UART_Handle  handle,
uint32_t  isChannelTx 
)

API to disable an DMA channel.

Parameters
handle[in] UART handle returned from UART_open
isChannelTx[in] Variable to indicate if it is TX/RX Channel
Returns
SystemP_SUCCESS on success, else failure

◆ UART_writeInterruptDma()

int32_t UART_writeInterruptDma ( UART_Object obj,
const UART_Attrs attrs,
UART_Transaction transaction 
)

API to write data using an UART DMA channel.

Parameters
obj[in] Pointer to UART object
attrs[in] Pointer to UART attributes
transaction[in] Pointer to UART_Transaction. This parameter can't be NULL
Returns
SystemP_SUCCESS on success, else failure

◆ UART_readInterruptDma()

int32_t UART_readInterruptDma ( UART_Object obj,
const UART_Attrs attrs,
UART_Transaction transaction 
)

API to read data using an UART DMA channel.

Parameters
obj[in] Pointer to UART object
attrs[in] Pointer to UART attributes
transaction[in] Pointer to UART_Transaction. This parameter can't be NULL
Returns
SystemP_SUCCESS on success, else failure