![]() |
MCUXpresso SDK API Reference Manual
Rev. 0
NXP Semiconductors
|
Data Structures | |
struct | uart_dmac_handle_t |
UART DMAC handle. More... | |
Typedefs | |
typedef void(* | uart_dmac_transfer_callback_t )(UART_Type *base, uart_dmac_handle_t *handle, status_t status, void *userData) |
UART transfer callback function. More... | |
Driver version | |
#define | FSL_UART_DMAC_DRIVER_VERSION (MAKE_VERSION(2, 0, 1)) |
UART DMAC driver version. More... | |
DMAC transactional APIs | |
void | UART_TransferCreateHandleDMAC (UART_Type *base, uart_dmac_handle_t *handle, uart_dmac_transfer_callback_t callback, void *userData, dmac_handle_t *txDmaHandle, dmac_handle_t *rxDmaHandle) |
Initializes the UART handle which is used in transactional functions and sets the callback. More... | |
status_t | UART_TransferSendDMAC (UART_Type *base, uart_dmac_handle_t *handle, uart_transfer_t *xfer) |
Sends data using DMAC. More... | |
status_t | UART_TransferReceiveDMAC (UART_Type *base, uart_dmac_handle_t *handle, uart_transfer_t *xfer) |
Receives data using DMAC. More... | |
void | UART_TransferAbortSendDMAC (UART_Type *base, uart_dmac_handle_t *handle) |
Aborts the send data using DMAC. More... | |
void | UART_TransferAbortReceiveDMAC (UART_Type *base, uart_dmac_handle_t *handle) |
Aborts the received data using DMAC. More... | |
struct _uart_dmac_handle |
Data Fields | |
UART_Type * | base |
UART peripheral base address. More... | |
uart_dmac_transfer_callback_t | callback |
Callback function. More... | |
void * | userData |
UART callback function parameter. More... | |
dmac_handle_t * | txDmaHandle |
The DMAC TX channel used. More... | |
dmac_handle_t * | rxDmaHandle |
The DMAC RX channel used. More... | |
volatile uint8_t | txState |
TX transfer state. More... | |
volatile uint8_t | rxState |
RX transfer state. | |
UART_Type* uart_dmac_handle_t::base |
uart_dmac_transfer_callback_t uart_dmac_handle_t::callback |
void* uart_dmac_handle_t::userData |
dmac_handle_t* uart_dmac_handle_t::txDmaHandle |
dmac_handle_t* uart_dmac_handle_t::rxDmaHandle |
volatile uint8_t uart_dmac_handle_t::txState |
#define FSL_UART_DMAC_DRIVER_VERSION (MAKE_VERSION(2, 0, 1)) |
typedef void(* uart_dmac_transfer_callback_t)(UART_Type *base, uart_dmac_handle_t *handle, status_t status, void *userData) |
void UART_TransferCreateHandleDMAC | ( | UART_Type * | base, |
uart_dmac_handle_t * | handle, | ||
uart_dmac_transfer_callback_t | callback, | ||
void * | userData, | ||
dmac_handle_t * | txDmaHandle, | ||
dmac_handle_t * | rxDmaHandle | ||
) |
base | UART peripheral base address. |
handle | Pointer to the uart_dmac_handle_t structure. |
callback | UART callback, NULL means no callback. |
userData | User callback function data. |
rxDmaHandle | User requested DMAC handle for the RX DMAC transfer. |
txDmaHandle | User requested DMAC handle for the TX DMAC transfer. |
status_t UART_TransferSendDMAC | ( | UART_Type * | base, |
uart_dmac_handle_t * | handle, | ||
uart_transfer_t * | xfer | ||
) |
This function sends data using DMAC. This is non-blocking function, which returns right away. When all data is sent, the send callback function is called.
base | UART peripheral base address. |
handle | UART handle pointer. |
xfer | UART DMAC transfer structure. See uart_transfer_t. |
kStatus_Success | if succeeded; otherwise failed. |
kStatus_UART_TxBusy | Previous transfer ongoing. |
kStatus_InvalidArgument | Invalid argument. |
status_t UART_TransferReceiveDMAC | ( | UART_Type * | base, |
uart_dmac_handle_t * | handle, | ||
uart_transfer_t * | xfer | ||
) |
This function receives data using DMAC. This is non-blocking function, which returns right away. When all data is received, the receive callback function is called.
base | UART peripheral base address. |
handle | Pointer to the uart_dmac_handle_t structure. |
xfer | UART DMAC transfer structure. See uart_transfer_t. |
kStatus_Success | if succeeded; otherwise failed. |
kStatus_UART_RxBusy | Previous transfer on going. |
kStatus_InvalidArgument | Invalid argument. |
void UART_TransferAbortSendDMAC | ( | UART_Type * | base, |
uart_dmac_handle_t * | handle | ||
) |
This function aborts the sent data using DMAC.
base | UART peripheral base address. |
handle | Pointer to uart_dmac_handle_t structure. |
void UART_TransferAbortReceiveDMAC | ( | UART_Type * | base, |
uart_dmac_handle_t * | handle | ||
) |
This function abort receive data which using DMAC.
base | UART peripheral base address. |
handle | Pointer to uart_dmac_handle_t structure. |