/*!
* @file     Ocu_Cfg.h
*
* @version  1.0.0
*
* @brief    This file includes the configuration parameters of the Ocu module.
*          
* @attention
*
* Project Name      : AUTOSAR MCAL
*
* Platform          : Arm
*
* Autosar Standard  : Classic Platform 4.4.0
*
* Compiled Version  : G32A10xx_MCAL_1_0_0_15-Nov-2
*
* 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 OCU_CFG_H
#define OCU_CFG_H

#ifdef __cplusplus
extern "C" {
#endif  /* ifdef __cplusplus */

#include "Ocu_Types.h"
/** @addtogroup G32A10xx_StdPeriphDriver
  @{
*/

/** @defgroup OCU_Driver
  * @brief OCU driver modules
  @{
*/

/** @defgroup OCU_Macros
  @{
*/
/**********************************************************************************************************************
                                    VENDOR ID & AUTOSAR VERSION INFO
***********************************************************************************************************************/
/** Vendor ID (vendorId) of the dedicated implementation of this module according to the AUTOSAR vendor list. */
#define OCU_CFG_H_VENDOR_ID                      0x00C1U
/** Module ID of this module, as defined in the BSW Module List. */
#define OCU_CFG_H_MODULE_ID                      0x007DU
/** Major version number of AUTOSAR release on which the appropriate implementation is based on. */ 
#define OCU_CFG_H_AR_RELEASE_MAJOR_VERSION       0x04U
/** Minor version number of AUTOSAR release on which the appropriate implementation is based on. */
#define OCU_CFG_H_AR_RELEASE_MINOR_VERSION       0x04U
/** Revision version number of AUTOSAR release on which the appropriate implementation is based on. */
#define OCU_CFG_H_AR_RELEASE_REVISION_VERSION    0x00U
/** Major version number of the vendor specific implementation of the module. The numbering is vendor specific. */ 
#define OCU_CFG_H_SW_MAJOR_VERSION               0x01U
/** Minor version number of the vendor specific implementation of the module. The numbering is vendor specific. */
#define OCU_CFG_H_SW_MINOR_VERSION               0x00U
/** Patch level version number of the vendor specific implementation of the module. The numbering is vendor specific. */
#define OCU_CFG_H_SW_PATCH_VERSION               0x00U

/**********************************************************************************************************************           
                                      VERSION INFOMATION VERIFICATION
***********************************************************************************************************************/
#if (OCU_CFG_H_VENDOR_ID != OCU_TYPES_H_VENDOR_ID)
    #error "Vendor ids mismatch between Ocu_Cfg.h and Ocu_Types.h"
#endif  /* {if (OCU_CFG_H_VENDOR_ID != OCU_TYPES_H_VENDOR_ID)} */

/* Make sure the AUTOSAR major version number is the same between Ocu_Cfg.h and Ocu_Types.h */
#if (OCU_CFG_H_AR_RELEASE_MAJOR_VERSION != OCU_TYPES_H_AR_RELEASE_MAJOR_VERSION)
    #error "AUTOSAR Major Version Number mismatch between Ocu_Cfg.h and Ocu_Types.h"
#endif
/* Make sure the AUTOSAR minor version number is the same between Ocu_Cfg.h and Ocu_Types.h */
#if (OCU_CFG_H_AR_RELEASE_MINOR_VERSION != OCU_TYPES_H_AR_RELEASE_MINOR_VERSION)
    #error "AUTOSAR Minor Version Number mismatch between Ocu_Cfg.h and Ocu_Types.h"
#endif
/* Make sure the AUTOSAR revision version number is the same between Ocu_Cfg.h and Ocu_Types.h */
#if (OCU_CFG_H_AR_RELEASE_REVISION_VERSION !=  OCU_TYPES_H_AR_RELEASE_REVISION_VERSION)
    #error "AUTOSAR Revision Version Number mismatch between Ocu_Cfg.h and Ocu_Types.h"
#endif

/* Make sure the software major version number is the same between Ocu_Cfg.h and Ocu_Types.h */
#if (OCU_CFG_H_SW_MAJOR_VERSION != OCU_TYPES_H_SW_MAJOR_VERSION)
    #error "Software Major Version Number mismatch between Ocu_Cfg.h and Ocu_Types.h"
#endif
/* Make sure the software minor version number is the same between Ocu_Cfg.h and Ocu_Types.h */
#if (OCU_CFG_H_SW_MINOR_VERSION != OCU_TYPES_H_SW_MINOR_VERSION)
    #error "Software Minor Version Number mismatch between Ocu_Cfg.h and Ocu_Types.h"
#endif
/* Make sure the software patch version number is the same between Ocu_Cfg.h and Ocu_Types.h */
#if (OCU_CFG_H_SW_PATCH_VERSION != OCU_TYPES_H_SW_PATCH_VERSION)
    #error "Software Patch Version Number mismatch between Ocu_Cfg.h and Ocu_Types.h"
#endif

/**********************************************************************************************************************
                                            MACRO DEFINITION
***********************************************************************************************************************/
/** Enable or disable the notifications */
#define OCU_NOTIFICATION_EN        (STD_ON)

/** The configuration of the Ocu channels ISR */
#if (STD_ON == OCU_NOTIFICATION_EN)
    /** OCU_TMR1 interrupt enalbed */
    #define OCU_TMR1_ISR_ENABLE
    /** OCU_TMR2 interrupt enalbed */
    #define OCU_TMR2_ISR_ENABLE
    /** OCU_TMR3 interrupt enalbed */
    #define OCU_TMR3_ISR_ENABLE
    /** OCU_TMR4 interrupt enalbed */
    #define OCU_TMR4_ISR_ENABLE
