MCUXpresso SDK API Reference Manual
Rev. 0
NXP Semiconductors
|
Files | |
file | fsl_usart_dma.h |
Data Structures | |
struct | usart_dma_handle_t |
UART DMA handle. More... | |
Typedefs | |
typedef void(* | usart_dma_transfer_callback_t )(USART_Type *base, usart_dma_handle_t *handle, status_t status, void *userData) |
UART transfer callback function. More... | |
DMA transactional | |
status_t | USART_TransferCreateHandleDMA (USART_Type *base, usart_dma_handle_t *handle, usart_dma_transfer_callback_t callback, void *userData, dma_handle_t *txDmaHandle, dma_handle_t *rxDmaHandle) |
Initializes the USART handle which is used in transactional functions. More... | |
status_t | USART_TransferSendDMA (USART_Type *base, usart_dma_handle_t *handle, usart_transfer_t *xfer) |
Sends data using DMA. More... | |
status_t | USART_TransferReceiveDMA (USART_Type *base, usart_dma_handle_t *handle, usart_transfer_t *xfer) |
Receives data using DMA. More... | |
void | USART_TransferAbortSendDMA (USART_Type *base, usart_dma_handle_t *handle) |
Aborts the sent data using DMA. More... | |
void | USART_TransferAbortReceiveDMA (USART_Type *base, usart_dma_handle_t *handle) |
Aborts the received data using DMA. More... | |
status_t | USART_TransferGetReceiveCountDMA (USART_Type *base, usart_dma_handle_t *handle, uint32_t *count) |
Get the number of bytes that have been received. More... | |
struct _usart_dma_handle |
Data Fields | |
USART_Type * | base |
UART peripheral base address. More... | |
usart_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. | |
USART_Type* usart_dma_handle_t::base |
usart_dma_transfer_callback_t usart_dma_handle_t::callback |
void* usart_dma_handle_t::userData |
size_t usart_dma_handle_t::rxDataSizeAll |
size_t usart_dma_handle_t::txDataSizeAll |
dma_handle_t* usart_dma_handle_t::txDmaHandle |
dma_handle_t* usart_dma_handle_t::rxDmaHandle |
volatile uint8_t usart_dma_handle_t::txState |
typedef void(* usart_dma_transfer_callback_t)(USART_Type *base, usart_dma_handle_t *handle, status_t status, void *userData) |
status_t USART_TransferCreateHandleDMA | ( | USART_Type * | base, |
usart_dma_handle_t * | handle, | ||
usart_dma_transfer_callback_t | callback, | ||
void * | userData, | ||
dma_handle_t * | txDmaHandle, | ||
dma_handle_t * | rxDmaHandle | ||
) |
base | USART peripheral base address. |
handle | Pointer to usart_dma_handle_t structure. |
callback | Callback function. |
userData | User data. |
txDmaHandle | User-requested DMA handle for TX DMA transfer. |
rxDmaHandle | User-requested DMA handle for RX DMA transfer. |
status_t USART_TransferSendDMA | ( | USART_Type * | base, |
usart_dma_handle_t * | handle, | ||
usart_transfer_t * | xfer | ||
) |
This function sends data using DMA. This is a non-blocking function, which returns right away. When all data is sent, the send callback function is called.
base | USART peripheral base address. |
handle | USART handle pointer. |
xfer | USART DMA transfer structure. See usart_transfer_t. |
kStatus_Success | if succeed, others failed. |
kStatus_USART_TxBusy | Previous transfer on going. |
kStatus_InvalidArgument | Invalid argument. |
status_t USART_TransferReceiveDMA | ( | USART_Type * | base, |
usart_dma_handle_t * | handle, | ||
usart_transfer_t * | xfer | ||
) |
This function receives data using DMA. This is a non-blocking function, which returns right away. When all data is received, the receive callback function is called.
base | USART peripheral base address. |
handle | Pointer to usart_dma_handle_t structure. |
xfer | USART DMA transfer structure. See usart_transfer_t. |
kStatus_Success | if succeed, others failed. |
kStatus_USART_RxBusy | Previous transfer on going. |
kStatus_InvalidArgument | Invalid argument. |
void USART_TransferAbortSendDMA | ( | USART_Type * | base, |
usart_dma_handle_t * | handle | ||
) |
This function aborts send data using DMA.
base | USART peripheral base address |
handle | Pointer to usart_dma_handle_t structure |
void USART_TransferAbortReceiveDMA | ( | USART_Type * | base, |
usart_dma_handle_t * | handle | ||
) |
This function aborts the received data using DMA.
base | USART peripheral base address |
handle | Pointer to usart_dma_handle_t structure |
status_t USART_TransferGetReceiveCountDMA | ( | USART_Type * | base, |
usart_dma_handle_t * | handle, | ||
uint32_t * | count | ||
) |
This function gets the number of bytes that have been received.
base | USART peripheral base address. |
handle | USART 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 ; |