RTEMS 6.1-rc6
Loading...
Searching...
No Matches
Data Structures | Variables
Lpuart_dma_driver

Data Structures

struct  _lpuart_dma_handle
 LPUART DMA handle. More...
 

Variables

lpuart_dma_transfer_callback_t _lpuart_dma_handle::callback
 
void * _lpuart_dma_handle::userData
 
size_t _lpuart_dma_handle::rxDataSizeAll
 
size_t _lpuart_dma_handle::txDataSizeAll
 
dma_handle_t * _lpuart_dma_handle::txDmaHandle
 
dma_handle_t * _lpuart_dma_handle::rxDmaHandle
 
volatile uint8_t _lpuart_dma_handle::txState
 
volatile uint8_t _lpuart_dma_handle::rxState
 

Driver version

typedef struct _lpuart_dma_handle lpuart_dma_handle_t
 
typedef void(* lpuart_dma_transfer_callback_t) (LPUART_Type *base, lpuart_dma_handle_t *handle, status_t status, void *userData)
 LPUART transfer callback function.
 
#define FSL_LPUART_DMA_DRIVER_VERSION   (MAKE_VERSION(2, 6, 0))
 LPUART DMA driver version.
 

EDMA transactional

void LPUART_TransferCreateHandleDMA (LPUART_Type *base, lpuart_dma_handle_t *handle, lpuart_dma_transfer_callback_t callback, void *userData, dma_handle_t *txDmaHandle, dma_handle_t *rxDmaHandle)
 Initializes the LPUART handle which is used in transactional functions.
 
status_t LPUART_TransferSendDMA (LPUART_Type *base, lpuart_dma_handle_t *handle, lpuart_transfer_t *xfer)
 Sends data using DMA.
 
status_t LPUART_TransferReceiveDMA (LPUART_Type *base, lpuart_dma_handle_t *handle, lpuart_transfer_t *xfer)
 Receives data using DMA.
 
void LPUART_TransferAbortSendDMA (LPUART_Type *base, lpuart_dma_handle_t *handle)
 Aborts the sent data using DMA.
 
void LPUART_TransferAbortReceiveDMA (LPUART_Type *base, lpuart_dma_handle_t *handle)
 Aborts the received data using DMA.
 
status_t LPUART_TransferGetSendCountDMA (LPUART_Type *base, lpuart_dma_handle_t *handle, uint32_t *count)
 Gets the number of bytes written to the LPUART TX register.
 
status_t LPUART_TransferGetReceiveCountDMA (LPUART_Type *base, lpuart_dma_handle_t *handle, uint32_t *count)
 Gets the number of received bytes.
 
void LPUART_TransferDMAHandleIRQ (LPUART_Type *base, void *lpuartDmaHandle)
 LPUART DMA IRQ handle function.
 

Detailed Description

Function Documentation

◆ LPUART_TransferAbortReceiveDMA()

void LPUART_TransferAbortReceiveDMA ( LPUART_Type base,
lpuart_dma_handle_t handle 
)

Aborts the received data using DMA.

This function aborts the received data using DMA.

Parameters
baseLPUART peripheral base address
handlePointer to lpuart_dma_handle_t structure

◆ LPUART_TransferAbortSendDMA()

void LPUART_TransferAbortSendDMA ( LPUART_Type base,
lpuart_dma_handle_t handle 
)

Aborts the sent data using DMA.

This function aborts send data using DMA.

Parameters
baseLPUART peripheral base address
handlePointer to lpuart_dma_handle_t structure

◆ LPUART_TransferCreateHandleDMA()

void LPUART_TransferCreateHandleDMA ( LPUART_Type base,
lpuart_dma_handle_t handle,
lpuart_dma_transfer_callback_t  callback,
void *  userData,
dma_handle_t *  txDmaHandle,
dma_handle_t *  rxDmaHandle 
)

Initializes the LPUART handle which is used in transactional functions.

Note
This function disables all LPUART interrupts.
Parameters
baseLPUART peripheral base address.
handlePointer to lpuart_dma_handle_t structure.
callbackCallback function.
userDataUser data.
txDmaHandleUser-requested DMA handle for TX DMA transfer.
rxDmaHandleUser-requested DMA handle for RX DMA transfer.

