/* param base FlexCAN peripheral base address. param handle FlexCAN handle pointer. param pFifoXfer FlexCAN Rx FIFO transfer structure. See the ref flexcan_fifo_transfer_t. retval kStatus_Success - Start Rx FIFO receiving process successfully. retval kStatus_FLEXCAN_RxFifoBusy - Rx FIFO is currently in use.  */
status_t FLEXCAN_TransferReceiveFifoNonBlocking(CAN_Type *base, flexcan_handle_t *handle, flexcan_fifo_transfer_t *pFifoXfer)
/* param base FlexCAN peripheral base address. param handle FlexCAN handle pointer. param pFifoXfer FlexCAN Rx FIFO transfer structure. See the ref flexcan_fifo_transfer_t. retval kStatus_Success - Start Rx FIFO receiving process successfully. retval kStatus_FLEXCAN_RxFifoBusy - Rx FIFO is currently in use.  */
status_t FLEXCAN_TransferReceiveFifoNonBlocking(CAN_Type *base, flexcan_handle_t *handle, flexcan_fifo_transfer_t *pFifoXfer)
{
    assert(NULL != handle);
    assert(NULL != pFifoXfer);
    status_t status;
    uint32_t irqMask = (uint32_t)kFLEXCAN_RxFifoOverflowFlag | (uint32_t)kFLEXCAN_RxFifoWarningFlag;
    if ((uint8_t)kFLEXCAN_StateIdle == handle->rxFifoState)
    {
        handle->rxFifoState = (uint8_t)kFLEXCAN_StateRxFifo;
        handle->rxFifoFrameBuf         = pFifoXfer->frame;
        handle->rxFifoFrameNum         = pFifoXfer->frameNum;
        handle->rxFifoTransferTotalNum = pFifoXfer->frameNum;
        if (handle->rxFifoTransferTotalNum < 5U)
        {
            irqMask |= (uint32_t)kFLEXCAN_RxFifoFrameAvlFlag;
        }
        FLEXCAN_EnableMbInterrupts(base, irqMask);
        status = kStatus_Success;
    }
    else
    {
        status = kStatus_FLEXCAN_RxFifoBusy;
    }
    return status;
}