/*!
* @file    Mcu_DbgMcuTypes.h
*
* @version  1.0.0
*
* @brief   Data Type Definition File for the MCU Module Based on DBGMCU IP.
*
* @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 MCU_DBGMCUTYPES_H
#define MCU_DBGMCUTYPES_H

#ifdef __cplusplus
extern "C"{
#endif

 
#include "StdRegMacros.h"
#include "Compiler_Cfg.h"
#include "Compiler.h"

/** @addtogroup G32A10xx_StdPeriphDriver
  @{
*/

/** @addtogroup MCU_Driver
  @{
*/

/** @defgroup MCU_Macros
  @{
*/
/*******************************************************************************
                    VENDOR ID & AUTOSAR VERSION INFO
*******************************************************************************/
/** Vendor ID (vendorId) of the dedicated implementation of this module according to the AUTOSAR vendor list. */
#define MCU_DBGMCU_TYPES_H_VENDOR_ID                       0x00C1U
/** Major version number of AUTOSAR release on which the appropriate implementation is based on. */
#define MCU_DBGMCU_TYPES_H_AR_RELEASE_MAJOR_VERSION        0x04U
/** Minor version number of AUTOSAR release on which the appropriate implementation is based on. */
#define MCU_DBGMCU_TYPES_H_AR_RELEASE_MINOR_VERSION        0x04U
/** Revision version number of AUTOSAR release on which the appropriate implementation is based on. */
#define MCU_DBGMCU_TYPES_H_AR_RELEASE_REVISION_VERSION     0x00U
/** Major version number of the vendor specific implementation of the module. The numbering is vendor specific. */
#define MCU_DBGMCU_TYPES_H_SW_MAJOR_VERSION                0x01U
/** Minor version number of the vendor specific implementation of the module. The numbering is vendor specific. */
#define MCU_DBGMCU_TYPES_H_SW_MINOR_VERSION                0x00U
/** Patch level version number of the vendor specific implementation of the module. The numbering is vendor specific. */
#define MCU_DBGMCU_TYPES_H_SW_PATCH_VERSION                0x00U

/**@} end of group MCU_Macros */
/**************************************************************************
                    ENUMERATION DEFINITION
**************************************************************************/
/** @defgroup MCU_Enumerations
  @{
*/

/**
* @brief   MCU Debug mode in the APB peripheral behavior
*/
typedef enum
{
    DBG_APB1_PER_TMR2 = ((uint32)0x01), //!< TMR2 counter stopped when Core is halted
    DBG_APB1_PER_TMR3 = ((uint32)0x02), //!< TMR3 counter stopped when Core is halted
    DBG_APB1_PER_TMR6 = ((uint32)0x03), //!< TMR6 counter stopped when Core is halted
    DBG_APB1_PER_TMR4 = ((uint32)0x04), //!< TMR4 counter stopped when Core is halted
    DBG_APB1_PER_RTC  = ((uint32)0x05), //!< RTC counter stopped when Core is halted
    DBG_APB1_PER_IWDT = ((uint32)0x06), //!< Debug IWDT stopped when Core is halted
    DBG_APB2_PER_TMR1 = ((uint32)0x07), //!< TMR1 counter stopped when Core is halted
    DBG_APB2_PER_TMR7 = ((uint32)0x08), //!< TMR7 counter stopped when Core is halted
    DBG_APB2_PER_TMR8 = ((uint32)0x09)  //!< TMR8 counter stopped when Core is halted
} Mcu_DbgMcu_APBPerType;

/**@} end of group MCU_Enumerations */
/*******************************************************************************
                            STRUCT DEFINITION
*******************************************************************************/
/** @defgroup MCU_Structure
  @{
*/

typedef struct
{
    const Mcu_DbgMcu_APBPerType module;     //!< module select
    const boolean enable;   //!< enable or disable
} Mcu_DbgMcu_WorkStatusCfgTypes;

typedef struct
{
    const boolean stopEnable;
    const boolean standbyEnable;
    const Mcu_DbgMcu_WorkStatusCfgTypes * work;
} Mcu_DbgMcu_CfgTypes;

/**@} end of group MCU_Structure */
/*******************************************************************************
                            FUNCTION DECLARATION
*******************************************************************************/
#define MCU_START_SEC_CODE
#include "Mcu_MemMap.h"

/** @defgroup MCU_Fuctions
  @{
*/

FUNC(void, MCU_CODE) Mcu_DbgMcu_ConfigStopMode(boolean enable);
FUNC(void, MCU_CODE) Mcu_DbgMcu_ConfigStandbyMode(boolean enable);
FUNC(void, MCU_CODE) Mcu_DbgMcu_ConfigWorkStatus(Mcu_DbgMcu_APBPerType dbgmcuMode,boolean enable);
FUNC(void, MCU_CODE) Mcu_DbgMcu_Init(const Mcu_DbgMcu_CfgTypes * dbgmcuConfig);

#define MCU_STOP_SEC_CODE
#include "Mcu_MemMap.h"

/**@} end of group MCU_Fuctions */

#ifdef __cplusplus
}
#endif //__cplusplus

#endif /* MCU_DBGMCU_TYPES_H */

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