/* 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(handle);
    if (base->MCR & CAN_MCR_RFEN_MASK)
    {
        FLEXCAN_DisableMbInterrupts(
            base, kFLEXCAN_RxFifoOverflowFlag | kFLEXCAN_RxFifoWarningFlag | kFLEXCAN_RxFifoFrameAvlFlag);
        handle->rxFifoFrameBuf = 0x0;
    }
    handle->rxFifoState = kFLEXCAN_StateIdle;
}