Arrow / Mbed OS DAPLink Reset
Embed: (wiki syntax)

« Back to documentation index

Uart_edma_driver

Uart_edma_driver

Data Structures

struct  _uart_edma_handle
 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.

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.
status_t UART_SendEDMA (UART_Type *base, uart_edma_handle_t *handle, uart_transfer_t *xfer)
 Sends data using eDMA.
status_t UART_ReceiveEDMA (UART_Type *base, uart_edma_handle_t *handle, uart_transfer_t *xfer)
 Receives data using eDMA.
void UART_TransferAbortSendEDMA (UART_Type *base, uart_edma_handle_t *handle)
 Aborts the sent data using eDMA.
void UART_TransferAbortReceiveEDMA (UART_Type *base, uart_edma_handle_t *handle)
 Aborts the receive data using eDMA.
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.
status_t UART_TransferGetReceiveCountEDMA (UART_Type *base, uart_edma_handle_t *handle, uint32_t *count)
 Gets the number of received bytes.

Typedef Documentation

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

UART transfer callback function.

Definition at line 33 of file fsl_uart_edma.h.


Function Documentation

status_t UART_ReceiveEDMA ( UART_Type base,
uart_edma_handle_t handle,
uart_transfer_t xfer 
)

Receives data using eDMA.

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.

brief Receives data using eDMA.

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.

param base UART peripheral base address. param handle Pointer to the uart_edma_handle_t structure. param xfer UART eDMA transfer structure. See uart_transfer_t. retval kStatus_Success if succeeded; otherwise failed. retval kStatus_UART_RxBusy Previous transfer ongoing. retval kStatus_InvalidArgument Invalid argument.

Definition at line 275 of file fsl_uart_edma.c.

status_t UART_SendEDMA ( UART_Type base,
uart_edma_handle_t handle,
uart_transfer_t xfer 
)

Sends data using eDMA.

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.

brief Sends data using eDMA.

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.

param base UART peripheral base address. param handle UART handle pointer. param xfer UART eDMA transfer structure. See uart_transfer_t. retval kStatus_Success if succeeded; otherwise failed. retval kStatus_UART_TxBusy Previous transfer ongoing. retval kStatus_InvalidArgument Invalid argument.

Definition at line 221 of file fsl_uart_edma.c.

void UART_TransferAbortReceiveEDMA ( UART_Type base,
uart_edma_handle_t handle 
)

Aborts the receive data using eDMA.

This function aborts receive data using eDMA.

Parameters:
baseUART peripheral base address.
handlePointer to the uart_edma_handle_t structure.

brief Aborts the receive data using eDMA.

This function aborts receive data using eDMA.

param base UART peripheral base address. param handle Pointer to the uart_edma_handle_t structure.

Definition at line 346 of file fsl_uart_edma.c.

void UART_TransferAbortSendEDMA ( UART_Type base,
uart_edma_handle_t handle 
)

Aborts the sent data using eDMA.

This function aborts sent data using eDMA.

Parameters:
baseUART peripheral base address.
handlePointer to the uart_edma_handle_t structure.

brief Aborts the sent data using eDMA.

This function aborts sent data using eDMA.

param base UART peripheral base address. param handle Pointer to the uart_edma_handle_t structure.

Definition at line 324 of file fsl_uart_edma.c.

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.

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.

brief Initializes the UART handle which is used in transactional functions. param base UART peripheral base address. param handle Pointer to the uart_edma_handle_t structure. param callback UART callback, NULL means no callback. param userData User callback function data. param rxEdmaHandle User-requested DMA handle for RX DMA transfer. param txEdmaHandle User-requested DMA handle for TX DMA transfer.

Definition at line 155 of file fsl_uart_edma.c.

status_t UART_TransferGetReceiveCountEDMA ( UART_Type base,
uart_edma_handle_t handle,
uint32_t *  count 
)

Gets the number of received bytes.

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;

brief Gets the number of received bytes.

This function gets the number of received bytes.

param base UART peripheral base address. param handle UART handle pointer. param count Receive bytes count. retval kStatus_NoTransferInProgress No receive in progress. retval kStatus_InvalidArgument Parameter is invalid. retval kStatus_Success Get successfully through the parameter count;

Definition at line 372 of file fsl_uart_edma.c.

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.

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;

brief Gets the number of bytes that have been written to UART TX register.

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

param base UART peripheral base address. param handle UART handle pointer. param count Send bytes count. retval kStatus_NoTransferInProgress No send in progress. retval kStatus_InvalidArgument Parameter is invalid. retval kStatus_Success Get successfully through the parameter count;

Definition at line 403 of file fsl_uart_edma.c.