◆ LPUART_TransferDMAHandleIRQ()

void LPUART_TransferDMAHandleIRQ ( LPUART_Type base,
void *  lpuartDmaHandle 
)

LPUART DMA IRQ handle function.

This function handles the LPUART tx complete IRQ request and invoke user callback.

Note
This function is used as default IRQ handler by double weak mechanism. If user's specific IRQ handler is implemented, make sure this function is invoked in the handler.
Parameters
baseLPUART peripheral base address.
lpuartDmaHandleLPUART handle pointer.

◆ LPUART_TransferGetReceiveCountDMA()

status_t LPUART_TransferGetReceiveCountDMA ( LPUART_Type base,
lpuart_dma_handle_t handle,
uint32_t *  count 
)

Gets the number of received bytes.

This function gets the number of received bytes.

Parameters
baseLPUART peripheral base address.
handleLPUART handle pointer.
countReceive bytes count.
Return values
kStatus_NoTransferInProgressNo receive in progress.
kStatus_InvalidArgumentParameter is invalid.
kStatus_SuccessGet successfully through the parameter count;

◆ LPUART_TransferGetSendCountDMA()

status_t LPUART_TransferGetSendCountDMA ( LPUART_Type base,
lpuart_dma_handle_t handle,
uint32_t *  count 
)

Gets the number of bytes written to the LPUART TX register.

This function gets the number of bytes that have been written to LPUART TX register by DMA.

Parameters
baseLPUART peripheral base address.
handleLPUART handle pointer.
countSend bytes count.
Return values
kStatus_NoTransferInProgressNo send in progress.
kStatus_InvalidArgumentParameter is invalid.
kStatus_SuccessGet successfully through the parameter count;

◆ LPUART_TransferReceiveDMA()

status_t LPUART_TransferReceiveDMA ( LPUART_Type base,
lpuart_dma_handle_t handle,
lpuart_transfer_t xfer 
)

Receives data using DMA.

This function receives data using DMA. This is a non-blocking function, which returns right away. When all data is received, the receive callback function is called.

Parameters
baseLPUART peripheral base address.
handlePointer to lpuart_dma_handle_t structure.
xferLPUART DMA transfer structure. See lpuart_transfer_t.
Return values
kStatus_Successif succeed, others failed.
kStatus_LPUART_RxBusyPrevious transfer on going.
kStatus_InvalidArgumentInvalid argument.

◆ LPUART_TransferSendDMA()

status_t LPUART_TransferSendDMA ( LPUART_Type base,
lpuart_dma_handle_t handle,
lpuart_transfer_t xfer 
)

Sends data using DMA.

This function sends data using DMA. This is a non-blocking function, which returns right away. When all data is sent, the send callback function is called.

Parameters
baseLPUART peripheral base address.
handleLPUART handle pointer.
xferLPUART DMA transfer structure. See lpuart_transfer_t.
Return values
kStatus_Successif succeed, others failed.
kStatus_LPUART_TxBusyPrevious transfer on going.
kStatus_InvalidArgumentInvalid argument.

Variable Documentation

◆ callback

lpuart_dma_transfer_callback_t _lpuart_dma_handle::callback

Callback function.

◆ rxDataSizeAll

size_t _lpuart_dma_handle::rxDataSizeAll

Size of the data to receive.

◆ rxDmaHandle

dma_handle_t* _lpuart_dma_handle::rxDmaHandle

The DMA RX channel used.

◆ rxState

volatile uint8_t _lpuart_dma_handle::rxState

RX transfer state

◆ txDataSizeAll

size_t _lpuart_dma_handle::txDataSizeAll

Size of the data to send out.

◆ txDmaHandle

dma_handle_t* _lpuart_dma_handle::txDmaHandle

The DMA TX channel used.

◆ txState

volatile uint8_t _lpuart_dma_handle::txState

TX transfer state.

◆ userData

void* _lpuart_dma_handle::userData

LPUART callback function parameter.