MCUXpresso SDK API Reference Manual  Rev 2.12.1
NXP Semiconductors
 All Data Structures Functions Variables Typedefs Enumerations Enumerator Groups Pages
Lpuart_gpdma

Overview

Data Structures

struct  lpuart_gpdma_handle_t
 LPUART GPDMA handle. More...
 

Typedefs

typedef void(* lpuart_gpdma_transfer_callback_t )(LPUART_Type *base, lpuart_gpdma_handle_t *handle, status_t status, void *userData)
 LPUART transfer callback function. More...
 

Variables

lpuart_gpdma_transfer_callback_t lpuart_gpdma_handle_t::callback
 Callback function. More...
 
void * lpuart_gpdma_handle_t::userData
 LPUART callback function parameter. More...
 
size_t lpuart_gpdma_handle_t::rxDataSizeAll
 Size of the data to receive. More...
 
size_t lpuart_gpdma_handle_t::txDataSizeAll
 Size of the data to send out. More...
 
gpdma_handle_tlpuart_gpdma_handle_t::txDmaHandle
 The GPDMA TX channel used. More...
 
gpdma_handle_tlpuart_gpdma_handle_t::rxDmaHandle
 The GPDMA RX channel used. More...
 
volatile uint8_t lpuart_gpdma_handle_t::txState
 TX transfer state. More...
 
volatile uint8_t lpuart_gpdma_handle_t::rxState
 RX transfer state.
 

Driver version

#define FSL_LPUART_GPDMA_DRIVER_VERSION   (MAKE_VERSION(2, 0, 0))
 LPUART GPDMA driver version. More...
 

GPDMA transactional

void LPUART_TransferCreateHandleGPDMA (LPUART_Type *base, lpuart_gpdma_handle_t *handle, lpuart_gpdma_transfer_callback_t callback, void *userData, gpdma_handle_t *txDmaHandle, gpdma_handle_t *rxDmaHandle)
 Initializes the LPUART handle which is used in transactional functions. More...
 
status_t LPUART_TransferSendGPDMA (LPUART_Type *base, lpuart_gpdma_handle_t *handle, lpuart_data_t *xfer)
 Sends data using GPDMA. More...
 
status_t LPUART_TransferReceiveGPDMA (LPUART_Type *base, lpuart_gpdma_handle_t *handle, lpuart_data_t *xfer)
 Receives data using GPDMA. More...
 
void LPUART_TransferAbortSendGPDMA (LPUART_Type *base, lpuart_gpdma_handle_t *handle)
 Aborts the sent data using GPDMA. More...
 
void LPUART_TransferAbortReceiveGPDMA (LPUART_Type *base, lpuart_gpdma_handle_t *handle)
 Aborts the received data using GPDMA. More...
 

Data Structure Documentation

struct _lpuart_gpdma_handle

Data Fields

lpuart_gpdma_transfer_callback_t callback
 Callback function. More...
 
void * userData
 LPUART callback function parameter. More...
 
size_t rxDataSizeAll
 Size of the data to receive. More...
 
size_t txDataSizeAll
 Size of the data to send out. More...
 
gpdma_handle_ttxDmaHandle
 The GPDMA TX channel used. More...
 
gpdma_handle_trxDmaHandle
 The GPDMA RX channel used. More...
 
volatile uint8_t txState
 TX transfer state. More...
 
volatile uint8_t rxState
 RX transfer state.
 

Macro Definition Documentation

#define FSL_LPUART_GPDMA_DRIVER_VERSION   (MAKE_VERSION(2, 0, 0))

Typedef Documentation

typedef void(* lpuart_gpdma_transfer_callback_t)(LPUART_Type *base, lpuart_gpdma_handle_t *handle, status_t status, void *userData)

Function Documentation

void LPUART_TransferCreateHandleGPDMA ( LPUART_Type *  base,
lpuart_gpdma_handle_t *  handle,
lpuart_gpdma_transfer_callback_t  callback,
void *  userData,
gpdma_handle_t txDmaHandle,
gpdma_handle_t rxDmaHandle 
)
Note
This function disables all LPUART interrupts.
Parameters
baseLPUART peripheral base address.
handlePointer to lpuart_gpdma_handle_t structure.
callbackCallback function.
userDataUser data.
txDmaHandleUser-requested GPDMA handle for TX GPDMA transfer.
rxDmaHandleUser-requested GPDMA handle for RX GPDMA transfer.
status_t LPUART_TransferSendGPDMA ( LPUART_Type *  base,
lpuart_gpdma_handle_t *  handle,
lpuart_data_t xfer 
)

This function sends data using GPDMA. 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 GPDMA transfer structure.
Return values
kStatus_Successif succeed, others failed.
kStatus_LPUART_TxBusyPrevious transfer on going.
kStatus_InvalidArgumentInvalid argument.
status_t LPUART_TransferReceiveGPDMA ( LPUART_Type *  base,
lpuart_gpdma_handle_t *  handle,
lpuart_data_t xfer 
)

This function receives data using GPDMA. 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_gpdma_handle_t structure.
xferLPUART GPDMA transfer structure.
Return values
kStatus_Successif succeed, others failed.
kStatus_LPUART_RxBusyPrevious transfer on going.
kStatus_InvalidArgumentInvalid argument.
void LPUART_TransferAbortSendGPDMA ( LPUART_Type *  base,
lpuart_gpdma_handle_t *  handle 
)

This function aborts send data using GPDMA.

Parameters
baseLPUART peripheral base address
handlePointer to lpuart_gpdma_handle_t structure
void LPUART_TransferAbortReceiveGPDMA ( LPUART_Type *  base,
lpuart_gpdma_handle_t *  handle 
)

This function aborts the received data using GPDMA.

Parameters
baseLPUART peripheral base address
handlePointer to lpuart_gpdma_handle_t structure

Variable Documentation

lpuart_gpdma_transfer_callback_t lpuart_gpdma_handle_t::callback
void* lpuart_gpdma_handle_t::userData
size_t lpuart_gpdma_handle_t::rxDataSizeAll
size_t lpuart_gpdma_handle_t::txDataSizeAll
gpdma_handle_t* lpuart_gpdma_handle_t::txDmaHandle
gpdma_handle_t* lpuart_gpdma_handle_t::rxDmaHandle
volatile uint8_t lpuart_gpdma_handle_t::txState