![]()  | 
  
    MCUXpresso SDK API Reference Manual
    Rev. 0
    
   NXP Semiconductors 
   | 
 
Data Structures | |
| struct | uart_dma_handle_t | 
| UART DMA handle.  More... | |
Typedefs | |
| typedef void(* | uart_dma_transfer_callback_t )(UART_Type *base, uart_dma_handle_t *handle, status_t status, void *userData) | 
| UART transfer callback function.  More... | |
eDMA transactional | |
| void | UART_TransferCreateHandleDMA (UART_Type *base, uart_dma_handle_t *handle, uart_dma_transfer_callback_t callback, void *userData, dma_handle_t *txDmaHandle, dma_handle_t *rxDmaHandle) | 
| Initializes the UART handle which is used in transactional functions and sets the callback.  More... | |
| status_t | UART_TransferSendDMA (UART_Type *base, uart_dma_handle_t *handle, uart_transfer_t *xfer) | 
| Sends data using DMA.  More... | |
| status_t | UART_TransferReceiveDMA (UART_Type *base, uart_dma_handle_t *handle, uart_transfer_t *xfer) | 
| Receives data using DMA.  More... | |
| void | UART_TransferAbortSendDMA (UART_Type *base, uart_dma_handle_t *handle) | 
| Aborts the send data using DMA.  More... | |
| void | UART_TransferAbortReceiveDMA (UART_Type *base, uart_dma_handle_t *handle) | 
| Aborts the received data using DMA.  More... | |
| status_t | UART_TransferGetSendCountDMA (UART_Type *base, uart_dma_handle_t *handle, uint32_t *count) | 
| Gets the number of bytes written to UART TX register.  More... | |
| status_t | UART_TransferGetReceiveCountDMA (UART_Type *base, uart_dma_handle_t *handle, uint32_t *count) | 
| Gets the number of bytes that have been received.  More... | |
| struct _uart_dma_handle | 
Data Fields | |
| UART_Type * | base | 
| UART peripheral base address.  More... | |
| uart_dma_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... | |
| dma_handle_t * | txDmaHandle | 
| The DMA TX channel used.  More... | |
| dma_handle_t * | rxDmaHandle | 
| The DMA RX channel used.  More... | |
| volatile uint8_t | txState | 
| TX transfer state.  More... | |
| volatile uint8_t | rxState | 
| RX transfer state.  | |
| UART_Type* uart_dma_handle_t::base | 
| uart_dma_transfer_callback_t uart_dma_handle_t::callback | 
| void* uart_dma_handle_t::userData | 
| size_t uart_dma_handle_t::rxDataSizeAll | 
| size_t uart_dma_handle_t::txDataSizeAll | 
| dma_handle_t* uart_dma_handle_t::txDmaHandle | 
| dma_handle_t* uart_dma_handle_t::rxDmaHandle | 
| volatile uint8_t uart_dma_handle_t::txState | 
| typedef void(* uart_dma_transfer_callback_t)(UART_Type *base, uart_dma_handle_t *handle, status_t status, void *userData) | 
| void UART_TransferCreateHandleDMA | ( | UART_Type * | base, | 
| uart_dma_handle_t * | handle, | ||
| uart_dma_transfer_callback_t | callback, | ||
| void * | userData, | ||
| dma_handle_t * | txDmaHandle, | ||
| dma_handle_t * | rxDmaHandle | ||
| ) | 
| base | UART peripheral base address. | 
| handle | Pointer to the uart_dma_handle_t structure. | 
| callback | UART callback, NULL means no callback. | 
| userData | User callback function data. | 
| rxDmaHandle | User requested DMA handle for the RX DMA transfer. | 
| txDmaHandle | User requested DMA handle for the TX DMA transfer. | 
| status_t UART_TransferSendDMA | ( | UART_Type * | base, | 
| uart_dma_handle_t * | handle, | ||
| uart_transfer_t * | xfer | ||
| ) | 
This function sends data using DMA. 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 DMA 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_TransferReceiveDMA | ( | UART_Type * | base, | 
| uart_dma_handle_t * | handle, | ||
| uart_transfer_t * | xfer | ||
| ) | 
This function receives data using DMA. 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_dma_handle_t structure. | 
| xfer | UART DMA 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_TransferAbortSendDMA | ( | UART_Type * | base, | 
| uart_dma_handle_t * | handle | ||
| ) | 
This function aborts the sent data using DMA.
| base | UART peripheral base address. | 
| handle | Pointer to uart_dma_handle_t structure. | 
| void UART_TransferAbortReceiveDMA | ( | UART_Type * | base, | 
| uart_dma_handle_t * | handle | ||
| ) | 
This function abort receive data which using DMA.
| base | UART peripheral base address. | 
| handle | Pointer to uart_dma_handle_t structure. | 
| status_t UART_TransferGetSendCountDMA | ( | UART_Type * | base, | 
| uart_dma_handle_t * | handle, | ||
| uint32_t * | count | ||
| ) | 
This function gets the number of bytes written to UART TX register by DMA.
| base | UART peripheral base address. | 
| handle | UART handle pointer. | 
| count | Send bytes count. | 
| kStatus_NoTransferInProgress | No send in progress. | 
| kStatus_InvalidArgument | Parameter is invalid. | 
| kStatus_Success | Get successfully through the parameter count;  | 
| status_t UART_TransferGetReceiveCountDMA | ( | UART_Type * | base, | 
| uart_dma_handle_t * | handle, | ||
| uint32_t * | count | ||
| ) | 
This function gets the number of bytes that have been received.
| base | UART peripheral base address. | 
| handle | UART handle pointer. | 
| count | Receive bytes count. | 
| kStatus_NoTransferInProgress | No receive in progress. | 
| kStatus_InvalidArgument | Parameter is invalid. | 
| kStatus_Success | Get successfully through the parameter count;  |