/*!
* @file     Pwm_Cfg.h
*
* @version  1.0.0
*
* @brief    Header file of Pwm parameter configuration
*
* @attention
*
* Project Name      : AUTOSAR MCAL
*
* Platform          : Arm
*
* Autosar Standard  : Classic Platform 4.4.0
*
* Compiled Version  : G32A10xx_MCAL_1_0_0_01-Otc-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 PWM_CFG_H
#define PWM_CFG_H

#ifdef __cplusplus
extern "C" {
#endif

#include "Pwm_Types.h"

/** @addtogroup G32A10xx_StdPeriphDriver
  @{
*/

/** @defgroup PWM_Driver
  * @brief PWM driver modules
  @{
*/

/** @defgroup PWM_Macros
  @{
*/
/*************************************************************************************************
*                              VENDOR ID & AUTOSAR VERSION RECORD INFO
*************************************************************************************************/
/** Vendor ID (vendorId) of the dedicated implementation of this module according to the AUTOSAR vendor list. */
#define PWM_CFG_H_VENDOR_ID                         0x00C1U
/** Module ID of this module, as defined in the BSW Module List [1]. */
#define PWM_CFG_H_MODULE_ID                         0x0079U
/** Major version number of AUTOSAR release on which the appropriate implementation is based on. */
#define PWM_CFG_H_AR_RELEASE_MAJOR_VERSION          0x04U
/** Minor version number of AUTOSAR release on which the appropriate implementation is based on. */
#define PWM_CFG_H_AR_RELEASE_MINOR_VERSION          0x04U
/** Revision version number of AUTOSAR release on which the appropriate implementation is based on. */
#define PWM_CFG_H_AR_RELEASE_REVISION_VERSION       0x00U
/** Major version number of the vendor specific implementation of the module. The numbering is vendor specific. */
#define PWM_CFG_H_SW_MAJOR_VERSION                  0x01U
/** Minor version number of the vendor specific implementation of the module. The numbering is vendor specific. */
#define PWM_CFG_H_SW_MINOR_VERSION                  0x00U
/** Patch level version number of the vendor specific implementation of the module. The numbering is vendor specific. */
#define PWM_CFG_H_SW_PATCH_VERSION                  0x00U

/**@} end of group PWM_Macros */

/*************************************************************************************************
                                VERSION INFOMATION VERIFICATION
*************************************************************************************************/
/* Make sure the vendor id is the same between Pwm_Cfg.h and Pwm_Types.h */
#if (PWM_CFG_H_VENDOR_ID != PWM_TYPES_H_VENDOR_ID)
    #error "Vendor id mismatch between Pwm_Cfg.h and Pwm_Types.h."
#endif
/* Make sure the AUTOSAR major version numbers is the same between Pwm_Cfg.h and Pwm_Types.h */
#if (PWM_CFG_H_AR_RELEASE_MAJOR_VERSION != PWM_TYPES_H_AR_RELEASE_MAJOR_VERSION)
    #error "AUTOSAR Major Version Number mismatch between Pwm_Cfg.h and Pwm_Types.h."
#endif
/* Make sure the AUTOSAR minor version numbers is the same between Pwm_Cfg.h and Pwm_Types.h */
#if (PWM_CFG_H_AR_RELEASE_MINOR_VERSION != PWM_TYPES_H_AR_RELEASE_MINOR_VERSION)
    #error "AUTOSAR Minor Version Number mismatch between Pwm_Cfg.h and Pwm_Types.h."
#endif
/* Make sure the AUTOSAR revision version numbers is the same between Pwm_Cfg.h and Pwm_Types.h */
#if (PWM_CFG_H_AR_RELEASE_REVISION_VERSION !=  PWM_TYPES_H_AR_RELEASE_REVISION_VERSION)
    #error "AUTOSAR Revision Version Number mismatch between Pwm_Cfg.h and Pwm_Types.h."
#endif
/* Make sure the software major version numbers is the same between Pwm_Cfg.h and Pwm_Types.h */
#if (PWM_CFG_H_SW_MAJOR_VERSION != PWM_TYPES_H_SW_MAJOR_VERSION)
    #error "Software Major Version Number mismatch between Pwm_Cfg.h and Pwm_Types.h."
#endif
/* Make sure the software minor version numbers is the same between Pwm_Cfg.h and Pwm_Types.h */
#if (PWM_CFG_H_SW_MINOR_VERSION != PWM_TYPES_H_SW_MINOR_VERSION)
    #error "Software Minor Version Number mismatch between Pwm_Cfg.h and Pwm_Types.h."
#endif
/* Make sure the software patch version numbers is the same between Pwm_Cfg.h and Pwm_Types.h */
#if (PWM_CFG_H_SW_PATCH_VERSION != PWM_TYPES_H_SW_PATCH_VERSION)
    #error "Software Patch Version Number mismatch between Pwm_Cfg.h and Pwm_Types.h."
#endif

/*************************************************************************************************
                                          MACROS DEFINITION
*************************************************************************************************/
/** @defgroup PWM_Macros
  @{
*/

