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

Overview

Data Structures

struct  uart_edma_handle_t
 UART eDMA handle. More...
 

Typedefs

typedef void(* uart_edma_transfer_callback_t )(UART_Type *base, uart_edma_handle_t *handle, status_t status, void *userData)
 UART transfer callback function. More...
 

eDMA transactional

void UART_TransferCreateHandleEDMA (UART_Type *base, uart_edma_handle_t *handle, uart_edma_transfer_callback_t callback, void *userData, edma_handle_t *txEdmaHandle, edma_handle_t *rxEdmaHandle)
 Initializes the UART handle which is used in transactional functions. More...
 
status_t UART_SendEDMA (UART_Type *base, uart_edma_handle_t *handle, uart_transfer_t *xfer)
 Sends data using eDMA. More...
 
status_t UART_ReceiveEDMA (UART_Type *base, uart_edma_handle_t *handle, uart_transfer_t *xfer)
 Receives data using eDMA. More...
 
void UART_TransferAbortSendEDMA (UART_Type *base, uart_edma_handle_t *handle)
 Aborts the sent data using eDMA. More...
 
void UART_TransferAbortReceiveEDMA (UART_Type *base, uart_edma_handle_t *handle)
 Aborts the receive data using eDMA. More...
 
status_t UART_TransferGetSendCountEDMA (UART_Type *base, uart_edma_handle_t *handle, uint32_t *count)
 Gets the number of bytes that have been written to UART TX register. More...
 
status_t UART_TransferGetReceiveCountEDMA (UART_Type *base, uart_edma_handle_t *handle, uint32_t *count)
 Gets the number of received bytes. More...
 

Data Structure Documentation

struct _uart_edma_handle

Data Fields

uart_edma_transfer_callback_t callback
 Callback function. More...
 
void * userData
 UART 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...
 
edma_handle_ttxEdmaHandle
 The eDMA TX channel used. More...
 
edma_handle_trxEdmaHandle
 The eDMA RX channel used. More...
 
uint8_t nbytes
 eDMA minor byte transfer count initially configured. More...
 
volatile uint8_t txState
 TX transfer state. More...
 
volatile uint8_t rxState
 RX transfer state.
 

Field Documentation

uart_edma_transfer_callback_t uart_edma_handle_t::callback
void* uart_edma_handle_t::userData
size_t uart_edma_handle_t::rxDataSizeAll
size_t uart_edma_handle_t::txDataSizeAll
edma_handle_t* uart_edma_handle_t::txEdmaHandle
edma_handle_t* uart_edma_handle_t::rxEdmaHandle
uint8_t uart_edma_handle_t::nbytes
volatile uint8_t uart_edma_handle_t::txState

Typedef Documentation

typedef void(* uart_edma_transfer_callback_t)(UART_Type *base, uart_edma_handle_t *handle, status_t status, void *userData)

Function Documentation

void UART_TransferCreateHandleEDMA ( UART_Type *  base,
uart_edma_handle_t *  handle,
uart_edma_transfer_callback_t  callback,
void *  userData,
edma_handle_t txEdmaHandle,
edma_handle_t rxEdmaHandle 
)
Parameters
baseUART peripheral base address.
handlePointer to the uart_edma_handle_t structure.
callbackUART callback, NULL means no callback.
userDataUser callback function data.
rxEdmaHandleUser-requested DMA handle for RX DMA transfer.
txEdmaHandleUser-requested DMA handle for TX DMA transfer.
status_t UART_SendEDMA ( UART_Type *  base,
uart_edma_handle_t *  handle,
uart_transfer_t xfer 
)

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

Parameters
baseUART peripheral base address.
handleUART handle pointer.
xferUART eDMA transfer structure. See uart_transfer_t.
Return values
kStatus_Successif succeeded; otherwise failed.
kStatus_UART_TxBusyPrevious transfer ongoing.
kStatus_InvalidArgumentInvalid argument.
status_t UART_ReceiveEDMA ( UART_Type *  base,
uart_edma_handle_t *  handle,
uart_transfer_t xfer 
)

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

Parameters
baseUART peripheral base address.
handlePointer to the uart_edma_handle_t structure.
xferUART eDMA transfer structure. See uart_transfer_t.
Return values
kStatus_Successif succeeded; otherwise failed.
kStatus_UART_RxBusyPrevious transfer ongoing.
kStatus_InvalidArgumentInvalid argument.
void UART_TransferAbortSendEDMA ( UART_Type *  base,
uart_edma_handle_t *  handle 
)

This function aborts sent data using eDMA.

Parameters
baseUART peripheral base address.
handlePointer to the uart_edma_handle_t structure.
void UART_TransferAbortReceiveEDMA ( UART_Type *  base,
uart_edma_handle_t *  handle 
)

This function aborts receive data using eDMA.

Parameters
baseUART peripheral base address.
handlePointer to the uart_edma_handle_t structure.
status_t UART_TransferGetSendCountEDMA ( UART_Type *  base,
uart_edma_handle_t *  handle,
uint32_t *  count 
)

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

Parameters
baseUART peripheral base address.
handleUART handle pointer.
countSend bytes count.
Return values
kStatus_NoTransferInProgressNo send in progress.
kStatus_InvalidArgumentParameter is invalid.
kStatus_SuccessGet successfully through the parameter count;
status_t UART_TransferGetReceiveCountEDMA ( UART_Type *  base,
uart_edma_handle_t *  handle,
uint32_t *  count 
)

This function gets the number of received bytes.

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