MCUXpresso SDK API Reference Manual
Rev. 0
NXP Semiconductors
|
Data Structures | |
struct | flexcan_edma_handle_t |
FlexCAN eDMA handle. More... | |
Typedefs | |
typedef void(* | flexcan_edma_transfer_callback_t )(CAN_Type *base, flexcan_edma_handle_t *handle, status_t status, void *userData) |
FlexCAN transfer callback function. More... | |
Driver version | |
#define | FSL_FLEXCAN_EDMA_DRIVER_VERSION (MAKE_VERSION(2, 5, 1)) |
FlexCAN EDMA driver version 2.5.1. More... | |
eDMA transactional | |
void | FLEXCAN_TransferCreateHandleEDMA (CAN_Type *base, flexcan_edma_handle_t *handle, flexcan_edma_transfer_callback_t callback, void *userData, edma_handle_t *rxFifoEdmaHandle) |
Initializes the FlexCAN handle, which is used in transactional functions. More... | |
void | FLEXCAN_PrepareTransfConfiguration (CAN_Type *base, flexcan_fifo_transfer_t *pFifoXfer, edma_transfer_config_t *pEdmaConfig) |
Prepares the eDMA transfer configuration for FLEXCAN Legacy RX FIFO. More... | |
status_t | FLEXCAN_StartTransferDatafromRxFIFO (CAN_Type *base, flexcan_edma_handle_t *handle, edma_transfer_config_t *pEdmaConfig) |
Start Transfer Data from the FLEXCAN Legacy Rx FIFO using eDMA. More... | |
status_t | FLEXCAN_TransferReceiveFifoEDMA (CAN_Type *base, flexcan_edma_handle_t *handle, flexcan_fifo_transfer_t *pFifoXfer) |
Receives the CAN Message from the Rx FIFO using eDMA. More... | |
void | FLEXCAN_TransferAbortReceiveFifoEDMA (CAN_Type *base, flexcan_edma_handle_t *handle) |
Aborts the receive process which used eDMA. More... | |
struct _flexcan_edma_handle |
Data Fields | |
flexcan_edma_transfer_callback_t | callback |
Callback function. More... | |
void * | userData |
FlexCAN callback function parameter. More... | |
edma_handle_t * | rxFifoEdmaHandle |
The EDMA Rx FIFO channel used. More... | |
volatile uint8_t | rxFifoState |
Rx FIFO transfer state. More... | |
flexcan_edma_transfer_callback_t flexcan_edma_handle_t::callback |
void* flexcan_edma_handle_t::userData |
edma_handle_t* flexcan_edma_handle_t::rxFifoEdmaHandle |
volatile uint8_t flexcan_edma_handle_t::rxFifoState |
#define FSL_FLEXCAN_EDMA_DRIVER_VERSION (MAKE_VERSION(2, 5, 1)) |
typedef void(* flexcan_edma_transfer_callback_t)(CAN_Type *base, flexcan_edma_handle_t *handle, status_t status, void *userData) |
void FLEXCAN_TransferCreateHandleEDMA | ( | CAN_Type * | base, |
flexcan_edma_handle_t * | handle, | ||
flexcan_edma_transfer_callback_t | callback, | ||
void * | userData, | ||
edma_handle_t * | rxFifoEdmaHandle | ||
) |
base | FlexCAN peripheral base address. |
handle | Pointer to flexcan_edma_handle_t structure. |
callback | The callback function. |
userData | The parameter of the callback function. |
rxFifoEdmaHandle | User-requested DMA handle for Rx FIFO DMA transfer. |
void FLEXCAN_PrepareTransfConfiguration | ( | CAN_Type * | base, |
flexcan_fifo_transfer_t * | pFifoXfer, | ||
edma_transfer_config_t * | pEdmaConfig | ||
) |
This function prepares the eDMA transfer configuration structure according to FLEXCAN Legacy RX FIFO.
base | FlexCAN peripheral base address. |
pFifoXfer | FlexCAN Rx FIFO EDMA transfer structure, see flexcan_fifo_transfer_t. |
pEdmaConfig | The user configuration structure of type edma_transfer_t. |
status_t FLEXCAN_StartTransferDatafromRxFIFO | ( | CAN_Type * | base, |
flexcan_edma_handle_t * | handle, | ||
edma_transfer_config_t * | pEdmaConfig | ||
) |
This function to Update edma transfer confiugration and Start eDMA transfer
base | FlexCAN peripheral base address. |
handle | Pointer to flexcan_edma_handle_t structure. |
pEdmaConfig | The user configuration structure of type edma_transfer_t. |
kStatus_Success | if succeed, others failed. |
kStatus_FLEXCAN_RxFifoBusy | Previous transfer ongoing. |
status_t FLEXCAN_TransferReceiveFifoEDMA | ( | CAN_Type * | base, |
flexcan_edma_handle_t * | handle, | ||
flexcan_fifo_transfer_t * | pFifoXfer | ||
) |
This function receives the CAN Message using eDMA. This is a non-blocking function, which returns right away. After the CAN Message is received, the receive callback function is called.
base | FlexCAN peripheral base address. |
handle | Pointer to flexcan_edma_handle_t structure. |
pFifoXfer | FlexCAN Rx FIFO EDMA transfer structure, see flexcan_fifo_transfer_t. |
kStatus_Success | if succeed, others failed. |
kStatus_FLEXCAN_RxFifoBusy | Previous transfer ongoing. |
void FLEXCAN_TransferAbortReceiveFifoEDMA | ( | CAN_Type * | base, |
flexcan_edma_handle_t * | handle | ||
) |
This function aborts the receive process which used eDMA.
base | FlexCAN peripheral base address. |
handle | Pointer to flexcan_edma_handle_t structure. |