/*
*
* Copyright (c) 2024 Texas Instruments Incorporated
*
* All rights reserved not granted herein.
*
* Limited License.
*
* Texas Instruments Incorporated grants a world-wide, royalty-free, non-exclusive
* license under copyrights and patents it now or hereafter owns or controls to make,
* have made, use, import, offer to sell and sell ("Utilize") this software subject to the
* terms herein.  With respect to the foregoing patent license, such license is granted
* solely to the extent that any such patent is necessary to Utilize the software alone.
* The patent license shall not apply to any combinations which include this software,
* other than combinations with devices manufactured by or for TI ("TI Devices").
* No hardware patent is licensed hereunder.
*
* Redistributions must preserve existing copyright notices and reproduce this license
* (including the above copyright notice and the disclaimer and (if applicable) source
* code license limitations below) in the documentation and/or other materials provided
* with the distribution
*
* Redistribution and use in binary form, without modification, are permitted provided
* that the following conditions are met:
*
* *       No reverse engineering, decompilation, or disassembly of this software is
* permitted with respect to any software provided in binary form.
*
* *       any redistribution and use are licensed by TI for use only with TI Devices.
*
* *       Nothing shall obligate TI to provide you with source code for the software
* licensed and provided to you in object code.
*
* If software source code is provided to you, modification and redistribution of the
* source code are permitted provided that the following conditions are met:
*
* *       any redistribution and use of the source code, including any resulting derivative
* works, are licensed by TI for use only with TI Devices.
*
* *       any redistribution and use of any object code compiled from the source code
* and any resulting derivative works, are licensed by TI for use only with TI Devices.
*
* Neither the name of Texas Instruments Incorporated nor the names of its suppliers
*
* may be used to endorse or promote products derived from this software without
* specific prior written permission.
*
* DISCLAIMER.
*
* THIS SOFTWARE IS PROVIDED BY TI AND TI'S LICENSORS "AS IS" AND ANY EXPRESS
* OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
* OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
* IN NO EVENT SHALL TI AND TI'S LICENSORS BE LIABLE FOR ANY DIRECT, INDIRECT,
* INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
* BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
* OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE
* OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
* OF THE POSSIBILITY OF SUCH DAMAGE.
*
*/
/**
 *  \file     Gpt_Cfg.c
 *
 *  \brief    This file contains generated pre-compile configuration file
 *            for GPT MCAL driver
 *
 */
/*
 * Requirements : MCAL-2120,
 */
/*
 * Design : DES_GPT_014, DES_GPT_020
 */
/******************************************************************************
    Project         : 
    Date            : 2026-05-13 13:48:53
    Config SW Ver   : 9.0.1
    Module Rele Ver : AUTOSAR 4.3.1 0

    This file is generated by EB Tresos
    Do not modify this file,otherwise the software may behave in unexpected way.
******************************************************************************/
#include "Std_Types.h"
#include "Gpt.h"
#include "Gpt_Irq.h"
 

#define GPT_START_SEC_CONFIG_DATA
#include "Gpt_MemMap.h"

/** \brief GPT PC Configuration struct declaration */
extern const struct Gpt_ChannelConfigType_PC_s Gpt_ChannelConfig_PC[GPT_MAX_CHANNELS];


CONST(Gpt_ChannelConfigType_PC, GPT_CONFIG_DATA) Gpt_ChannelConfig_PC[2] =
{

    [0] =
    {
        .channelId =   1U,
        /**< Channel Id */
    },
    [1] =
    {
        .channelId =   2U,
        /**< Channel Id */
    }
};




/* Design : DES_GPT_018 */
/* Requirements : MCAL-2119 */
/* Function(s) that would be called for NON Wakeup notification */
extern void StbM_TimerCallback2 (void);
/* Function(s) that would be called for NON Wakeup notification */
extern void StbM_TimerCallback (void);

/*
 * Requirements : MCAL-1954, MCAL-1955, MCAL-1957, MCAL-1958, MCAL-1959,
 *                MCAL-1961, MCAL1962
 */
/*
 * Design : DES_GPT_012, DES_GPT_018, DES_GPT_020
 */
/**
 * \brief All configured channel paramters
 */
static CONST(Gpt_ChannelConfigType, GPT_CONFIG_DATA)
    GptChannelConfigSet_ChannelConfig[2U] =
{

    [0U] =
    {
        .channelMode = (GPT_CH_MODE_CONTINUOUS),
        /**< Gpt Channel Mode */
        .tickValueMax = 0xf0000000U,
        /**< Max Channel Tick Value */
        .enableWakeupFlag = (uint8) TRUE,
        /**< Wakeup Enable Flag */
        .fnPtrNotifyFunction = StbM_TimerCallback2,
        /**< Notification Call Back function */
        .prescale = (uint32) GPT_PRESCALER_NO_PRESCALE,
        /**< Channel clock pre-scaler */
    },
    [1U] =
    {
        .channelMode = (GPT_CH_MODE_CONTINUOUS),
        /**< Gpt Channel Mode */
        .tickValueMax = 0xf0000000U,
        /**< Max Channel Tick Value */
        .enableWakeupFlag = (uint8) FALSE,
        /**< Wakeup Enable Flag */
        .fnPtrNotifyFunction = StbM_TimerCallback,
        /**< Notification Call Back function */
        .prescale = (uint32) GPT_PRESCALER_NO_PRESCALE,
        /**< Channel clock pre-scaler */
    }
};

/*
 * Requirements : MCAL-2122
 */
/*
 * Design : DES_GPT_020, DES_GPT_035
 */
/**
 * \brief GPT Configurations
 */
CONST(struct Gpt_ConfigType_s, GPT_CONFIG_DATA)
    GptChannelConfigSet_PC =
{
    GptChannelConfigSet_ChannelConfig,
    /**< Pointer to Channel Configuration */
    2U
    /**< Number of Channels **/
};




/** \brief Base Address of the timer peripherals */
CONST(uint32, GPT_CONFIG_DATA) Gpt_TimerBaseAddr[GPT_CH_GPTIMER_MAX] =
{
    (uint32)(0x4800000U),    /* MCU TIMER 0 */
    (uint32)(0x4810000U),    /* MCU TIMER 1 */
    (uint32)(0x4820000U),    /* MCU TIMER 2 */
    (uint32)(0x4830000U),    /* MCU TIMER 3 */

};

#define GPT_STOP_SEC_CONFIG_DATA
#include "Gpt_MemMap.h"

#define GPT_START_SEC_ISR_CODE
#include "Gpt_MemMap.h"

/**
*  \brief GPT Channel ISR
*/

/**< Channel ISR */
ISR(Gpt_Ch2Isr)
{
    Gpt_IntISR_Fun(GptConf_GptChannelConfiguration_GptChannelConfiguration_0);
}	


/**< Channel ISR */
ISR(Gpt_Ch3Isr)
{
    Gpt_IntISR_Fun(GptConf_GptChannelConfiguration_GptChannelConfiguration_1);
}	


#define GPT_STOP_SEC_ISR_CODE
#include "Gpt_MemMap.h"
/*----- End of File --------------------------------------------------------*/
