rusEFI
The most advanced open source ECU
|
Data Structures | |
struct | _lpuart_edma_handle |
LPUART eDMA handle. More... | |
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. | |
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. | |
typedef struct _lpuart_edma_handle lpuart_edma_handle_t |
Definition at line 30 of file fsl_lpuart_edma.h.
typedef void(* lpuart_edma_transfer_callback_t) (LPUART_Type *base, lpuart_edma_handle_t *handle, status_t status, void *userData) |
LPUART transfer callback function.
Definition at line 33 of file fsl_lpuart_edma.h.
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.
Definition at line 287 of file fsl_lpuart_edma.c.
Referenced by uart_lld_start_receive().
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.
Definition at line 233 of file fsl_lpuart_edma.c.
Referenced by uart_lld_start_send().
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.
Definition at line 358 of file fsl_lpuart_edma.c.
Referenced by LPUART_ReceiveEDMACallback(), and uart_lld_stop_receive().
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.
Definition at line 336 of file fsl_lpuart_edma.c.
Referenced by LPUART_SendEDMACallback(), and uart_lld_stop_send().
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. 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.
Definition at line 167 of file fsl_lpuart_edma.c.
Referenced by uart_lld_start().
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
;
Definition at line 384 of file fsl_lpuart_edma.c.
Referenced by uart_lld_stop_receive().
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
;
Definition at line 415 of file fsl_lpuart_edma.c.
lpuart_edma_transfer_callback_t _lpuart_edma_handle::callback |
Callback function.
Definition at line 43 of file fsl_lpuart_edma.h.
Referenced by LPUART_TransferCreateHandleEDMA().
uint8_t _lpuart_edma_handle::nbytes |
eDMA minor byte transfer count initially configured.
Definition at line 51 of file fsl_lpuart_edma.h.
Referenced by LPUART_ReceiveEDMA(), LPUART_SendEDMA(), LPUART_TransferGetReceiveCountEDMA(), and LPUART_TransferGetSendCountEDMA().
size_t _lpuart_edma_handle::rxDataSizeAll |
Size of the data to receive.
Definition at line 45 of file fsl_lpuart_edma.h.
Referenced by LPUART_ReceiveEDMA(), LPUART_TransferGetReceiveCountEDMA(), and uart_lld_stop_receive().
edma_handle_t* _lpuart_edma_handle::rxEdmaHandle |
The eDMA RX channel used.
Definition at line 49 of file fsl_lpuart_edma.h.
Referenced by LPUART_ReceiveEDMA(), LPUART_TransferAbortReceiveEDMA(), LPUART_TransferCreateHandleEDMA(), and LPUART_TransferGetReceiveCountEDMA().
volatile uint8_t _lpuart_edma_handle::rxState |
RX transfer state
Definition at line 54 of file fsl_lpuart_edma.h.
Referenced by LPUART_ReceiveEDMA(), LPUART_TransferAbortReceiveEDMA(), LPUART_TransferCreateHandleEDMA(), and LPUART_TransferGetReceiveCountEDMA().
size_t _lpuart_edma_handle::txDataSizeAll |
Size of the data to send out.
Definition at line 46 of file fsl_lpuart_edma.h.
Referenced by LPUART_SendEDMA(), and LPUART_TransferGetSendCountEDMA().
edma_handle_t* _lpuart_edma_handle::txEdmaHandle |
The eDMA TX channel used.
Definition at line 48 of file fsl_lpuart_edma.h.
Referenced by LPUART_SendEDMA(), LPUART_TransferAbortSendEDMA(), LPUART_TransferCreateHandleEDMA(), and LPUART_TransferGetSendCountEDMA().
volatile uint8_t _lpuart_edma_handle::txState |
TX transfer state.
Definition at line 53 of file fsl_lpuart_edma.h.
Referenced by LPUART_SendEDMA(), LPUART_TransferAbortSendEDMA(), LPUART_TransferCreateHandleEDMA(), and LPUART_TransferGetSendCountEDMA().
void* _lpuart_edma_handle::userData |
LPUART callback function parameter.
Definition at line 44 of file fsl_lpuart_edma.h.
Referenced by LPUART_TransferCreateHandleEDMA().