/*!
* @file     Gpt_PBcfg.c
*
* @version  1.0.0
*
* @brief    This file includes the configuration parameters of the Gpt module.
*
* @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.
*/


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

#include "Gpt_Cfg.h"
#include "Gpt.h"

/** @addtogroup G32A10xx_StdPeriphDriver
  @{
*/

/** @defgroup GPT_Driver
  @{
*/

/** @defgroup GPT_Macros
  @{
*/
/*******************************************************************************
                    VENDOR ID & AUTOSAR VERSION INFO
*******************************************************************************/
/** Vendor ID (vendorId) of the dedicated implementation of this module according to the AUTOSAR vendor list. */
#define GPT_PBCFG_VENDOR_ID                              0x00C1U
/** Major version number of AUTOSAR release on which the appropriate implementation is based on. */
#define GPT_PBCFG_AR_RELEASE_MAJOR_VERSION               0x04U
/** Minor version number of AUTOSAR release on which the appropriate implementation is based on. */
#define GPT_PBCFG_AR_RELEASE_MINOR_VERSION               0x04U
/** Revision version number of AUTOSAR release on which the appropriate implementation is based on. */
#define GPT_PBCFG_AR_RELEASE_REVISION_VERSION            0x00U
/** Major version number of the vendor specific implementation of the module. The numbering is vendor specific. */ 
#define GPT_PBCFG_SW_MAJOR_VERSION                       0x01U
/** Minor version number of the vendor specific implementation of the module. The numbering is vendor specific. */
#define GPT_PBCFG_SW_MINOR_VERSION                       0x00U
/** Patch level version number of the vendor specific implementation of the module. The numbering is vendor specific. */
#define GPT_PBCFG_SW_PATCH_VERSION                       0x00U

/**@} end of group GPT_Macros */
/**********************************************************************************************************************
                                        VERSION INFOMATION VERIFICATION
***********************************************************************************************************************/
/** @defgroup GPT_Variable
  @{
*/
extern void Wdg_GptCallbackFunction0(void);

/**********************************************************************************************************************
                                             GLOBAL VARIABLE
***********************************************************************************************************************/
static CONST(Gpt_ChannelType,ICU_CONST) g_gptInitHwMap[GPT_TOTAL_CHANNELS_NUMBER] =
{
    Gpt_ConfigRef_GptChannelConfiguration_0,/** maps to TMR1_CH1 */
    GPT_CHANNEL_NUMBER,/** maps to TMR1_CH2 */
    GPT_CHANNEL_NUMBER,/** maps to TMR1_CH3 */
    GPT_CHANNEL_NUMBER,/** maps to TMR1_CH4 */
    
    GPT_CHANNEL_NUMBER,/** maps to TMR2_CH1 */
    GPT_CHANNEL_NUMBER,/** maps to TMR2_CH2 */
    GPT_CHANNEL_NUMBER,/** maps to TMR2_CH3 */
    GPT_CHANNEL_NUMBER,/** maps to TMR2_CH4 */
    
    GPT_CHANNEL_NUMBER,/** maps to TMR3_CH1 */
    GPT_CHANNEL_NUMBER,/** maps to TMR3_CH2 */
    GPT_CHANNEL_NUMBER,/** maps to TMR3_CH3 */
    GPT_CHANNEL_NUMBER,/** maps to TMR3_CH4 */
    
    GPT_CHANNEL_NUMBER,/** maps to TMR4_CH1 */
    GPT_CHANNEL_NUMBER,/** maps to TMR4_CH2 */
    GPT_CHANNEL_NUMBER,/** maps to TMR4_CH3 */
    GPT_CHANNEL_NUMBER,/** maps to TMR4_CH4 */
    
    GPT_CHANNEL_NUMBER,/** maps to TMR6 */
    GPT_CHANNEL_NUMBER,/** maps to TMR7 */
    GPT_CHANNEL_NUMBER,/** maps to TMR8 */
};

static CONST(Gpt_HwUnitConfigType,ICU_CONST) g_gptTmrGlobalConfig[GPT_HW_TIMER_NUM] =
{
    {
        .HardwareUnitId = GPT_TMR1,
        .ChannelMode = GPT_COUNT_MODE_CONTINUOUS,
        .ChannelNum = 1,
        .ChannelPrescaler = 1023,
    }
};


static CONST(Gpt_ChannelConfigType,ICU_CONST) g_gptHwChannelConfig[GPT_CHANNEL_IDX_NUM] =
{
    {
        .ChannelId = Gpt_ConfigRef_GptChannelConfiguration_0,
        .HwChannel = TMR_1_CHANNEL_1,
        .Notification = Wdg_GptCallbackFunction0,
        .ChannelValueMax = 0xFFFF,
        .EnableWakeup = FALSE,
        .Gpt_WakeupSource = 100
    }
};

const Gpt_ConfigType g_gptConfg = 
{
    .Gpt_ChannelCount = GPT_CHANNEL_IDX_NUM,
    .gptHwMapPtr = g_gptInitHwMap,
    .gptTmrConfigPtr = g_gptTmrGlobalConfig,
    .ChannelConfig = g_gptHwChannelConfig,
};

/**@} end of group GPT_Variable */

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

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