/* param base FlexCAN peripheral base address. param handle FlexCAN handle pointer.  */
void FLEXCAN_TransferAbortReceiveFifo(CAN_Type *base, flexcan_handle_t *handle)
/* param base FlexCAN peripheral base address. param handle FlexCAN handle pointer.  */
void FLEXCAN_TransferAbortReceiveFifo(CAN_Type *base, flexcan_handle_t *handle)
{
    assert(NULL != handle);
    if (0U != (base->MCR & CAN_MCR_RFEN_MASK))
    {
        FLEXCAN_DisableMbInterrupts(base, (uint32_t)kFLEXCAN_RxFifoOverflowFlag | (uint32_t)kFLEXCAN_RxFifoWarningFlag |
                                              (uint32_t)kFLEXCAN_RxFifoFrameAvlFlag);
        handle->rxFifoFrameBuf = NULL;
    }
    handle->rxFifoState = (uint8_t)kFLEXCAN_StateIdle;
}