/*!
* @file     CanIf.h
*
* @version  1.0.0
*
* @brief    AUTOSAR CanIf module interface. This file is only a sample.
 *           
* @attention
*
* Project Name      : AUTOSAR MCAL
*
* Platform          : Arm
*
* Autosar Standard  : Classic Platform 4.4.0
*
* Compiled Version  : G32A10xx_MCAL_1_0_0_15-Nov-25
*
* Copyright (C) 2026 Geehy Semiconductor
*
* You may not use this file except in compliance with the
* GEEHY COPYRIGHT NOTICE (Geehy Semiconductor Software License Agreement).
*
* The program is only for reference, which is distributed in the hope
* that it will be usefull and instructional for customers to develop
* their software. Unless required by applicable law or agreed to in
* writing, the program is distributed on an "AS IS" BASIS, WITHOUT
* ANY WARRANTY OR CONDITIONS OF ANY KIND, either express or implied.
* See the Geehy Semiconductor Software License Agreement for the governing permissions
* and limitations under the License.
*/

#ifndef _CANIF_H_
#define _CANIF_H_

#ifdef __cplusplus
extern "C"
{
#endif

#include "CanIf_Types.h"
#include "EcuM.h"
#include "CanIf_Cbk.h"
/** @addtogroup G32A10xx_StdPeriphDriver
  @{
*/

/** @defgroup CANIF_Driver
  * @brief CANIF driver modules
  @{
*/

/** @defgroup CANIF_Macros
  @{
*/
/*******************************************************************************
                    VENDOR ID & AUTOSAR VERSION INFO
*******************************************************************************/
/** Vendor ID (vendorId) of the dedicated implementation of this module according to the AUTOSAR vendor list. */
#define CANIF_H_VENDOR_ID                       0x00C1U
/** Module ID of this module, as defined in the BSW Module List. */
#define CANIF_H_MODULE_ID                       0x003CU
/** Major version number of AUTOSAR release on which the appropriate implementation is based on. */
#define CANIF_H_AR_RELEASE_MAJOR_VERSION        0x04U
/** Minor version number of AUTOSAR release on which the appropriate implementation is based on. */
#define CANIF_H_AR_RELEASE_MINOR_VERSION        0x04U
/** Revision version number of AUTOSAR release on which the appropriate implementation is based on. */
#define CANIF_H_AR_RELEASE_REVISION_VERSION     0x00U
/** Major version number of the vendor specific implementation of the module. The numbering is vendor specific. */
#define CANIF_H_SW_MAJOR_VERSION                0x01U
/** Minor version number of the vendor specific implementation of the module. The numbering is vendor specific. */
#define CANIF_H_SW_MINOR_VERSION                0x00U
/** Patch level version number of the vendor specific implementation of the module. The numbering is vendor specific. */
#define CANIF_H_SW_PATCH_VERSION                0x00U

/*******************************************************************************
                                VERSION CHECK
*******************************************************************************/
/* Make sure the vendor id is the same between CanIf.h and CanIf_Cbk.h */
#if (CANIF_H_VENDOR_ID != CANIF_CBK_H_VENDOR_ID)
    #error "Vendor id mismatch between CanIf.h and CanIf_Cbk.h"
#endif
/* Make sure the module id is the same between CanIf.h and CanIf_Cbk.h */
#if (CANIF_H_MODULE_ID != CANIF_CBK_H_MODULE_ID)
    #error "Module id mismatch between CanIf.h and CanIf_Cbk.h"
#endif
/* Make sure the AUTOSAR major version number is the same between CanIf.h and CanIf_Cbk.h */
#if (CANIF_H_AR_RELEASE_MAJOR_VERSION != CANIF_CBK_H_AR_RELEASE_MAJOR_VERSION)
    #error "AUTOSAR major version number mismatch between CanIf.h and CanIf_Cbk.h"
#endif
/* Make sure the AUTOSAR minor version number is the same between CanIf.h and CanIf_Cbk.h */
#if (CANIF_H_AR_RELEASE_MINOR_VERSION != CANIF_CBK_H_AR_RELEASE_MINOR_VERSION)
    #error "AUTOSAR minor version number mismatch between CanIf.h and CanIf_Cbk.h"
#endif
/* Make sure the AUTOSAR revision version number is the same between CanIf.h and CanIf_Cbk.h */
#if (CANIF_H_AR_RELEASE_REVISION_VERSION != CANIF_CBK_H_AR_RELEASE_REVISION_VERSION)
    #error "AUTOSAR revision version number mismatch between CanIf.h and CanIf_Cbk.h"
#endif
/* Make sure the software major version number is the same between CanIf.h and CanIf_Cbk.h */
#if (CANIF_H_SW_MAJOR_VERSION != CANIF_CBK_H_SW_MAJOR_VERSION)
    #error "Software major version number mismatch between CanIf.h and CanIf_Cbk.h"
#endif
/* Make sure the software minor version number is the same between CanIf.h and CanIf_Cbk.h */
#if (CANIF_H_SW_MINOR_VERSION != CANIF_CBK_H_SW_MINOR_VERSION)
    #error "Software minor version number mismatch between CanIf.h and CanIf_Cbk.h"
#endif
/* Make sure the software patch version number is the same between CanIf.h and CanIf_Cbk.h */
#if (CANIF_H_SW_PATCH_VERSION != CANIF_CBK_H_SW_PATCH_VERSION)
    #error "Software patch version number mismatch between CanIf.h and CanIf_Cbk.h"
#endif
/* Make sure the vendor id is the same between CanIf.h and CanIf_Types.h */
#if (CANIF_H_VENDOR_ID != CANIF_TYPES_H_VENDOR_ID)
    #error "Vendor id mismatch between CanIf.h and CanIf_Types.h"
#endif
/* Make sure the module id is the same between CanIf.h and CanIf_Types.h */
#if (CANIF_H_MODULE_ID != CANIF_TYPES_H_MODULE_ID)
    #error "Module id mismatch between CanIf.h and CanIf_Types.h"
#endif
/* Make sure the AUTOSAR major version number is the same between CanIf.h and CanIf_Types.h */
#if (CANIF_H_AR_RELEASE_MAJOR_VERSION != CANIF_TYPES_H_AR_RELEASE_MAJOR_VERSION)
    #error "AUTOSAR major version number mismatch between CanIf.h and CanIf_Types.h"
#endif
/* Make sure the AUTOSAR minor version number is the same between CanIf.h and CanIf_Types.h */
#if (CANIF_H_AR_RELEASE_MINOR_VERSION != CANIF_TYPES_H_AR_RELEASE_MINOR_VERSION)
    #error "AUTOSAR minor version number mismatch between CanIf.h and CanIf_Types.h"
#endif
/* Make sure the AUTOSAR revision version number is the same between CanIf.h and CanIf_Types.h */
#if (CANIF_H_AR_RELEASE_REVISION_VERSION != CANIF_TYPES_H_AR_RELEASE_REVISION_VERSION)
    #error "AUTOSAR revision version number mismatch between CanIf.h and CanIf_Types.h"
#endif
/* Make sure the software major version number is the same between CanIf.h and CanIf_Types.h */
#if (CANIF_H_SW_MAJOR_VERSION != CANIF_TYPES_H_SW_MAJOR_VERSION)
    #error "Software major version number mismatch between CanIf.h and CanIf_Types.h"
#endif
/* Make sure the software minor version number is the same between CanIf.h and CanIf_Types.h */
#if (CANIF_H_SW_MINOR_VERSION != CANIF_TYPES_H_SW_MINOR_VERSION)
    #error "Software minor version number mismatch between CanIf.h and CanIf_Types.h"
#endif
/* Make sure the software patch version number is the same between CanIf.h and CanIf_Types.h */
#if (CANIF_H_SW_PATCH_VERSION != CANIF_TYPES_H_SW_PATCH_VERSION)
    #error "Software patch version number mismatch between CanIf.h and CanIf_Types.h"
#endif

#ifdef ENABLE_INTERMODULE_MCAL_CHECK
    /* Make sure the AUTOSAR major version number is the same between CanIf.h and EcuM.h */
    #if (CANIF_H_AR_RELEASE_MAJOR_VERSION != ECUM_H_AR_RELEASE_MAJOR_VERSION)
        #error "AUTOSAR major version number mismatch between CanIf.h and EcuM.h"
    #endif
    /* Make sure the AUTOSAR minor version number is the same between CanIf.h and EcuM.h */
    #if (CANIF_H_AR_RELEASE_MINOR_VERSION != ECUM_H_AR_RELEASE_MINOR_VERSION)
        #error "AUTOSAR minor version number mismatch between CanIf.h and EcuM.h"
    #endif
#endif

/*******************************************************************************
                            MACRO DECLARATIONS
*******************************************************************************/
#define CANIF_WAKEUP_SUPPORT    (STD_ON)
/**@} end of group CANIF_Macros */
/*******************************************************************************
                            FUNCTION DECLARATIONS
*******************************************************************************/
/** @defgroup CANIF_Fuctions
  @{
*/
#if (STD_ON == CANIF_WAKEUP_SUPPORT)
FUNC (Std_ReturnType, CANIF_CODE) CanIf_CheckWakeup(
    VAR(EcuM_WakeupSourceType, CANIF_VAR) WakeupSource);
#endif /* STD_ON == CANIF_WAKEUP_SUPPORT */

/**@} end of group CANIF_Fuctions */
#ifdef __cplusplus
}
#endif

#endif /* CANIF_H */
/**@} end of group CANIF_Driver */
/**@} end of group G32A10xx_StdPeriphDriver */
