/* param base FlexCAN peripheral base address. param handle FlexCAN handle pointer. param count Number of CAN messages receive so far by the non-blocking transaction. retval kStatus_InvalidArgument count is Invalid. retval kStatus_Success Successfully return the count.  */
status_t FLEXCAN_TransferGetReceiveFifoCount(CAN_Type *base, flexcan_handle_t *handle, size_t *count)
/* param base FlexCAN peripheral base address. param handle FlexCAN handle pointer. param count Number of CAN messages receive so far by the non-blocking transaction. retval kStatus_InvalidArgument count is Invalid. retval kStatus_Success Successfully return the count.  */
status_t FLEXCAN_TransferGetReceiveFifoCount(CAN_Type *base, flexcan_handle_t *handle, size_t *count)
{
    assert(NULL != handle);
    status_t result = kStatus_Success;
    if (handle->rxFifoState == (uint32_t)kFLEXCAN_StateIdle)
    {
        result = kStatus_NoTransferInProgress;
    }
    else
    {
        *count = handle->rxFifoTransferTotalNum - handle->rxFifoFrameNum;
    }
    return result;
}