/** Switches the development error detection and notification on or off */
#define PWM_DEV_ERROR_DETECT                      (STD_ON)

/** Switch to indicate that the dual clock functionality is supported */
#define PWM_DUAL_CLOCK_MODE_SUPPORTED             (STD_OFF)

/** Switch to indicate that the notifications is supported */
#define PWM_NOTIFICATION_SUPPORTED                (STD_OFF)

/** Switch to indicate that the low power state is enabled or not */
#define PWM_LOW_POWER_STATE_ENABLE                (STD_OFF)

/** Switch for enabling the update of the period parameter at the end of the current period */
#define PWM_PERIOD_UPDATED_END_PERIOD             (STD_ON)

/** Specifies the InstanceId of this module instance.If only one instance is present it shall have the Id 0. */
#define PWM_INDEX                                 (0U)

/** Switch for enabling the update of the duty cycle parameter at the end of the current period */
#define PWM_DUTY_CYCLE_UPDATED_END_PERIOD         (STD_ON)

/** Switch to indicate that the fault check functionality is supported */
#define PWM_FAULT_CHECK_SUPPORTED                 (STD_OFF)

/** Switch to indicate that the overflow check functionality is supported */
#define PWM_OVERFLOW_CHECK_SUPPORTED              (STD_ON)

/** Adds / removes the service Pwm_SetOutputToActive() from the code */
#define PWM_SET_OUTPUT_TO_ACTIVE                  (STD_ON)

/** Adds / removes the service Pwm_DeInit() from the code */
#define PWM_DE_INIT_API                           (STD_ON)

/** Adds / removes the service Pwm_GetOutputState() from the code */
#define PWM_GET_OUTPUT_STATE_API                  (STD_ON)

/** Adds / removes the service Pwm_SetDutyCycle() from the code */
#define PWM_SET_DUTY_CYCLE_API                    (STD_ON)

/** Adds / removes the service Pwm_SoftwareResetCounter() from the code */
#define PWM_SOFTWARE_RESET_COUNTER                (STD_OFF)

/** Adds / removes the service Pwm_GetChDutyCycleValue() from the code */
#define PWM_GET_CHANNEL_DUTYCYCLE                 (STD_OFF)

/** Adds / removes the service Pwm_SetOutputToIdle() from the code */
#define PWM_SET_OUTPUT_TO_IDLE_API                (STD_ON)

/** Adds / removes the service Pwm_SetPeriodAndDuty() from the code */
#define PWM_SET_PERIOD_AND_DUTY_API               (STD_ON)

/** Adds / removes the service Pwm_GetVersionInfo() from the code */
#define PWM_GET_VERSION_INFO                      (STD_ON)

/** Adds / removes the service Pwm_TurnOnOffChannel() from the code */
#define PWM_TURN_ON_OFF_CHANNEL                   (STD_ON)

/** Set TMR1_REPCENT register value */
#define PWM_REPEAT_NUMBER                         ((uint8)0U)

/** Switches the single pulse mode on or off */
#define PWM_SINGLE_PULSE_MODE                     (STD_OFF)

/** Configured pwm channel symbolic name list */
#define PwmChannel_0                              ((Pwm_ChannelType)0U)
#define PwmChannel_1                              ((Pwm_ChannelType)1U)
#define PwmChannel_2                              ((Pwm_ChannelType)2U)
#define PwmChannel_3                              ((Pwm_ChannelType)3U)

/** To indicate Tmr module's configuration in current Pwm */
#define PWM_TMR1_ENABLE
#define PWM_TMR2_ENABLE
#define PWM_TMR3_ENABLE

/** To indicate the max number of Tmr modules can be configurable */
#define PWM_TMR_MODULE_NUM                       (4U)

/** To indicate the number of channels per Tmr module */
#define PWM_PERTMR_CHANNEL_NUM                   (4U)

/** To indicate the number of Tmr hardware channels */
#define PWM_TMR_CHANNEL_MAXNUM                   (PWM_PERTMR_CHANNEL_NUM * PWM_TMR_MODULE_NUM)

/** To indicate the maximum number of hardware channels configured on current platform */
#define PWM_HW_CHANNELS_NUM                      ((uint8)0U + PWM_TMR_CHANNEL_MAXNUM)

#define PWM_HW_MODULE_CONFIG_NUM                 (PWM_TMR_MODULE_NUM)

/** To indicate the max value of the period */
#define PWM_PERIOD_MAX_VALUE                     (0xFFFFU)

/** To indicate the number of configured channels for TMR */
#define PWM_TMR_CHANNELS_NUM                     (4U)

/** TMR channels first entries index in the array of hardware unit to logic mapping */
#define PWM_CHANNELS_IN_HW_FIRST_MAPINDEX        (0U)

/**@} end of group PWM_Macros */

#ifdef __cplusplus
}
#endif

#endif

/**@} end of group PWM_Driver */
/**@} end of group G32A10xx_StdPeriphDriver */
