/* param base FlexCAN peripheral base address. param handle Pointer to flexcan_edma_handle_t structure. param callback The callback function. param userData The parameter of the callback function. param rxFifoEdmaHandle User-requested DMA handle for Rx FIFO DMA transfer.  */
void FLEXCAN_TransferCreateHandleEDMA(CAN_Type *base, flexcan_edma_handle_t *handle, flexcan_edma_transfer_callback_t callback, void *userData, edma_handle_t *rxFifoEdmaHandle)
/* param base FlexCAN peripheral base address. param handle Pointer to flexcan_edma_handle_t structure. param callback The callback function. param userData The parameter of the callback function. param rxFifoEdmaHandle User-requested DMA handle for Rx FIFO DMA transfer.  */
void FLEXCAN_TransferCreateHandleEDMA(CAN_Type *base, flexcan_edma_handle_t *handle, flexcan_edma_transfer_callback_t callback, void *userData, edma_handle_t *rxFifoEdmaHandle)
{
    assert(NULL != handle);
    uint32_t instance                           = FLEXCAN_GetInstance(base);
    s_flexcanEdmaPrivateHandle[instance].base   = base;
    s_flexcanEdmaPrivateHandle[instance].handle = handle;
    (void)memset(handle, 0, sizeof(flexcan_edma_handle_t));
    handle->rxFifoState      = (uint8_t)KFLEXCAN_RxFifoIdle;
    handle->rxFifoEdmaHandle = rxFifoEdmaHandle;
    handle->callback = callback;
    handle->userData = userData;
    EDMA_SetCallback(handle->rxFifoEdmaHandle, FLEXCAN_ReceiveFifoEDMACallback, &s_flexcanEdmaPrivateHandle[instance]);
}