#endif  /* {if (STD_ON == OCU_NOTIFICATION_EN)} */

/** The configured channels names */
/** The Ocu channel id:0 for the channel name:OcuChannel_0 */
#define OcuChannel_0              ((Ocu_ChannelType)0x00U)
/** The Ocu channel id:1 for the channel name:OcuChannel_1 */
#define OcuChannel_1              ((Ocu_ChannelType)0x01U)
/** The Ocu channel id:2 for the channel name:OcuChannel_2 */
#define OcuChannel_2              ((Ocu_ChannelType)0x02U)
/** The Ocu channel id:3 for the channel name:OcuChannel_3 */
#define OcuChannel_3              ((Ocu_ChannelType)0x03U)
/** The Ocu channel id:4 for the channel name:OcuChannel_4 */
#define OcuChannel_4              ((Ocu_ChannelType)0x04U)
/** The Ocu channel id:5 for the channel name:OcuChannel_5 */
#define OcuChannel_5              ((Ocu_ChannelType)0x05U)
/** The Ocu channel id:6 for the channel name:OcuChannel_6 */
#define OcuChannel_6              ((Ocu_ChannelType)0x06U)
/** The Ocu channel id:7 for the channel name:OcuChannel_7 */
#define OcuChannel_7              ((Ocu_ChannelType)0x07U)
/** The Ocu channel id:8 for the channel name:OcuChannel_8 */
#define OcuChannel_8              ((Ocu_ChannelType)0x08U)
/** The Ocu channel id:9 for the channel name:OcuChannel_9 */
#define OcuChannel_9              ((Ocu_ChannelType)0x09U)
/** The Ocu channel id:10 for the channel name:OcuChannel_10 */
#define OcuChannel_10              ((Ocu_ChannelType)0x0aU)
/** The Ocu channel id:11 for the channel name:OcuChannel_11 */
#define OcuChannel_11              ((Ocu_ChannelType)0x0bU)
/** The Ocu channel id:12 for the channel name:OcuChannel_12 */
#define OcuChannel_12              ((Ocu_ChannelType)0x0cU)
/** The Ocu channel id:13 for the channel name:OcuChannel_13 */
#define OcuChannel_13              ((Ocu_ChannelType)0x0dU)
/** The Ocu channel id:14 for the channel name:OcuChannel_14 */
#define OcuChannel_14              ((Ocu_ChannelType)0x0eU)
/** The Ocu channel id:15 for the channel name:OcuChannel_15 */
#define OcuChannel_15              ((Ocu_ChannelType)0x0fU)

#define OCU_CH_COUNT_SUPPORTED     (16U)

/** Every Tmr module has four channels */
#define OCU_TMR_MODULE_CHANNEL_COUNT            (0x04U)

/** The max TMR channels count of the current platform */
#define OCU_TMR_HW_CH_MAX_COUNT                 (16U)

/** The max TMR channels each module of the current platform */
#define OCU_TMR_CHANNEL_COUNT_PER_MODULE        ((uint8)4U)

/** The max TMR modules of the current platform */
#define OCU_TMR_HW_MODULE_COUNT                 ((uint8)4U)

/** Enable or disable the Ocu_DeInit API */
#define OCU_DEINIT_API_ENABLE                   (STD_ON)

/** Enable or disable the Ocu_SetAbsoluteThreshold API */
#define OCU_SET_ABSOLUTE_THRESHOLD_API          (STD_ON)

/** Enable or disable the Ocu_SetRelativeThreshold API */
#define OCU_SET_RELATIVE_THRESHOLD_API          (STD_ON)

/** Enable or disable the Ocu_SetPinState API */
#define OCU_SET_PIN_STATE_API                   (STD_ON)

/** Enable or disable the Ocu_GetCounter API */
#define OCU_GET_COUNTER_API                     (STD_ON)

/** Enable or disable the Ocu_SetPinAction API */
#define OCU_SET_PIN_ACTION_API                  (STD_ON)

/** Enable or disable the Ocu_GetVersionInfo API */
#define OCU_VERSION_INFO_API                    (STD_ON)

/** Enable or disable the development error detection and notification */
#define OCU_DEV_ERR_DETECT_ENABLE               (STD_OFF)

#define OCU_TMR_HW_CHANNEL_TOTAL_COUNT       (uint8)(OCU_TMR_HW_MODULE_COUNT * OCU_TMR_CHANNEL_COUNT_PER_MODULE)

/** The max hardware channels of the Ocu driver */
#define  OCU_HW_CHANNEL_COUNT                   (OCU_TMR_HW_CHANNEL_TOTAL_COUNT)

/** Enable or disable the Ocu_SetClkPsc API */
#define OCU_SET_CLOCK_MODE_API_ENABLE           (STD_ON)

#define OCU_CONFIGURATION_POST_BUILD \
    extern CONST(Ocu_ConfigType, OCU_CONST) g_ocuConfig;
/**@} end of group OCU_Macros */

#ifdef __cplusplus
}
#endif  /* ifdef __cplusplus */

#endif    /* ifndef OCU_CFG_H */
/**@} end of group OCU_Driver */
/**@} end of group G32A10xx_StdPeriphDriver */
