RTEMS 6.1-rc6
|
Data Structures | |
struct | _lpuart_edma_handle |
LPUART eDMA handle. More... | |
Variables | |
lpuart_edma_transfer_callback_t | _lpuart_edma_handle::callback |
void * | _lpuart_edma_handle::userData |
size_t | _lpuart_edma_handle::rxDataSizeAll |
size_t | _lpuart_edma_handle::txDataSizeAll |
edma_handle_t * | _lpuart_edma_handle::txEdmaHandle |
edma_handle_t * | _lpuart_edma_handle::rxEdmaHandle |
uint8_t | _lpuart_edma_handle::nbytes |
volatile uint8_t | _lpuart_edma_handle::txState |
volatile uint8_t | _lpuart_edma_handle::rxState |
Driver version | |
typedef struct _lpuart_edma_handle | lpuart_edma_handle_t |
typedef void(* | lpuart_edma_transfer_callback_t) (LPUART_Type *base, lpuart_edma_handle_t *handle, status_t status, void *userData) |
LPUART transfer callback function. | |
#define | FSL_LPUART_EDMA_DRIVER_VERSION (MAKE_VERSION(2, 6, 0)) |
LPUART EDMA driver version. | |
eDMA transactional | |
void | LPUART_TransferCreateHandleEDMA (LPUART_Type *base, lpuart_edma_handle_t *handle, lpuart_edma_transfer_callback_t callback, void *userData, edma_handle_t *txEdmaHandle, edma_handle_t *rxEdmaHandle) |
Initializes the LPUART handle which is used in transactional functions. | |
status_t | LPUART_SendEDMA (LPUART_Type *base, lpuart_edma_handle_t *handle, lpuart_transfer_t *xfer) |
Sends data using eDMA. | |
status_t | LPUART_ReceiveEDMA (LPUART_Type *base, lpuart_edma_handle_t *handle, lpuart_transfer_t *xfer) |
Receives data using eDMA. | |
void | LPUART_TransferAbortSendEDMA (LPUART_Type *base, lpuart_edma_handle_t *handle) |
Aborts the sent data using eDMA. | |
void | LPUART_TransferAbortReceiveEDMA (LPUART_Type *base, lpuart_edma_handle_t *handle) |
Aborts the received data using eDMA. | |
status_t | LPUART_TransferGetSendCountEDMA (LPUART_Type *base, lpuart_edma_handle_t *handle, uint32_t *count) |
Gets the number of bytes written to the LPUART TX register. | |
status_t | LPUART_TransferGetReceiveCountEDMA (LPUART_Type *base, lpuart_edma_handle_t *handle, uint32_t *count) |
Gets the number of received bytes. | |
void | LPUART_TransferEdmaHandleIRQ (LPUART_Type *base, void *lpuartEdmaHandle) |
LPUART eDMA IRQ handle function. | |
status_t LPUART_ReceiveEDMA | ( | LPUART_Type * | base, |
lpuart_edma_handle_t * | handle, | ||
lpuart_transfer_t * | xfer | ||
) |
Receives data using eDMA.
This function receives data using eDMA. This is non-blocking function, which returns right away. When all data is received, the receive callback function is called.
base | LPUART peripheral base address. |
handle | Pointer to lpuart_edma_handle_t structure. |
xfer | LPUART eDMA transfer structure, see lpuart_transfer_t. |
kStatus_Success | if succeed, others fail. |
kStatus_LPUART_RxBusy | Previous transfer ongoing. |
kStatus_InvalidArgument | Invalid argument. |
brief Receives data using eDMA.
This function receives data using eDMA. This is non-blocking function, which returns right away. When all data is received, the receive callback function is called.
param base LPUART peripheral base address. param handle Pointer to lpuart_edma_handle_t structure. param xfer LPUART eDMA transfer structure, see lpuart_transfer_t. retval kStatus_Success if succeed, others fail. retval kStatus_LPUART_RxBusy Previous transfer ongoing. retval kStatus_InvalidArgument Invalid argument.
status_t LPUART_SendEDMA | ( | LPUART_Type * | base, |
lpuart_edma_handle_t * | handle, | ||
lpuart_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.
base | LPUART peripheral base address. |
handle | LPUART handle pointer. |
xfer | LPUART eDMA transfer structure. See lpuart_transfer_t. |
kStatus_Success | if succeed, others failed. |
kStatus_LPUART_TxBusy | Previous transfer on going. |
kStatus_InvalidArgument | Invalid 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 LPUART peripheral base address. param handle LPUART handle pointer. param xfer LPUART eDMA transfer structure. See lpuart_transfer_t. retval kStatus_Success if succeed, others failed. retval kStatus_LPUART_TxBusy Previous transfer on going. retval kStatus_InvalidArgument Invalid argument.
void LPUART_TransferAbortReceiveEDMA | ( | LPUART_Type * | base, |
lpuart_edma_handle_t * | handle | ||
) |
Aborts the received data using eDMA.
This function aborts the received data using eDMA.
base | LPUART peripheral base address. |
handle | Pointer to lpuart_edma_handle_t structure. |
brief Aborts the received data using eDMA.
This function aborts the received data using eDMA.
param base LPUART peripheral base address. param handle Pointer to lpuart_edma_handle_t structure.
void LPUART_TransferAbortSendEDMA | ( | LPUART_Type * | base, |
lpuart_edma_handle_t * | handle | ||
) |
Aborts the sent data using eDMA.
This function aborts the sent data using eDMA.
base | LPUART peripheral base address. |
handle | Pointer to lpuart_edma_handle_t structure. |
brief Aborts the sent data using eDMA.
This function aborts the sent data using eDMA.
param base LPUART peripheral base address. param handle Pointer to lpuart_edma_handle_t structure.
void LPUART_TransferCreateHandleEDMA | ( | LPUART_Type * | base, |
lpuart_edma_handle_t * | handle, | ||
lpuart_edma_transfer_callback_t | callback, | ||
void * | userData, | ||
edma_handle_t * | txEdmaHandle, | ||
edma_handle_t * | rxEdmaHandle | ||
) |
Initializes the LPUART handle which is used in transactional functions.
base | LPUART peripheral base address. |
handle | Pointer to lpuart_edma_handle_t structure. |
callback | Callback function. |
userData | User data. |
txEdmaHandle | User requested DMA handle for TX DMA transfer. |
rxEdmaHandle | User requested DMA handle for RX DMA transfer. |
brief Initializes the LPUART handle which is used in transactional functions.
note This function disables all LPUART interrupts.
param base LPUART peripheral base address. param handle Pointer to lpuart_edma_handle_t structure. param callback Callback function. param userData User data. param txEdmaHandle User requested DMA handle for TX DMA transfer. param rxEdmaHandle User requested DMA handle for RX DMA transfer.
void LPUART_TransferEdmaHandleIRQ | ( | LPUART_Type * | base, |
void * | lpuartEdmaHandle | ||
) |
LPUART eDMA IRQ handle function.
This function handles the LPUART tx complete IRQ request and invoke user callback. It is not set to static so that it can be used in user application.
base | LPUART peripheral base address. |
lpuartEdmaHandle | LPUART handle pointer. |
brief LPUART eDMA IRQ handle function.
This function handles the LPUART tx complete IRQ request and invoke user callback. It is not set to static so that it can be used in user application. note This function is used as default IRQ handler by double weak mechanism. If user's specific IRQ handler is implemented, make sure this function is invoked in the handler.
param base LPUART peripheral base address. param lpuartEdmaHandle LPUART handle pointer.
status_t LPUART_TransferGetReceiveCountEDMA | ( | LPUART_Type * | base, |
lpuart_edma_handle_t * | handle, | ||
uint32_t * | count | ||
) |
Gets the number of received bytes.
This function gets the number of received bytes.
base | LPUART peripheral base address. |
handle | LPUART 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 ; |
brief Gets the number of received bytes.
This function gets the number of received bytes.
param base LPUART peripheral base address. param handle LPUART 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
;
status_t LPUART_TransferGetSendCountEDMA | ( | LPUART_Type * | base, |
lpuart_edma_handle_t * | handle, | ||
uint32_t * | count | ||
) |
Gets the number of bytes written to the LPUART TX register.
This function gets the number of bytes written to the LPUART TX register by DMA.
base | LPUART peripheral base address. |
handle | LPUART 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 ; |
brief Gets the number of bytes written to the LPUART TX register.
This function gets the number of bytes written to the LPUART TX register by DMA.
param base LPUART peripheral base address. param handle LPUART 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
;
lpuart_edma_transfer_callback_t _lpuart_edma_handle::callback |
Callback function.
uint8_t _lpuart_edma_handle::nbytes |
eDMA minor byte transfer count initially configured.
size_t _lpuart_edma_handle::rxDataSizeAll |
Size of the data to receive.
edma_handle_t* _lpuart_edma_handle::rxEdmaHandle |
The eDMA RX channel used.
volatile uint8_t _lpuart_edma_handle::rxState |
RX transfer state
size_t _lpuart_edma_handle::txDataSizeAll |
Size of the data to send out.
edma_handle_t* _lpuart_edma_handle::txEdmaHandle |
The eDMA TX channel used.
volatile uint8_t _lpuart_edma_handle::txState |
TX transfer state.
void* _lpuart_edma_handle::userData |
LPUART callback function parameter.