# 1 "../../../mcal/Gpt_ZX_K14xM/Src/Gpt.c" # 1 "" 1 # 1 "" 3 # 387 "" 3 # 1 "" 1 # 1 "" 2 # 1 "../../../mcal/Gpt_ZX_K14xM/Src/Gpt.c" 2 # 27 "../../../mcal/Gpt_ZX_K14xM/Src/Gpt.c" # 1 "../../../mcal/Gpt_ZX_K14xM/Inc\\Gpt.h" 1 # 30 "../../../mcal/Gpt_ZX_K14xM/Inc\\Gpt.h" # 1 "../../../mcal/Gpt_ZX_K14xM/Inc/Gpt_Types.h" 1 # 29 "../../../mcal/Gpt_ZX_K14xM/Inc/Gpt_Types.h" # 1 "../../../mcal/Gpt_ZX_K14xM/Inc/Gpt_Drvw_Types.h" 1 # 29 "../../../mcal/Gpt_ZX_K14xM/Inc/Gpt_Drvw_Types.h" # 1 "../Generated/inc\\Gpt_Drvw_Cfg.h" 1 # 29 "../Generated/inc\\Gpt_Drvw_Cfg.h" # 1 "../Generated/inc/Gpt_Drvw_PBcfg.h" 1 # 30 "../Generated/inc\\Gpt_Drvw_Cfg.h" 2 # 30 "../../../mcal/Gpt_ZX_K14xM/Inc/Gpt_Drvw_Types.h" 2 # 1 "../../../mcal/Gpt_ZX_K14xM/Inc/Rtc_Drv_Types.h" 1 # 29 "../../../mcal/Gpt_ZX_K14xM/Inc/Rtc_Drv_Types.h" # 1 "../../../mcal/Base_ZX_K14xM/Inc\\Std_Types.h" 1 # 30 "../../../mcal/Base_ZX_K14xM/Inc\\Std_Types.h" # 1 "../../../mcal/Base_ZX_K14xM/Inc/Platform_Types.h" 1 # 86 "../../../mcal/Base_ZX_K14xM/Inc/Platform_Types.h" typedef unsigned char boolean; typedef unsigned char uint8; typedef unsigned short uint16; typedef unsigned int uint32; typedef unsigned long long uint64; typedef signed char sint8; typedef signed short sint16; typedef signed int sint32; typedef signed long long sint64; typedef unsigned long uint8_least; typedef unsigned long uint16_least; typedef unsigned long uint32_least; typedef signed long sint8_least; typedef signed long sint16_least; typedef signed long sint32_least; typedef float float32; typedef double float64; typedef void *VoidPtr; typedef const void *ConstVoidPtr; # 31 "../../../mcal/Base_ZX_K14xM/Inc\\Std_Types.h" 2 # 1 "../../../mcal/Base_ZX_K14xM/Inc/Compiler.h" 1 # 31 "../../../mcal/Base_ZX_K14xM/Inc/Compiler.h" # 1 "../../../mcal/Base_ZX_K14xM/Inc/Compiler_Cfg.h" 1 # 32 "../../../mcal/Base_ZX_K14xM/Inc/Compiler.h" 2 # 32 "../../../mcal/Base_ZX_K14xM/Inc\\Std_Types.h" 2 # 63 "../../../mcal/Base_ZX_K14xM/Inc\\Std_Types.h" typedef unsigned char StatusType; # 104 "../../../mcal/Base_ZX_K14xM/Inc\\Std_Types.h" typedef uint8 Std_ReturnType; typedef uint8 Std_TransformerClass; typedef uint8 Std_TransformerForwardCode; typedef uint8 Std_MessageTypeType; typedef uint8 Std_MessageResultType; typedef struct { uint16 vendorID; uint16 moduleID; uint8 sw_major_version; uint8 sw_minor_version; uint8 sw_patch_version; } Std_VersionInfoType; typedef struct { uint8 errorCode; Std_TransformerClass transformerClass; } Std_TransformerError; typedef struct { Std_TransformerForwardCode errorCode; Std_TransformerClass transformerClass; } Std_TransformerForward; typedef Std_ReturnType (*Std_ExtractProtocolHeaderFieldsType)(const uint8 *buffer, uint32 bufferLength, Std_MessageTypeType *messageType, Std_MessageResultType *messageResult); # 30 "../../../mcal/Gpt_ZX_K14xM/Inc/Rtc_Drv_Types.h" 2 # 1 "../../../mcal/McalLib_ZX_K14xM/Inc\\McalLib.h" 1 # 29 "../../../mcal/McalLib_ZX_K14xM/Inc\\McalLib.h" # 1 "../../../mcal/McalLib_ZX_K14xM/Inc/McalLib_Compiler.h" 1 # 30 "../../../mcal/McalLib_ZX_K14xM/Inc/McalLib_Compiler.h" # 1 "../Generated/inc\\McalLib_Cfg.h" 1 # 31 "../../../mcal/McalLib_ZX_K14xM/Inc/McalLib_Compiler.h" 2 # 273 "../../../mcal/McalLib_ZX_K14xM/Inc/McalLib_Compiler.h" static inline uint32 McalLib_ReadControlReg(void) { uint32 res; __asm("MRS %0,CONTROL" : "=r" (res)); return res; } # 290 "../../../mcal/McalLib_ZX_K14xM/Inc/McalLib_Compiler.h" static inline uint32 McalLib_ReadIpsrReg(void) { uint32 res; __asm("MRS %0,IPSR" : "=r" (res)); return res; } # 305 "../../../mcal/McalLib_ZX_K14xM/Inc/McalLib_Compiler.h" static inline uint32 McalLib_ReadPriMaskReg(void) { uint32 res; __asm("MRS %0,PRIMASK" : "=r" (res)); return res; } # 30 "../../../mcal/McalLib_ZX_K14xM/Inc\\McalLib.h" 2 # 184 "../../../mcal/McalLib_ZX_K14xM/Inc\\McalLib.h" typedef enum { MCALLIB_COUNTER_SOFTWARE, MCALLIB_COUNTER_OS, } McalLib_CounterType; typedef struct { uint32 CounterId; uint32 CounterFreq; } McalLib_ConfigType; # 1 "../../../mcal/Base_ZX_K14xM/Inc/MemMap\\McalLib_MemMap.h" 1 # 876 "../../../mcal/Base_ZX_K14xM/Inc/MemMap\\McalLib_MemMap.h" #pragma clang section rodata = ".mcal_config_data" # 211 "../../../mcal/McalLib_ZX_K14xM/Inc\\McalLib.h" 2 extern const McalLib_ConfigType *const McalLib_PreDefinedConfigPtr[(1U)]; # 1 "../../../mcal/Base_ZX_K14xM/Inc/MemMap\\McalLib_MemMap.h" 1 # 892 "../../../mcal/Base_ZX_K14xM/Inc/MemMap\\McalLib_MemMap.h" #pragma clang section rodata = "" # 216 "../../../mcal/McalLib_ZX_K14xM/Inc\\McalLib.h" 2 # 230 "../../../mcal/McalLib_ZX_K14xM/Inc\\McalLib.h" extern void Sys_SystemReset(void); # 1 "../../../mcal/Base_ZX_K14xM/Inc/MemMap\\McalLib_MemMap.h" 1 # 1072 "../../../mcal/Base_ZX_K14xM/Inc/MemMap\\McalLib_MemMap.h" #pragma clang section text = ".mcal_code" # 234 "../../../mcal/McalLib_ZX_K14xM/Inc\\McalLib.h" 2 void McalLib_Init(void); # 254 "../../../mcal/McalLib_ZX_K14xM/Inc\\McalLib.h" Std_ReturnType McalLib_GetCounterValue(McalLib_CounterType Counter, uint32 *Value); # 270 "../../../mcal/McalLib_ZX_K14xM/Inc\\McalLib.h" Std_ReturnType McalLib_GetElapsedValue(McalLib_CounterType Counter, uint32 *const CounterValue, uint32 *ElapsedValue); # 282 "../../../mcal/McalLib_ZX_K14xM/Inc\\McalLib.h" uint32 McalLib_MicroSecToTicks(McalLib_CounterType Counter, uint32 MicroSecond); # 296 "../../../mcal/McalLib_ZX_K14xM/Inc\\McalLib.h" void McalLib_SetCounterFreq(McalLib_CounterType Counter, uint32 Freq); # 309 "../../../mcal/McalLib_ZX_K14xM/Inc\\McalLib.h" static inline void McalLib_Assert(const uint8 *File, uint32 Line) { (void)File; (void)Line; for (;;) { } } # 327 "../../../mcal/McalLib_ZX_K14xM/Inc\\McalLib.h" void McalLib_SuspendAllInterrupts(void); void McalLib_ResumeAllInterrupts(void); # 1 "../../../mcal/Base_ZX_K14xM/Inc/MemMap\\McalLib_MemMap.h" 1 # 1088 "../../../mcal/Base_ZX_K14xM/Inc/MemMap\\McalLib_MemMap.h" #pragma clang section text = "" # 339 "../../../mcal/McalLib_ZX_K14xM/Inc\\McalLib.h" 2 # 31 "../../../mcal/Gpt_ZX_K14xM/Inc/Rtc_Drv_Types.h" 2 # 1 "../Generated/inc\\Rtc_Drv_Cfg.h" 1 # 28 "../Generated/inc\\Rtc_Drv_Cfg.h" # 1 "../Generated/inc/Rtc_Drv_PBcfg.h" 1 # 29 "../Generated/inc\\Rtc_Drv_Cfg.h" 2 # 32 "../../../mcal/Gpt_ZX_K14xM/Inc/Rtc_Drv_Types.h" 2 # 104 "../../../mcal/Gpt_ZX_K14xM/Inc/Rtc_Drv_Types.h" typedef void (*Rtc_Drv_CallbackType)(uint8 CallbackParam); typedef enum { RTC_DRV_SECONDS = 0U, RTC_DRV_32K_CLK } Rtc_Drv_ClockOutType; typedef enum { RTC_DRV_CLK_OSC32K_INT = 0U, RTC_DRV_CLK_OSC32K_EXT, RTC_DRV_CLK_LPO32K } Rtc_Drv_ClockSourceType; typedef enum { RTC_DRV_INT_OVERFLOW = 0U, RTC_DRV_INT_ALARM, RTC_DRV_INT_SECOND, RTC_DRV_INT_PERIODIC, RTC_DRV_INT_ALL } Rtc_Drv_InterruptType; typedef enum { RTC_DRV_SUCCESS = 0x00U, RTC_DRV_ERROR = 0x01U } Rtc_Drv_StatusType; typedef enum { RTC_DRV_SECOND_1 = 0U, RTC_DRV_SECOND_64, RTC_DRV_SECOND_32, RTC_DRV_SECOND_16, RTC_DRV_SECOND_8, RTC_DRV_SECOND_4, RTC_DRV_SECOND_2, RTC_DRV_SECOND_128 } Rtc_Drv_SecondIntMuxSelType; # 175 "../../../mcal/Gpt_ZX_K14xM/Inc/Rtc_Drv_Types.h" typedef struct { Rtc_Drv_ClockSourceType ClockSource; Rtc_Drv_ClockOutType ClockOutSelect; Rtc_Drv_InterruptType ModeSelect; Rtc_Drv_CallbackType Callback; uint8 CallbackParam; } Rtc_Drv_ConfigType; typedef struct { uint16 Year; uint16 Month; uint16 Day; uint16 Hour; uint16 Minutes; uint8 Seconds; } Rtc_Drv_TimedateType; typedef struct { Rtc_Drv_TimedateType AlarmTime; uint32 AlarmRepetitionInterval; uint32 AlarmRepeatsNumber; boolean RepeatForever; boolean AlarmIntEnable; Rtc_Drv_CallbackType AlarmCallback; uint8 AlarmCallbackParams; } Rtc_Drv_AlarmConfigType; typedef struct { Rtc_Drv_InterruptType ModeSelect; boolean AlarmInit; uint32 AlarmRepetitionInterval; volatile uint32 AlarmRepeatsNumber; boolean RepeatForever; boolean AlarmIntEnable; Rtc_Drv_CallbackType AlarmCallback; uint8 AlarmCallbackParams; volatile boolean IsAlarmMatchTimeNew; boolean ChannelInit; Rtc_Drv_CallbackType Callback; uint8 CallbackParam; } Rtc_Drv_StateType; # 31 "../../../mcal/Gpt_ZX_K14xM/Inc/Gpt_Drvw_Types.h" 2 # 1 "../../../mcal/Gpt_ZX_K14xM/Inc/Stim_Drv_Types.h" 1 # 32 "../../../mcal/Gpt_ZX_K14xM/Inc/Stim_Drv_Types.h" # 1 "../Generated/inc\\Stim_Drv_Cfg.h" 1 # 28 "../Generated/inc\\Stim_Drv_Cfg.h" # 1 "../Generated/inc/Stim_Drv_PBcfg.h" 1 # 29 "../Generated/inc\\Stim_Drv_Cfg.h" 2 # 33 "../../../mcal/Gpt_ZX_K14xM/Inc/Stim_Drv_Types.h" 2 # 104 "../../../mcal/Gpt_ZX_K14xM/Inc/Stim_Drv_Types.h" typedef enum { STIM_DRV_FUNCTION_CLOCK = 0U, STIM_DRV_BUS_CLOCK, STIM_DRV_OSC40M, STIM_DRV_LPO32K } Stim_Drv_ClockSourceType; typedef enum { STIM_DRV_SUCCESS = 0x00U, STIM_DRV_ERROR = 0x01U, STIM_DRV_TIMEOUT = 0x03 } Stim_Drv_StatusType; typedef enum { STIM_DRV_DIV_2 = 0U, STIM_DRV_DIV_4, STIM_DRV_DIV_8, STIM_DRV_DIV_16, STIM_DRV_DIV_32, STIM_DRV_DIV_64, STIM_DRV_DIV_128, STIM_DRV_DIV_256, STIM_DRV_DIV_512, STIM_DRV_DIV_1024, STIM_DRV_DIV_2048, STIM_DRV_DIV_4096, STIM_DRV_DIV_8192, STIM_DRV_DIV_16384, STIM_DRV_DIV_32768, STIM_DRV_DIV_65536 } Stim_Drv_PrescalerType; # 159 "../../../mcal/Gpt_ZX_K14xM/Inc/Stim_Drv_Types.h" typedef void (*Stim_Drv_CallbackType)(uint8 CallbackParam); typedef struct { uint8 HwChannel; boolean PrescalerEnable; Stim_Drv_PrescalerType ClockPrescaler; Stim_Drv_ClockSourceType ClockSource; Stim_Drv_CallbackType Callback; uint8 CallbackParam; } Stim_Drv_ChannelConfigType; typedef struct { boolean ChannelInit; Stim_Drv_CallbackType Callback; uint8 CallbackParam; } Stim_Drv_StateType; typedef struct { Stim_Drv_PrescalerType ClockPrescaler; Stim_Drv_PrescalerType ClockAlternatePrescaler; } Stim_Drv_ClockStateType; # 32 "../../../mcal/Gpt_ZX_K14xM/Inc/Gpt_Drvw_Types.h" 2 # 1 "../../../mcal/Gpt_ZX_K14xM/Inc/Tim_Drv_Types.h" 1 # 32 "../../../mcal/Gpt_ZX_K14xM/Inc/Tim_Drv_Types.h" # 1 "../Generated/inc\\Tim_Drv_Cfg.h" 1 # 28 "../Generated/inc\\Tim_Drv_Cfg.h" # 1 "../Generated/inc/Tim_Drv_PBcfg.h" 1 # 29 "../Generated/inc\\Tim_Drv_Cfg.h" 2 # 33 "../../../mcal/Gpt_ZX_K14xM/Inc/Tim_Drv_Types.h" 2 # 100 "../../../mcal/Gpt_ZX_K14xM/Inc/Tim_Drv_Types.h" typedef enum { TIM_DRV_CLK_SOURCE_DISABLED = 0U, TIM_DRV_CLK_SOURCE_SYSTEM, TIM_DRV_CLK_SOURCE_FUNCTION, TIM_DRV_CLK_SOURCE_EXTERNAL } Tim_Drv_ClockSourceType; typedef enum { TIM_DRV_CLK_DIV_1 = 0U, TIM_DRV_CLK_DIV_2, TIM_DRV_CLK_DIV_4, TIM_DRV_CLK_DIV_8, TIM_DRV_CLK_DIV_16, TIM_DRV_CLK_DIV_32, TIM_DRV_CLK_DIV_64, TIM_DRV_CLK_DIV_128 } Tim_Drv_PrescalerType; typedef enum { TIM_DRV_COUNTING_UP = 0U, TIM_DRV_COUNTING_UP_DOWN } Tim_Drv_CountingModeType; # 146 "../../../mcal/Gpt_ZX_K14xM/Inc/Tim_Drv_Types.h" typedef enum { TIM_DRV_IDLE = 0U, TIM_DRV_BUSY } Tim_Drv_StatusType; typedef void (*Tim_Drv_CallbackType)(uint8 CallbackParam); typedef struct { boolean FreezeBit; Tim_Drv_ClockSourceType ClockSource; Tim_Drv_PrescalerType ClockPrescaler; Tim_Drv_CountingModeType Mode; } Tim_Drv_InstanceConfigType; typedef struct { uint8 HwChannel; Tim_Drv_ClockSourceType ClockSource; Tim_Drv_CallbackType Callback; uint8 CallbackParam; } Tim_Drv_ChannelConfigType; typedef struct { Tim_Drv_StatusType ChannelStatus; Tim_Drv_CallbackType Callback; uint8 CallbackParam; } Tim_Drv_ChannelStateType; typedef struct { Tim_Drv_PrescalerType ClockPrescaler; Tim_Drv_PrescalerType ClockAlternatePrescaler; } Tim_Drv_InstanceStateType; # 33 "../../../mcal/Gpt_ZX_K14xM/Inc/Gpt_Drvw_Types.h" 2 # 126 "../../../mcal/Gpt_ZX_K14xM/Inc/Gpt_Drvw_Types.h" typedef uint8 Gpt_Drvw_PrescalerType; typedef uint8 Gpt_Drvw_ClockSourceType; typedef enum { GPT_DRVW_TIM_MODULE= 0, GPT_DRVW_RTC_MODULE, GPT_DRVW_STIM_MODULE, } Gpt_Drvw_ModuleType; typedef struct { const Tim_Drv_InstanceConfigType * Tim_Drv_InstanceConfig; } Gpt_Drvw_InstanceConfigType; typedef struct { const Tim_Drv_ChannelConfigType *TimChannelConfig; const Rtc_Drv_ConfigType *RtcChannelConfig; const Stim_Drv_ChannelConfigType *StimChannelConfig; } Gpt_Drvw_ChannelConfigType; typedef struct { Gpt_Drvw_ModuleType InstanceType; uint8 Instance; const Gpt_Drvw_InstanceConfigType InstanceConfig; } Gpt_Drvw_HwInstanceConfigType; typedef struct { Gpt_Drvw_ModuleType InstanceType; uint8 Instance; uint8 Channel; const Gpt_Drvw_ChannelConfigType ChannelConfig; } Gpt_Drvw_HwChannelConfigType; # 198 "../../../mcal/Gpt_ZX_K14xM/Inc/Gpt_Drvw_Types.h" typedef struct { Gpt_Drvw_ModuleType InstanceType; uint8 Instance; uint8 Channel; Gpt_Drvw_PrescalerType Prescaler; Gpt_Drvw_ClockSourceType ClockSource; } Gpt_Drvw_HwPredefChannelConfigType; typedef struct { boolean ChannelRollover; uint32 TargetTime; } Gpt_Drvw_HwChannelInfoType; typedef enum { GPT_DRVW_PREDEF_TIMER_1US_16BIT = 0U, GPT_DRVW_PREDEF_TIMER_1US_24BIT, GPT_DRVW_PREDEF_TIMER_1US_32BIT, GPT_DRVW_PREDEF_TIMER_100US_32BIT } Gpt_Drvw_PredefTimerType; # 30 "../../../mcal/Gpt_ZX_K14xM/Inc/Gpt_Types.h" 2 # 1 "../Generated/inc\\Gpt_Cfg.h" 1 # 30 "../Generated/inc\\Gpt_Cfg.h" # 1 "../Generated/inc/Gpt_PBcfg.h" 1 # 31 "../Generated/inc\\Gpt_Cfg.h" 2 # 31 "../../../mcal/Gpt_ZX_K14xM/Inc/Gpt_Types.h" 2 # 1 "../../../mcal/EcuM_ZX_K14xM/Inc\\EcuM.h" 1 # 55 "../../../mcal/EcuM_ZX_K14xM/Inc\\EcuM.h" typedef uint32 EcuM_WakeupSourceType; # 66 "../../../mcal/EcuM_ZX_K14xM/Inc\\EcuM.h" extern EcuM_WakeupSourceType EcuMLastWakeupEvent; # 80 "../../../mcal/EcuM_ZX_K14xM/Inc\\EcuM.h" void EcuM_SetWakeupEvent(EcuM_WakeupSourceType sources); void EcuM_ValidateWakeupEvent(EcuM_WakeupSourceType sources); # 96 "../../../mcal/EcuM_ZX_K14xM/Inc\\EcuM.h" void EcuM_CheckWakeup(EcuM_WakeupSourceType WakeupSource); # 34 "../../../mcal/Gpt_ZX_K14xM/Inc/Gpt_Types.h" 2 # 97 "../../../mcal/Gpt_ZX_K14xM/Inc/Gpt_Types.h" typedef enum { GPT_STATUS_UNINITIALIZED = 0, GPT_STATUS_INITIALIZED, GPT_STATUS_STOPPED, GPT_STATUS_EXPIRED, GPT_STATUS_RUNNING } Gpt_ChannelStatusType; typedef struct { Gpt_ChannelStatusType ChannelStatus; boolean NotificationEnabled; boolean WakeupEnabled; boolean WakeupGenerated; } Gpt_ChannelInfoType; # 132 "../../../mcal/Gpt_ZX_K14xM/Inc/Gpt_Types.h" typedef uint32 Gpt_ChannelType; typedef uint32 Gpt_ValueType; typedef void (*Gpt_NotificationType)(void); typedef enum { GPT_MODE_NORMAL = 0U, GPT_MODE_SLEEP } Gpt_ModeType; typedef enum { GPT_CH_MODE_CONTINUOUS = 0U, GPT_CH_MODE_ONESHOT } Gpt_ChannelModeType; # 186 "../../../mcal/Gpt_ZX_K14xM/Inc/Gpt_Types.h" typedef enum { GPT_PREDEF_TIMER_1US_16BIT = 0U, GPT_PREDEF_TIMER_1US_24BIT, GPT_PREDEF_TIMER_1US_32BIT, GPT_PREDEF_TIMER_100US_32BIT } Gpt_PredefTimerType; typedef struct { boolean GptEnableWakeup; Gpt_NotificationType GptNotification; EcuM_WakeupSourceType GptWakeupSource; float64 GptChannelTickFrequency; Gpt_ValueType GptChannelTickValueMax; Gpt_ChannelModeType GptChannelMode; const Gpt_Drvw_HwChannelConfigType *GptDrvwHwChannelConfigPtr; } Gpt_ChannelConfigType; typedef struct { Gpt_ChannelType ChannelCount; const Gpt_ChannelConfigType (*GptChannelConfig)[]; uint8 InstanceCount; const Gpt_Drvw_HwInstanceConfigType (*GptInstanceConfig)[]; const Gpt_Drvw_HwPredefChannelConfigType *const(*GptChannelPredefConfigType); const uint8 (*GptChannelIdToIndexMap)[]; } Gpt_ConfigType; # 31 "../../../mcal/Gpt_ZX_K14xM/Inc\\Gpt.h" 2 # 300 "../../../mcal/Gpt_ZX_K14xM/Inc\\Gpt.h" # 1 "../../../mcal/Base_ZX_K14xM/Inc/MemMap\\Gpt_MemMap.h" 1 # 876 "../../../mcal/Base_ZX_K14xM/Inc/MemMap\\Gpt_MemMap.h" #pragma clang section rodata = ".mcal_config_data" # 301 "../../../mcal/Gpt_ZX_K14xM/Inc\\Gpt.h" 2 extern const Gpt_ConfigType *const Gpt_PreDefinedConfigPtr[(1U)]; # 1 "../../../mcal/Base_ZX_K14xM/Inc/MemMap\\Gpt_MemMap.h" 1 # 892 "../../../mcal/Base_ZX_K14xM/Inc/MemMap\\Gpt_MemMap.h" #pragma clang section rodata = "" # 308 "../../../mcal/Gpt_ZX_K14xM/Inc\\Gpt.h" 2 # 1 "../../../mcal/Base_ZX_K14xM/Inc/MemMap\\Gpt_MemMap.h" 1 # 1072 "../../../mcal/Base_ZX_K14xM/Inc/MemMap\\Gpt_MemMap.h" #pragma clang section text = ".mcal_code" # 317 "../../../mcal/Gpt_ZX_K14xM/Inc\\Gpt.h" 2 # 330 "../../../mcal/Gpt_ZX_K14xM/Inc\\Gpt.h" void Gpt_GetVersionInfo(Std_VersionInfoType *VersionInfoPtr); # 344 "../../../mcal/Gpt_ZX_K14xM/Inc\\Gpt.h" void Gpt_Init(const Gpt_ConfigType *ConfigPtr); # 356 "../../../mcal/Gpt_ZX_K14xM/Inc\\Gpt.h" void Gpt_DeInit(void); # 372 "../../../mcal/Gpt_ZX_K14xM/Inc\\Gpt.h" Gpt_ValueType Gpt_GetTimeElapsed(Gpt_ChannelType Channel); # 388 "../../../mcal/Gpt_ZX_K14xM/Inc\\Gpt.h" Gpt_ValueType Gpt_GetTimeRemaining(Gpt_ChannelType Channel); # 403 "../../../mcal/Gpt_ZX_K14xM/Inc\\Gpt.h" void Gpt_StartTimer(Gpt_ChannelType Channel, Gpt_ValueType Value); # 416 "../../../mcal/Gpt_ZX_K14xM/Inc\\Gpt.h" void Gpt_StopTimer(Gpt_ChannelType Channel); # 431 "../../../mcal/Gpt_ZX_K14xM/Inc\\Gpt.h" void Gpt_EnableNotification(Gpt_ChannelType Channel); # 445 "../../../mcal/Gpt_ZX_K14xM/Inc\\Gpt.h" void Gpt_DisableNotification(Gpt_ChannelType Channel); # 462 "../../../mcal/Gpt_ZX_K14xM/Inc\\Gpt.h" void Gpt_SetMode(Gpt_ModeType Mode); # 476 "../../../mcal/Gpt_ZX_K14xM/Inc\\Gpt.h" void Gpt_DisableWakeup(Gpt_ChannelType Channel); # 490 "../../../mcal/Gpt_ZX_K14xM/Inc\\Gpt.h" void Gpt_EnableWakeup(Gpt_ChannelType Channel); # 505 "../../../mcal/Gpt_ZX_K14xM/Inc\\Gpt.h" void Gpt_CheckWakeup(EcuM_WakeupSourceType WakeupSource); # 523 "../../../mcal/Gpt_ZX_K14xM/Inc\\Gpt.h" Std_ReturnType Gpt_GetPredefTimerValue(Gpt_PredefTimerType PredefTimer, uint32 *TimeValuePtr); # 544 "../../../mcal/Gpt_ZX_K14xM/Inc\\Gpt.h" # 1 "../../../mcal/Base_ZX_K14xM/Inc/MemMap\\Gpt_MemMap.h" 1 # 1088 "../../../mcal/Base_ZX_K14xM/Inc/MemMap\\Gpt_MemMap.h" #pragma clang section text = "" # 545 "../../../mcal/Gpt_ZX_K14xM/Inc\\Gpt.h" 2 # 28 "../../../mcal/Gpt_ZX_K14xM/Src/Gpt.c" 2 # 1 "../../../mcal/Det_ZX_K14xM/Inc\\Det.h" 1 # 61 "../../../mcal/Det_ZX_K14xM/Inc\\Det.h" void Det_Init(void); Std_ReturnType Det_ReportError(uint16 ModuleId, uint8 InstanceId, uint8 ApiId, uint8 ErrorId); Std_ReturnType Det_ReportRuntimeError(uint16 ModuleId, uint8 InstanceId, uint8 ApiId, uint8 ErrorId); Std_ReturnType Det_ReportTransientFault(uint16 ModuleId, uint8 InstanceId, uint8 ApiId, uint8 FaultId); void Det_Start(void); # 29 "../../../mcal/Gpt_ZX_K14xM/Src/Gpt.c" 2 # 1 "../../../mcal/Gpt_ZX_K14xM/Inc\\Gpt_Drvw.h" 1 # 65 "../../../mcal/Gpt_ZX_K14xM/Inc\\Gpt_Drvw.h" # 1 "../../../mcal/Base_ZX_K14xM/Inc/MemMap\\Gpt_MemMap.h" 1 # 876 "../../../mcal/Base_ZX_K14xM/Inc/MemMap\\Gpt_MemMap.h" #pragma clang section rodata = ".mcal_config_data" # 66 "../../../mcal/Gpt_ZX_K14xM/Inc\\Gpt_Drvw.h" 2 extern const Gpt_Drvw_HwInstanceConfigType Gpt_Drvw_InstanceConfig[1U]; extern const Gpt_Drvw_HwChannelConfigType Gpt_Drvw_ChannelConfig[4U]; # 1 "../../../mcal/Base_ZX_K14xM/Inc/MemMap\\Gpt_MemMap.h" 1 # 892 "../../../mcal/Base_ZX_K14xM/Inc/MemMap\\Gpt_MemMap.h" #pragma clang section rodata = "" # 74 "../../../mcal/Gpt_ZX_K14xM/Inc\\Gpt_Drvw.h" 2 # 1 "../../../mcal/Base_ZX_K14xM/Inc/MemMap\\Gpt_MemMap.h" 1 # 1072 "../../../mcal/Base_ZX_K14xM/Inc/MemMap\\Gpt_MemMap.h" #pragma clang section text = ".mcal_code" # 82 "../../../mcal/Gpt_ZX_K14xM/Inc\\Gpt_Drvw.h" 2 void Gpt_Drvw_InitInstances(const Gpt_Drvw_HwInstanceConfigType *HwInstanceConfigPtr); # 99 "../../../mcal/Gpt_ZX_K14xM/Inc\\Gpt_Drvw.h" void Gpt_Drvw_Init(const Gpt_Drvw_HwChannelConfigType *HwChannelConfigPtr); # 109 "../../../mcal/Gpt_ZX_K14xM/Inc\\Gpt_Drvw.h" void Gpt_Drvw_DeInit(const Gpt_Drvw_HwChannelConfigType *HwChannelConfigPtr); # 122 "../../../mcal/Gpt_ZX_K14xM/Inc\\Gpt_Drvw.h" Std_ReturnType Gpt_Drvw_StartTimer(const Gpt_Drvw_HwChannelConfigType *HwChannelConfigPtr, uint32 Value); void Gpt_Drvw_StopTimer(const Gpt_Drvw_HwChannelConfigType *HwChannelConfigPtr); # 140 "../../../mcal/Gpt_ZX_K14xM/Inc\\Gpt_Drvw.h" void Gpt_Drvw_EnableInterrupt(const Gpt_Drvw_HwChannelConfigType *HwChannelConfigPtr); # 151 "../../../mcal/Gpt_ZX_K14xM/Inc\\Gpt_Drvw.h" void Gpt_Drvw_DisableInterrupt(const Gpt_Drvw_HwChannelConfigType *HwChannelConfigPtr); # 163 "../../../mcal/Gpt_ZX_K14xM/Inc\\Gpt_Drvw.h" uint32 Gpt_Drvw_GetTimeElapsed(const Gpt_Drvw_HwChannelConfigType *HwChannelConfigPtr, Gpt_Drvw_HwChannelInfoType *ReturnHwChannelInfoPtr); # 175 "../../../mcal/Gpt_ZX_K14xM/Inc\\Gpt_Drvw.h" void Gpt_Drvw_StartPredefTimer(const Gpt_Drvw_HwPredefChannelConfigType *HwPredefChannelConfigPtr, Gpt_Drvw_PredefTimerType PrdefTimerType); # 186 "../../../mcal/Gpt_ZX_K14xM/Inc\\Gpt_Drvw.h" void Gpt_Drvw_GetPredefTimerValue ( const Gpt_Drvw_HwPredefChannelConfigType *HwPredefChannelConfigPtr, Gpt_Drvw_PredefTimerType PredefTimer, uint32 *TimeValuePtr ); void Gpt_Drvw_StopPredefTimer(const Gpt_Drvw_HwPredefChannelConfigType *HwPredefChannelConfigPtr); # 226 "../../../mcal/Gpt_ZX_K14xM/Inc\\Gpt_Drvw.h" # 1 "../../../mcal/Base_ZX_K14xM/Inc/MemMap\\Gpt_MemMap.h" 1 # 1088 "../../../mcal/Base_ZX_K14xM/Inc/MemMap\\Gpt_MemMap.h" #pragma clang section text = "" # 227 "../../../mcal/Gpt_ZX_K14xM/Inc\\Gpt_Drvw.h" 2 # 30 "../../../mcal/Gpt_ZX_K14xM/Src/Gpt.c" 2 # 1 "../../../mcal/Gpt_ZX_K14xM/Inc\\Gpt_Irq.h" 1 # 58 "../../../mcal/Gpt_ZX_K14xM/Inc\\Gpt_Irq.h" # 1 "../../../mcal/Base_ZX_K14xM/Inc/MemMap\\Gpt_MemMap.h" 1 # 1072 "../../../mcal/Base_ZX_K14xM/Inc/MemMap\\Gpt_MemMap.h" #pragma clang section text = ".mcal_code" # 59 "../../../mcal/Gpt_ZX_K14xM/Inc\\Gpt_Irq.h" 2 # 68 "../../../mcal/Gpt_ZX_K14xM/Inc\\Gpt_Irq.h" void Gpt_TimeMatchCallback(uint8 Channel); # 1 "../../../mcal/Base_ZX_K14xM/Inc/MemMap\\Gpt_MemMap.h" 1 # 1088 "../../../mcal/Base_ZX_K14xM/Inc/MemMap\\Gpt_MemMap.h" #pragma clang section text = "" # 72 "../../../mcal/Gpt_ZX_K14xM/Inc\\Gpt_Irq.h" 2 # 31 "../../../mcal/Gpt_ZX_K14xM/Src/Gpt.c" 2 # 116 "../../../mcal/Gpt_ZX_K14xM/Src/Gpt.c" # 1 "../../../mcal/Base_ZX_K14xM/Inc/MemMap\\Gpt_MemMap.h" 1 # 1436 "../../../mcal/Base_ZX_K14xM/Inc/MemMap\\Gpt_MemMap.h" #pragma clang section bss = ".mcal_bss" # 117 "../../../mcal/Gpt_ZX_K14xM/Src/Gpt.c" 2 static const Gpt_ConfigType *Gpt_ConfigPtr[1U]; # 1 "../../../mcal/Base_ZX_K14xM/Inc/MemMap\\Gpt_MemMap.h" 1 # 1452 "../../../mcal/Base_ZX_K14xM/Inc/MemMap\\Gpt_MemMap.h" #pragma clang section bss = "" # 126 "../../../mcal/Gpt_ZX_K14xM/Src/Gpt.c" 2 # 1 "../../../mcal/Base_ZX_K14xM/Inc/MemMap\\Gpt_MemMap.h" 1 # 1268 "../../../mcal/Base_ZX_K14xM/Inc/MemMap\\Gpt_MemMap.h" #pragma clang section data = ".mcal_data" # 133 "../../../mcal/Gpt_ZX_K14xM/Src/Gpt.c" 2 static volatile Gpt_ModeType Gpt_Mode = GPT_MODE_NORMAL; # 1 "../../../mcal/Base_ZX_K14xM/Inc/MemMap\\Gpt_MemMap.h" 1 # 1284 "../../../mcal/Base_ZX_K14xM/Inc/MemMap\\Gpt_MemMap.h" #pragma clang section data = "" # 140 "../../../mcal/Gpt_ZX_K14xM/Src/Gpt.c" 2 # 1 "../../../mcal/Base_ZX_K14xM/Inc/MemMap\\Gpt_MemMap.h" 1 # 1436 "../../../mcal/Base_ZX_K14xM/Inc/MemMap\\Gpt_MemMap.h" #pragma clang section bss = ".mcal_bss" # 143 "../../../mcal/Gpt_ZX_K14xM/Src/Gpt.c" 2 static volatile Gpt_ValueType Gpt_StopTime[(4U)]; static Gpt_ChannelInfoType Gpt_ChannelInfo[(4U)]; static Gpt_Drvw_HwChannelInfoType ReturnHwChannelInfo; # 1 "../../../mcal/Base_ZX_K14xM/Inc/MemMap\\Gpt_MemMap.h" 1 # 1452 "../../../mcal/Base_ZX_K14xM/Inc/MemMap\\Gpt_MemMap.h" #pragma clang section bss = "" # 156 "../../../mcal/Gpt_ZX_K14xM/Src/Gpt.c" 2 # 1 "../../../mcal/Base_ZX_K14xM/Inc/MemMap\\Gpt_MemMap.h" 1 # 1072 "../../../mcal/Base_ZX_K14xM/Inc/MemMap\\Gpt_MemMap.h" #pragma clang section text = ".mcal_code" # 164 "../../../mcal/Gpt_ZX_K14xM/Src/Gpt.c" 2 static inline Std_ReturnType Gpt_CheckChannel(uint8 ServiceId, Gpt_ChannelType Channel, uint32 GptCoreId); static inline Std_ReturnType Gpt_CheckInitialStatus(uint8 ServiceId, uint32 GptCoreId); static inline Std_ReturnType Gpt_CheckInit(uint8 ServiceId, uint32 GptCoreId, const Gpt_ConfigType *ConfigPtr); static inline Std_ReturnType Gpt_CheckTargetTimeValue(uint8 ServiceId, Gpt_ChannelType Channel, Gpt_ValueType Value, uint32 GptCoreId); static inline Std_ReturnType Gpt_CheckChannelStatus(uint8 ServiceId, Gpt_ChannelType Channel, uint32 GptCoreId); static inline Std_ReturnType Gpt_CheckStartTimer(uint8 ServiceId, Gpt_ChannelType Channel, Gpt_ValueType Value, uint32 GptCoreId); static inline Std_ReturnType Gpt_CheckNotification(uint8 ServiceId, Gpt_ChannelType Channel, uint32 GptCoreId); static inline Std_ReturnType Gpt_CheckGptWakeup(uint8 ServiceId, Gpt_ChannelType Channel, uint32 GptCoreId); static inline void Gpt_SetSleepMode(void); static inline void Gpt_SetNormalMode(void); static inline Std_ReturnType Gpt_CheckSetMode(uint8 ServiceId, Gpt_ModeType Mode, uint32 GptCoreId); static inline Std_ReturnType Gpt_CheckPredefTimerType(Gpt_PredefTimerType PredefTimer, uint32 GptCoreId); static inline Std_ReturnType Gpt_CheckPredefTimerPointer(const uint32 *PredefTimerPtr); static inline Std_ReturnType Gpt_CheckGetPredefTimerValue(uint8 ServiceId, uint32 GptCoreId, const uint32 *PredefTimerPtr); static inline Std_ReturnType Gpt_CheckMode(uint8 ServiceId); static inline Gpt_Drvw_PredefTimerType Gpt_ConvertPredefTimerType(Gpt_PredefTimerType PredefTimer); static inline Gpt_ChannelType Gpt_ConvertChannelIndexToChannel(Gpt_ChannelType ChannelIndex, uint32 GptCoreId); static inline void Gpt_ChangeChannelStatus(Gpt_ChannelType Channel, Gpt_ChannelStatusType ChannelStatus); static inline void Gpt_ChangeNotificationStatus(Gpt_ChannelType Channel, boolean NotificationStatus); static inline void Gpt_ChangeWakeupEnabledStatus(Gpt_ChannelType Channel, boolean WakeupEnableStatus); static inline void Gpt_ChangeWakeupGeneratedStatus(Gpt_ChannelType Channel, boolean WakeupGenerateStatus); # 262 "../../../mcal/Gpt_ZX_K14xM/Src/Gpt.c" static inline Std_ReturnType Gpt_CheckChannel(uint8 ServiceId, Gpt_ChannelType Channel, uint32 GptCoreId) { Std_ReturnType ReturnValue = (Std_ReturnType)0x01U; if (((void *)0) != Gpt_ConfigPtr[GptCoreId]) { if ((4U) > Channel) { if (255U == (*(Gpt_ConfigPtr[(GptCoreId)]->GptChannelIdToIndexMap))[(Channel)]) { (void)Det_ReportError((uint16)100U, (uint8)0, (uint8)((uint8)ServiceId), (uint8)((uint8)((uint8)0x18U))); } else { ReturnValue = (Std_ReturnType)0x00U; } } else { (void)Det_ReportError((uint16)100U, (uint8)0, (uint8)((uint8)ServiceId), (uint8)((uint8)((uint8)0x14U))); } } else { (void)Det_ReportError((uint16)100U, (uint8)0, (uint8)((uint8)ServiceId), (uint8)((uint8)((uint8)0x0AU))); } return ReturnValue; } # 309 "../../../mcal/Gpt_ZX_K14xM/Src/Gpt.c" static inline Std_ReturnType Gpt_CheckInit(uint8 ServiceId, uint32 GptCoreId, const Gpt_ConfigType *ConfigPtr) { Std_ReturnType ReturnValue = (Std_ReturnType)0x01U; ReturnValue = Gpt_CheckInitialStatus(ServiceId, GptCoreId); if ((Std_ReturnType)0x00U == ReturnValue) { # 331 "../../../mcal/Gpt_ZX_K14xM/Src/Gpt.c" if (((void *)0) != ConfigPtr) { (void)Det_ReportError((uint16)100U, (uint8)0, (uint8)((uint8)((uint8)0x01U)), (uint8)((uint8)((uint8)0x0EU))); ReturnValue = (Std_ReturnType)0x01U; } else { ReturnValue = (Std_ReturnType)0x00U; } } return ReturnValue; } # 359 "../../../mcal/Gpt_ZX_K14xM/Src/Gpt.c" static inline Std_ReturnType Gpt_CheckInitialStatus(uint8 ServiceId, uint32 GptCoreId) { Std_ReturnType ReturnValue = (Std_ReturnType)0x01U; if (((void *)0) != Gpt_ConfigPtr[GptCoreId]) { if (((uint8)0x01U) == ServiceId) { (void)Det_ReportError((uint16)100U, (uint8)0, (uint8)((uint8)ServiceId), (uint8)((uint8)((uint8)0x0DU))); } else { ReturnValue = (Std_ReturnType)0x00U; } } else { if (((uint8)0x01U) == ServiceId) { ReturnValue = (Std_ReturnType)0x00U; } else { (void)Det_ReportError((uint16)100U, (uint8)0, (uint8)((uint8)ServiceId), (uint8)((uint8)((uint8)0x0AU))); } } return ReturnValue; } # 401 "../../../mcal/Gpt_ZX_K14xM/Src/Gpt.c" static inline Std_ReturnType Gpt_CheckTargetTimeValue(uint8 ServiceId, Gpt_ChannelType Channel, Gpt_ValueType Value, uint32 GptCoreId) { Std_ReturnType ReturnValue = (Std_ReturnType)0x01U; uint8 ChannelIndex = (*(Gpt_ConfigPtr[(GptCoreId)]->GptChannelIdToIndexMap))[(Channel)]; if ((Value > (*(Gpt_ConfigPtr[(GptCoreId)]->GptChannelConfig))[(ChannelIndex)].GptChannelTickValueMax) || ((Gpt_ValueType)0U == Value)) { (void)Det_ReportError((uint16)100U, (uint8)0, (uint8)((uint8)ServiceId), (uint8)((uint8)((uint8)0x15U))); } else { ReturnValue = (Std_ReturnType)0x00U; } return ReturnValue; } # 432 "../../../mcal/Gpt_ZX_K14xM/Src/Gpt.c" static inline Std_ReturnType Gpt_CheckChannelStatus(uint8 ServiceId, Gpt_ChannelType Channel, uint32 GptCoreId) { Std_ReturnType ReturnValue = (Std_ReturnType)0x01U; if ((GPT_MODE_SLEEP == Gpt_Mode) && ((boolean)0U == Gpt_ChannelInfo[Channel].WakeupEnabled) && (((uint8)0x05U) == ServiceId)) { (void)Det_ReportError((uint16)100U, (uint8)0, (uint8)((uint8)ServiceId), (uint8)((uint8)((uint8)0xA0U))); } else { if (GPT_STATUS_RUNNING == Gpt_ChannelInfo[Channel].ChannelStatus) { (void)Det_ReportRuntimeError((uint16)100U, (uint8)((uint8)0U), (uint8)((uint8)ServiceId), (uint8)((uint8)((uint8)0x0BU))); } else { ReturnValue = (Std_ReturnType)0x00U; } } (void)GptCoreId; return ReturnValue; } # 482 "../../../mcal/Gpt_ZX_K14xM/Src/Gpt.c" static inline Std_ReturnType Gpt_CheckStartTimer(uint8 ServiceId, Gpt_ChannelType Channel, Gpt_ValueType Value, uint32 GptCoreId) { Std_ReturnType ReturnValue = (Std_ReturnType)0x01U; ReturnValue = Gpt_CheckChannel(((uint8)0x05U), Channel, GptCoreId); if ((Std_ReturnType)0x00U == ReturnValue) { ReturnValue = Gpt_CheckChannelStatus(((uint8)0x05U), Channel, GptCoreId); if ((Std_ReturnType)0x00U == ReturnValue) { ReturnValue = Gpt_CheckTargetTimeValue(((uint8)0x05U), Channel, Value, GptCoreId); if ((Std_ReturnType)0x00U == ReturnValue) { ReturnValue = (Std_ReturnType)0x00U; } else { ReturnValue = (Std_ReturnType)0x01U; } } else { ReturnValue = (Std_ReturnType)0x01U; } } (void)ServiceId; return ReturnValue; } # 530 "../../../mcal/Gpt_ZX_K14xM/Src/Gpt.c" static inline Std_ReturnType Gpt_CheckNotification(uint8 ServiceId, Gpt_ChannelType Channel, uint32 GptCoreId) { Std_ReturnType ReturnValue = (Std_ReturnType)0x01U; ReturnValue = Gpt_CheckChannel(ServiceId, Channel, GptCoreId); if ((Std_ReturnType)0x00U == ReturnValue) { uint8 ChannelIndex = (*(Gpt_ConfigPtr[(GptCoreId)]->GptChannelIdToIndexMap))[(Channel)]; if (((void *)0) != (*(Gpt_ConfigPtr[(GptCoreId)]->GptChannelConfig))[(ChannelIndex)].GptNotification) { ReturnValue = (Std_ReturnType)0x00U; } else { (void)Det_ReportError((uint16)100U, (uint8)0, (uint8)((uint8)ServiceId), (uint8)((uint8)((uint8)0x14U))); ReturnValue = (Std_ReturnType)0x01U; } } return ReturnValue; } # 567 "../../../mcal/Gpt_ZX_K14xM/Src/Gpt.c" static inline Std_ReturnType Gpt_CheckGptWakeup(uint8 ServiceId, Gpt_ChannelType Channel, uint32 GptCoreId) { Std_ReturnType ReturnValue = (Std_ReturnType)0x01U; ReturnValue = Gpt_CheckChannel(ServiceId, Channel, GptCoreId); if ((Std_ReturnType)0x00U == ReturnValue) { uint8 ChannelIndex = (*(Gpt_ConfigPtr[(GptCoreId)]->GptChannelIdToIndexMap))[(Channel)]; if ((boolean)1U == (*(Gpt_ConfigPtr[(GptCoreId)]->GptChannelConfig))[(ChannelIndex)].GptEnableWakeup) { ReturnValue = (Std_ReturnType)0x00U; } else { (void)Det_ReportError((uint16)100U, (uint8)0, (uint8)((uint8)ServiceId), (uint8)((uint8)((uint8)0x14U))); ReturnValue = (Std_ReturnType)0x01U; } } return ReturnValue; } # 604 "../../../mcal/Gpt_ZX_K14xM/Src/Gpt.c" static inline Std_ReturnType Gpt_CheckSetMode(uint8 ServiceId, Gpt_ModeType Mode, uint32 GptCoreId) { Std_ReturnType ReturnValue = (Std_ReturnType)0x01U; ReturnValue = Gpt_CheckInitialStatus(ServiceId, GptCoreId); if ((Std_ReturnType)0x00U == ReturnValue) { if ((GPT_MODE_SLEEP == Mode) || (GPT_MODE_NORMAL == Mode)) { ReturnValue = (Std_ReturnType)0x00U; } else { (void)Det_ReportError((uint16)100U, (uint8)0, (uint8)((uint8)((uint8)0x09U)), (uint8)((uint8)((uint8)0x1FU))); ReturnValue = (Std_ReturnType)0x01U; } } return ReturnValue; } # 636 "../../../mcal/Gpt_ZX_K14xM/Src/Gpt.c" static inline Std_ReturnType Gpt_CheckPredefTimerType(Gpt_PredefTimerType PredefTimer, uint32 GptCoreId) { Std_ReturnType ReturnValue = (Std_ReturnType)0x01U; Gpt_ChannelType Channel; if ((PredefTimer == GPT_PREDEF_TIMER_1US_16BIT) || (PredefTimer == GPT_PREDEF_TIMER_1US_24BIT) || (PredefTimer == GPT_PREDEF_TIMER_1US_32BIT) || (PredefTimer == GPT_PREDEF_TIMER_100US_32BIT)) { Channel = (Gpt_ChannelType)PredefTimer; if (((void *)0) == ((Gpt_ConfigPtr[GptCoreId]->GptChannelPredefConfigType)[Channel])) { (void)Det_ReportError((uint16)100U, (uint8)0, (uint8)((uint8)((uint8)0x0DU)), (uint8)((uint8)((uint8)0x17U))); } else { ReturnValue = (Std_ReturnType)0x00U; } } else { (void)Det_ReportError((uint16)100U, (uint8)0, (uint8)((uint8)((uint8)0x0DU)), (uint8)((uint8)((uint8)0x17U))); } return ReturnValue; } # 675 "../../../mcal/Gpt_ZX_K14xM/Src/Gpt.c" static inline Std_ReturnType Gpt_CheckPredefTimerPointer(const uint32 *PredefTimerPtr) { Std_ReturnType ReturnValue = (Std_ReturnType)0x01U; if (((void *)0) == PredefTimerPtr) { (void)Det_ReportError((uint16)100U, (uint8)0, (uint8)((uint8)((uint8)0x0DU)), (uint8)((uint8)((uint8)0x16U))); } else { ReturnValue = (Std_ReturnType)0x00U; } return ReturnValue; } # 700 "../../../mcal/Gpt_ZX_K14xM/Src/Gpt.c" static inline Std_ReturnType Gpt_CheckGetPredefTimerValue(uint8 ServiceId, uint32 GptCoreId, const uint32 *PredefTimerPtr) { Std_ReturnType ReturnValue = (Std_ReturnType)0x01U; if ((Std_ReturnType)0x00U == Gpt_CheckInitialStatus(ServiceId, GptCoreId)) { if ((Std_ReturnType)0x00U == Gpt_CheckPredefTimerPointer(PredefTimerPtr)) { ReturnValue = (Std_ReturnType)0x00U; } else { ReturnValue = (Std_ReturnType)0x01U; } } return ReturnValue; } # 762 "../../../mcal/Gpt_ZX_K14xM/Src/Gpt.c" static inline Std_ReturnType Gpt_CheckMode(uint8 ServiceId) { Std_ReturnType ReturnValue = (Std_ReturnType)0x01U; if (GPT_MODE_SLEEP == Gpt_Mode) { (void)Det_ReportRuntimeError((uint16)100U, (uint8)((uint8)0U), (uint8)((uint8)ServiceId), (uint8)((uint8)((uint8)0x0CU))); } else { ReturnValue = (Std_ReturnType)0x00U; } return ReturnValue; } # 784 "../../../mcal/Gpt_ZX_K14xM/Src/Gpt.c" static inline Gpt_Drvw_PredefTimerType Gpt_ConvertPredefTimerType(Gpt_PredefTimerType PredefTimer) { Gpt_Drvw_PredefTimerType PredefTimerType = GPT_DRVW_PREDEF_TIMER_1US_16BIT; switch (PredefTimer) { case GPT_PREDEF_TIMER_1US_16BIT: PredefTimerType = GPT_DRVW_PREDEF_TIMER_1US_16BIT; break; case GPT_PREDEF_TIMER_1US_24BIT: PredefTimerType = GPT_DRVW_PREDEF_TIMER_1US_24BIT; break; case GPT_PREDEF_TIMER_1US_32BIT: PredefTimerType = GPT_DRVW_PREDEF_TIMER_1US_32BIT; break; case GPT_PREDEF_TIMER_100US_32BIT: PredefTimerType = GPT_DRVW_PREDEF_TIMER_100US_32BIT; break; default: PredefTimerType = GPT_DRVW_PREDEF_TIMER_1US_16BIT; break; } return PredefTimerType; } # 819 "../../../mcal/Gpt_ZX_K14xM/Src/Gpt.c" static inline Gpt_ChannelType Gpt_ConvertChannelIndexToChannel(Gpt_ChannelType ChannelIndex, uint32 GptCoreId) { Gpt_ChannelType Channel = 0U; while (Channel < (4U)) { if (ChannelIndex == (*(Gpt_ConfigPtr[(GptCoreId)]->GptChannelIdToIndexMap))[(Channel)]) { break; } Channel++; } return Channel; } # 845 "../../../mcal/Gpt_ZX_K14xM/Src/Gpt.c" static inline void Gpt_ChangeChannelStatus(Gpt_ChannelType Channel, Gpt_ChannelStatusType ChannelStatus) { Gpt_ChannelInfo[Channel].ChannelStatus = ChannelStatus; } # 859 "../../../mcal/Gpt_ZX_K14xM/Src/Gpt.c" static inline void Gpt_ChangeNotificationStatus(Gpt_ChannelType Channel, boolean NotificationStatus) { Gpt_ChannelInfo[Channel].NotificationEnabled = NotificationStatus; } # 873 "../../../mcal/Gpt_ZX_K14xM/Src/Gpt.c" static inline void Gpt_ChangeWakeupEnabledStatus(Gpt_ChannelType Channel, boolean WakeupEnableStatus) { Gpt_ChannelInfo[Channel].WakeupEnabled = WakeupEnableStatus; } # 885 "../../../mcal/Gpt_ZX_K14xM/Src/Gpt.c" static inline void Gpt_ChangeWakeupGeneratedStatus(Gpt_ChannelType Channel, boolean WakeupGenerateStatus) { Gpt_ChannelInfo[Channel].WakeupGenerated = WakeupGenerateStatus; } # 900 "../../../mcal/Gpt_ZX_K14xM/Src/Gpt.c" static inline void Gpt_SetSleepMode(void) { uint32 GptCoreId = (uint32)((uint32)0UL); Gpt_ValueType ElapsedTime = 0U; Gpt_ChannelType ChannelIndex = 0U; Gpt_ChannelType Channel; ReturnHwChannelInfo.ChannelRollover = 0U; ReturnHwChannelInfo.TargetTime = (Gpt_ValueType)0U; for (ChannelIndex = 0U; ChannelIndex < Gpt_ConfigPtr[GptCoreId]->ChannelCount; ChannelIndex++) { Channel = Gpt_ConvertChannelIndexToChannel(ChannelIndex, GptCoreId); if (0U == Gpt_ChannelInfo[Channel].WakeupEnabled) { Gpt_Drvw_DisableInterrupt( ((*(Gpt_ConfigPtr[(GptCoreId)]->GptChannelConfig))[(ChannelIndex)].GptDrvwHwChannelConfigPtr)); ElapsedTime = Gpt_Drvw_GetTimeElapsed( (((*(Gpt_ConfigPtr[(GptCoreId)]->GptChannelConfig))[(ChannelIndex)].GptDrvwHwChannelConfigPtr)), &ReturnHwChannelInfo); if (GPT_STATUS_RUNNING == Gpt_ChannelInfo[Channel].ChannelStatus) { if ((1U == ReturnHwChannelInfo.ChannelRollover) && (GPT_CH_MODE_ONESHOT == (*(Gpt_ConfigPtr[(GptCoreId)]->GptChannelConfig))[(ChannelIndex)].GptChannelMode)) { Gpt_ChangeChannelStatus(Channel, GPT_STATUS_EXPIRED); } else { Gpt_StopTime[Channel] = ElapsedTime; Gpt_ChangeChannelStatus(Channel, GPT_STATUS_STOPPED); } Gpt_Drvw_StopTimer( ((*(Gpt_ConfigPtr[(GptCoreId)]->GptChannelConfig))[(ChannelIndex)].GptDrvwHwChannelConfigPtr)); } } else { Gpt_Drvw_EnableInterrupt( ((*(Gpt_ConfigPtr[(GptCoreId)]->GptChannelConfig))[(ChannelIndex)].GptDrvwHwChannelConfigPtr)); } } } # 955 "../../../mcal/Gpt_ZX_K14xM/Src/Gpt.c" static inline void Gpt_SetNormalMode(void) { uint32 GptCoreId = (uint32)((uint32)0UL); Gpt_ChannelType ChannelIndex = 0U; Gpt_ChannelType Channel; for (ChannelIndex = 0U; ChannelIndex < Gpt_ConfigPtr[GptCoreId]->ChannelCount; ChannelIndex++) { Channel = Gpt_ConvertChannelIndexToChannel(ChannelIndex, GptCoreId); if (1U == Gpt_ChannelInfo[Channel].NotificationEnabled) { Gpt_Drvw_EnableInterrupt( ((*(Gpt_ConfigPtr[(GptCoreId)]->GptChannelConfig))[(ChannelIndex)].GptDrvwHwChannelConfigPtr)); } else { if ((GPT_STATUS_RUNNING != Gpt_ChannelInfo[Channel].ChannelStatus) || (GPT_CH_MODE_CONTINUOUS == (*(Gpt_ConfigPtr[(GptCoreId)]->GptChannelConfig))[(ChannelIndex)].GptChannelMode)) { Gpt_Drvw_DisableInterrupt( ((*(Gpt_ConfigPtr[(GptCoreId)]->GptChannelConfig))[(ChannelIndex)].GptDrvwHwChannelConfigPtr)); } } } } # 1007 "../../../mcal/Gpt_ZX_K14xM/Src/Gpt.c" void Gpt_GetVersionInfo(Std_VersionInfoType *VersionInfoPtr) { if (((void *)0) == VersionInfoPtr) { (void)Det_ReportError((uint16)100U, (uint8)0, (uint8)((uint8)((uint8)0x00U)), (uint8)((uint8)((uint8)0x16U))); } else { VersionInfoPtr->vendorID = (uint16)0x00B3U; VersionInfoPtr->moduleID = (uint16)100U; VersionInfoPtr->sw_major_version = (uint8)1U; VersionInfoPtr->sw_minor_version = (uint8)2U; VersionInfoPtr->sw_patch_version = (uint8)0U; } } # 1036 "../../../mcal/Gpt_ZX_K14xM/Src/Gpt.c" void Gpt_Init(const Gpt_ConfigType *ConfigPtr) { uint32 GptCoreId; uint8 InstanceIndex; GptCoreId = (uint32)((uint32)0UL); Gpt_ChannelType ChannelIndex; Gpt_ChannelType Channel; Gpt_ChannelType PrdefTimerType; Gpt_Drvw_PredefTimerType ReturnPredefTimerType; Std_ReturnType ReturnValue = (Std_ReturnType)0x00U; ReturnValue = Gpt_CheckInit(((uint8)0x01U), GptCoreId, ConfigPtr); if ((Std_ReturnType)0x00U == ReturnValue) { Gpt_ConfigPtr[GptCoreId] = Gpt_PreDefinedConfigPtr[GptCoreId]; (void)ConfigPtr; for (InstanceIndex = 0; InstanceIndex < Gpt_ConfigPtr[GptCoreId]->InstanceCount; InstanceIndex++) { Gpt_Drvw_InitInstances( &((*(Gpt_ConfigPtr[GptCoreId]->GptInstanceConfig))[InstanceIndex])); } for (ChannelIndex = 0U; ChannelIndex < Gpt_ConfigPtr[GptCoreId]->ChannelCount; ChannelIndex++) { Channel = Gpt_ConvertChannelIndexToChannel(ChannelIndex, GptCoreId); Gpt_ChangeNotificationStatus(Channel, 0U); Gpt_ChangeWakeupEnabledStatus(Channel, 0U); Gpt_ChangeWakeupGeneratedStatus(Channel, 0U); Gpt_ChangeChannelStatus(Channel, GPT_STATUS_INITIALIZED); Gpt_StopTime[Channel] = 0U; Gpt_Drvw_Init(((*(Gpt_ConfigPtr[(GptCoreId)]->GptChannelConfig))[(ChannelIndex)].GptDrvwHwChannelConfigPtr)); } for (PrdefTimerType = 0U; PrdefTimerType < (4U); PrdefTimerType++) { ReturnPredefTimerType = Gpt_ConvertPredefTimerType((Gpt_PredefTimerType)PrdefTimerType); Gpt_Drvw_StartPredefTimer( (Gpt_ConfigPtr[GptCoreId]->GptChannelPredefConfigType)[PrdefTimerType], ReturnPredefTimerType); } Gpt_Mode = GPT_MODE_NORMAL; } } # 1112 "../../../mcal/Gpt_ZX_K14xM/Src/Gpt.c" void Gpt_DeInit(void) { Gpt_ChannelType Channel; Gpt_ChannelType ChannelIndex; Gpt_ChannelType PrdefTimerType; Std_ReturnType ReturnValue = (Std_ReturnType)0x00U; Std_ReturnType AllChannelStatus = (Std_ReturnType)0x00U; uint32 GptCoreId; GptCoreId = (uint32)((uint32)0UL); ReturnValue = Gpt_CheckInitialStatus(((uint8)0x02U), GptCoreId); if ((Std_ReturnType)0x00U == ReturnValue) { for (ChannelIndex = 0U; ChannelIndex < Gpt_ConfigPtr[GptCoreId]->ChannelCount; ChannelIndex++) { Channel = Gpt_ConvertChannelIndexToChannel(ChannelIndex, GptCoreId); ReturnValue = Gpt_CheckChannelStatus(((uint8)0x02U), Channel, GptCoreId); if ((Std_ReturnType)0x01U == ReturnValue) { AllChannelStatus = (Std_ReturnType)0x01U; break; } } if ((Std_ReturnType)0x00U == AllChannelStatus) { for (ChannelIndex = 0U; ChannelIndex < Gpt_ConfigPtr[GptCoreId]->ChannelCount; ChannelIndex++) { Channel = Gpt_ConvertChannelIndexToChannel(ChannelIndex, GptCoreId); Gpt_ChangeNotificationStatus(Channel, 0U); Gpt_ChangeWakeupEnabledStatus(Channel, 0U); Gpt_ChangeWakeupGeneratedStatus(Channel, 0U); Gpt_StopTime[Channel] = 0U; Gpt_ChangeChannelStatus(Channel, GPT_STATUS_UNINITIALIZED); Gpt_Drvw_DeInit( ((*(Gpt_ConfigPtr[(GptCoreId)]->GptChannelConfig))[(ChannelIndex)].GptDrvwHwChannelConfigPtr)); } for (PrdefTimerType = 0U; PrdefTimerType < (4U); PrdefTimerType++) { Gpt_Drvw_StopPredefTimer( (Gpt_ConfigPtr[GptCoreId]->GptChannelPredefConfigType)[PrdefTimerType]); } Gpt_ConfigPtr[GptCoreId] = ((void *)0); } else { } } } # 1193 "../../../mcal/Gpt_ZX_K14xM/Src/Gpt.c" Gpt_ValueType Gpt_GetTimeElapsed(Gpt_ChannelType Channel) { uint32 GptCoreId; uint8 ChannelIndex; Gpt_ValueType ReturnValue = (Gpt_ValueType)0; ReturnHwChannelInfo.ChannelRollover = 0U; ReturnHwChannelInfo.TargetTime = (Gpt_ValueType)0U; GptCoreId = (uint32)((uint32)0UL); Std_ReturnType Ret = (Std_ReturnType)0x01U; Ret = Gpt_CheckChannel(((uint8)0x03U), Channel, GptCoreId); if ((Std_ReturnType)0x00U == Ret) { ChannelIndex = (*(Gpt_ConfigPtr[(GptCoreId)]->GptChannelIdToIndexMap))[(Channel)]; ReturnValue = Gpt_Drvw_GetTimeElapsed( (((*(Gpt_ConfigPtr[(GptCoreId)]->GptChannelConfig))[(ChannelIndex)].GptDrvwHwChannelConfigPtr)), &ReturnHwChannelInfo); if (GPT_STATUS_RUNNING == Gpt_ChannelInfo[Channel].ChannelStatus) { if ((1U == ReturnHwChannelInfo.ChannelRollover) && (GPT_CH_MODE_ONESHOT == (*(Gpt_ConfigPtr[(GptCoreId)]->GptChannelConfig))[(ChannelIndex)].GptChannelMode)) { ReturnValue = ReturnHwChannelInfo.TargetTime; } } else if (GPT_STATUS_INITIALIZED == Gpt_ChannelInfo[Channel].ChannelStatus) { ReturnValue = (Gpt_ValueType)0U; } else if (GPT_STATUS_STOPPED == Gpt_ChannelInfo[Channel].ChannelStatus) { ReturnValue = Gpt_StopTime[Channel]; } else if (GPT_STATUS_EXPIRED == Gpt_ChannelInfo[Channel].ChannelStatus) { ReturnValue = ReturnHwChannelInfo.TargetTime; } else { } } return ReturnValue; } # 1258 "../../../mcal/Gpt_ZX_K14xM/Src/Gpt.c" Gpt_ValueType Gpt_GetTimeRemaining(Gpt_ChannelType Channel) { uint32 GptCoreId; uint8 ChannelIndex; ReturnHwChannelInfo.ChannelRollover = 0U; ReturnHwChannelInfo.TargetTime = (Gpt_ValueType)0U; Gpt_ValueType ReturnValue = (Gpt_ValueType)0U; GptCoreId = (uint32)((uint32)0UL); Std_ReturnType Ret = (Std_ReturnType)0x01U; Ret = Gpt_CheckChannel(((uint8)0x04U), Channel, GptCoreId); if ((Std_ReturnType)0x00U == Ret) { ChannelIndex = (*(Gpt_ConfigPtr[(GptCoreId)]->GptChannelIdToIndexMap))[(Channel)]; ReturnValue = Gpt_Drvw_GetTimeElapsed( (((*(Gpt_ConfigPtr[(GptCoreId)]->GptChannelConfig))[(ChannelIndex)].GptDrvwHwChannelConfigPtr)), &ReturnHwChannelInfo); if (GPT_STATUS_RUNNING == Gpt_ChannelInfo[Channel].ChannelStatus) { if ((1U == ReturnHwChannelInfo.ChannelRollover) && (GPT_CH_MODE_ONESHOT == (*(Gpt_ConfigPtr[(GptCoreId)]->GptChannelConfig))[(ChannelIndex)].GptChannelMode)) { ReturnValue = (Gpt_ValueType)0U; } else { ReturnValue = ReturnHwChannelInfo.TargetTime - ReturnValue; } } else if (GPT_STATUS_INITIALIZED == Gpt_ChannelInfo[Channel].ChannelStatus) { ReturnValue = (Gpt_ValueType)0U; } else if (GPT_STATUS_STOPPED == Gpt_ChannelInfo[Channel].ChannelStatus) { ReturnValue = ReturnHwChannelInfo.TargetTime - Gpt_StopTime[Channel]; } else if (GPT_STATUS_EXPIRED == Gpt_ChannelInfo[Channel].ChannelStatus) { ReturnValue = (Gpt_ValueType)0U; } else { } } return ReturnValue; } # 1327 "../../../mcal/Gpt_ZX_K14xM/Src/Gpt.c" void Gpt_StartTimer(Gpt_ChannelType Channel, Gpt_ValueType Value) { uint32 GptCoreId; uint8 ChannelIndex; Std_ReturnType ReturnValue = (Std_ReturnType)0x01U; GptCoreId = (uint32)((uint32)0UL); ReturnValue = Gpt_CheckStartTimer(((uint8)0x05U), Channel, Value, GptCoreId); if ((Std_ReturnType)0x00U == ReturnValue) { ChannelIndex = (*(Gpt_ConfigPtr[(GptCoreId)]->GptChannelIdToIndexMap))[(Channel)]; if (GPT_CH_MODE_ONESHOT == (*(Gpt_ConfigPtr[(GptCoreId)]->GptChannelConfig))[(ChannelIndex)].GptChannelMode) { Gpt_Drvw_EnableInterrupt( ((*(Gpt_ConfigPtr[(GptCoreId)]->GptChannelConfig))[(ChannelIndex)].GptDrvwHwChannelConfigPtr)); } Gpt_ChangeChannelStatus(Channel, GPT_STATUS_RUNNING); ReturnValue = Gpt_Drvw_StartTimer( (*(Gpt_ConfigPtr[(GptCoreId)]->GptChannelConfig))[(ChannelIndex)].GptDrvwHwChannelConfigPtr, Value); if ((Std_ReturnType)0x00U != ReturnValue) { (void)Det_ReportRuntimeError((uint16)100U, (uint8)((uint8)0U), (uint8)((uint8)((uint8)0x05U)), (uint8)((uint8)((uint8)0x2BU))); } } } # 1364 "../../../mcal/Gpt_ZX_K14xM/Src/Gpt.c" void Gpt_StopTimer(Gpt_ChannelType Channel) { uint32 GptCoreId; uint8 ChannelIndex; Gpt_ValueType ElapsedTime; GptCoreId = (uint32)((uint32)0UL); ReturnHwChannelInfo.ChannelRollover = 0U; ReturnHwChannelInfo.TargetTime = (Gpt_ValueType)0U; Std_ReturnType ReturnValue = (Std_ReturnType)0x01U; ReturnValue = Gpt_CheckChannel(((uint8)0x06U), Channel, GptCoreId); if ((Std_ReturnType)0x00U == ReturnValue) { ChannelIndex = (*(Gpt_ConfigPtr[(GptCoreId)]->GptChannelIdToIndexMap))[(Channel)]; ElapsedTime = Gpt_Drvw_GetTimeElapsed( (((*(Gpt_ConfigPtr[(GptCoreId)]->GptChannelConfig))[(ChannelIndex)].GptDrvwHwChannelConfigPtr)), &ReturnHwChannelInfo); if (GPT_STATUS_RUNNING == Gpt_ChannelInfo[Channel].ChannelStatus) { Gpt_Drvw_StopTimer( ((*(Gpt_ConfigPtr[(GptCoreId)]->GptChannelConfig))[(ChannelIndex)].GptDrvwHwChannelConfigPtr)); if ((1U == ReturnHwChannelInfo.ChannelRollover) && (GPT_CH_MODE_ONESHOT == (*(Gpt_ConfigPtr[(GptCoreId)]->GptChannelConfig))[(ChannelIndex)].GptChannelMode)) { Gpt_ChangeChannelStatus(Channel, GPT_STATUS_EXPIRED); } else { Gpt_ChangeChannelStatus(Channel, GPT_STATUS_STOPPED); Gpt_StopTime[Channel] = ElapsedTime; } } } } # 1420 "../../../mcal/Gpt_ZX_K14xM/Src/Gpt.c" void Gpt_EnableNotification(Gpt_ChannelType Channel) { uint32 GptCoreId; uint8 ChannelIndex; GptCoreId = (uint32)((uint32)0UL); Std_ReturnType ReturnValue = (Std_ReturnType)0x01U; ReturnValue = Gpt_CheckNotification(((uint8)0x07U), Channel, GptCoreId); if ((Std_ReturnType)0x00U == ReturnValue) { ChannelIndex = (*(Gpt_ConfigPtr[(GptCoreId)]->GptChannelIdToIndexMap))[(Channel)]; Gpt_ChangeNotificationStatus(Channel, 1U); if (GPT_MODE_NORMAL == Gpt_Mode) { Gpt_Drvw_EnableInterrupt( ((*(Gpt_ConfigPtr[(GptCoreId)]->GptChannelConfig))[(ChannelIndex)].GptDrvwHwChannelConfigPtr)); } } } # 1459 "../../../mcal/Gpt_ZX_K14xM/Src/Gpt.c" void Gpt_DisableNotification(Gpt_ChannelType Channel) { uint32 GptCoreId; uint8 ChannelIndex; GptCoreId = (uint32)((uint32)0UL); Std_ReturnType ReturnValue = (Std_ReturnType)0x01U; ReturnValue = Gpt_CheckNotification(((uint8)0x08U), Channel, GptCoreId); if ((Std_ReturnType)0x00U == ReturnValue) { ChannelIndex = (*(Gpt_ConfigPtr[(GptCoreId)]->GptChannelIdToIndexMap))[(Channel)]; Gpt_ChangeNotificationStatus(Channel, 0U); if ((GPT_MODE_NORMAL == Gpt_Mode) && ((GPT_CH_MODE_CONTINUOUS == (*(Gpt_ConfigPtr[(GptCoreId)]->GptChannelConfig))[(ChannelIndex)].GptChannelMode) || (GPT_STATUS_RUNNING != Gpt_ChannelInfo[Channel].ChannelStatus))) { Gpt_Drvw_DisableInterrupt( ((*(Gpt_ConfigPtr[(GptCoreId)]->GptChannelConfig))[(ChannelIndex)].GptDrvwHwChannelConfigPtr)); } } } # 1503 "../../../mcal/Gpt_ZX_K14xM/Src/Gpt.c" void Gpt_SetMode(Gpt_ModeType Mode) { uint32 GptCoreId = (uint32)((uint32)0UL); Gpt_ChannelType PrdefTimerType; Gpt_Drvw_PredefTimerType ReturnPredefTimerType; Std_ReturnType ReturnValue = (Std_ReturnType)0x00U; ReturnValue = Gpt_CheckSetMode(((uint8)0x09U), Mode, GptCoreId); if ((Std_ReturnType)0x00U == ReturnValue) { if (GPT_MODE_SLEEP == Mode) { Gpt_SetSleepMode(); for (PrdefTimerType = 0U; PrdefTimerType < (4U); PrdefTimerType++) { Gpt_Drvw_StopPredefTimer( (Gpt_ConfigPtr[GptCoreId]->GptChannelPredefConfigType)[PrdefTimerType]); } Gpt_Mode = GPT_MODE_SLEEP; } else if (GPT_MODE_NORMAL == Mode) { if ((Gpt_ModeType)GPT_MODE_SLEEP == Gpt_Mode) { for (PrdefTimerType = 0U; PrdefTimerType < (4U); PrdefTimerType++) { ReturnPredefTimerType = Gpt_ConvertPredefTimerType((Gpt_PredefTimerType)PrdefTimerType); Gpt_Drvw_StartPredefTimer( (Gpt_ConfigPtr[GptCoreId]->GptChannelPredefConfigType)[PrdefTimerType], ReturnPredefTimerType); } } Gpt_SetNormalMode(); Gpt_Mode = GPT_MODE_NORMAL; } else { } } } # 1582 "../../../mcal/Gpt_ZX_K14xM/Src/Gpt.c" void Gpt_DisableWakeup(Gpt_ChannelType Channel) { uint32 GptCoreId = (uint32)((uint32)0UL); uint8 ChannelIndex; Std_ReturnType ReturnValue = (Std_ReturnType)0x01U; ReturnValue = Gpt_CheckGptWakeup(((uint8)0x0AU), Channel, GptCoreId); if ((Std_ReturnType)0x00U == ReturnValue) { ChannelIndex = (*(Gpt_ConfigPtr[(GptCoreId)]->GptChannelIdToIndexMap))[(Channel)]; Gpt_ChangeWakeupEnabledStatus(Channel, 0U); if ((GPT_MODE_SLEEP == Gpt_Mode) && ((GPT_CH_MODE_CONTINUOUS == (*(Gpt_ConfigPtr[(GptCoreId)]->GptChannelConfig))[(ChannelIndex)].GptChannelMode) || (GPT_STATUS_RUNNING != Gpt_ChannelInfo[Channel].ChannelStatus))) { Gpt_Drvw_DisableInterrupt( ((*(Gpt_ConfigPtr[(GptCoreId)]->GptChannelConfig))[(ChannelIndex)].GptDrvwHwChannelConfigPtr)); } } } # 1633 "../../../mcal/Gpt_ZX_K14xM/Src/Gpt.c" void Gpt_EnableWakeup(Gpt_ChannelType Channel) { uint32 GptCoreId = (uint32)((uint32)0UL); uint8 ChannelIndex; Std_ReturnType ReturnValue = (Std_ReturnType)0x00U; # 1647 "../../../mcal/Gpt_ZX_K14xM/Src/Gpt.c" ReturnValue = Gpt_CheckGptWakeup(((uint8)0x0BU), Channel, GptCoreId); if ((Std_ReturnType)0x00U == ReturnValue) { ChannelIndex = (*(Gpt_ConfigPtr[(GptCoreId)]->GptChannelIdToIndexMap))[(Channel)]; Gpt_ChangeWakeupEnabledStatus(Channel, 1U); if (GPT_MODE_SLEEP == Gpt_Mode) { Gpt_Drvw_EnableInterrupt( ((*(Gpt_ConfigPtr[(GptCoreId)]->GptChannelConfig))[(ChannelIndex)].GptDrvwHwChannelConfigPtr)); } } } # 1678 "../../../mcal/Gpt_ZX_K14xM/Src/Gpt.c" void Gpt_CheckWakeup(EcuM_WakeupSourceType WakeupSource) { uint32 GptCoreId = (uint32)((uint32)0UL); Gpt_ChannelType Channel; uint32 ChannelIndex = 0U; Std_ReturnType ReturnValue = (Std_ReturnType)0x01U; ReturnValue = Gpt_CheckInitialStatus(((uint8)0x0CU), GptCoreId); if ((Std_ReturnType)0x00U == ReturnValue) { for (ChannelIndex = 0U; ChannelIndex < Gpt_ConfigPtr[GptCoreId]->ChannelCount; ChannelIndex++) { Channel = Gpt_ConvertChannelIndexToChannel(ChannelIndex, GptCoreId); if ((((*(Gpt_ConfigPtr[(GptCoreId)]->GptChannelConfig))[(ChannelIndex)].GptWakeupSource) == WakeupSource) && (1U == Gpt_ChannelInfo[Channel].WakeupGenerated)) { Gpt_ChangeWakeupGeneratedStatus(Channel, 0U); EcuM_SetWakeupEvent(WakeupSource); break; } } } } # 1737 "../../../mcal/Gpt_ZX_K14xM/Src/Gpt.c" Std_ReturnType Gpt_GetPredefTimerValue(Gpt_PredefTimerType PredefTimer, uint32 *TimeValuePtr) { uint32 GptCoreId; Std_ReturnType ReturnValue = (Std_ReturnType)0x01U; Gpt_ChannelType Channel; Gpt_Drvw_PredefTimerType ReturnPredefTimerType; GptCoreId = (uint32)((uint32)0UL); ReturnValue = Gpt_CheckGetPredefTimerValue(((uint8)0x0DU), GptCoreId, TimeValuePtr); if ((Std_ReturnType)0x00U == ReturnValue) { ReturnValue = Gpt_CheckPredefTimerType(PredefTimer, GptCoreId); if ((Std_ReturnType)0x00U == ReturnValue) { ReturnValue = Gpt_CheckMode(((uint8)0x0DU)); if ((Std_ReturnType)0x00U == ReturnValue) { Channel = (Gpt_ChannelType)PredefTimer; ReturnPredefTimerType = Gpt_ConvertPredefTimerType(PredefTimer); Gpt_Drvw_GetPredefTimerValue( (Gpt_ConfigPtr[GptCoreId]->GptChannelPredefConfigType)[Channel], ReturnPredefTimerType, TimeValuePtr); } else { *TimeValuePtr = 0U; } } else { *TimeValuePtr = 0U; } } else { } return ReturnValue; } # 1849 "../../../mcal/Gpt_ZX_K14xM/Src/Gpt.c" void Gpt_TimeMatchCallback(uint8 Channel) { uint32 GptCoreId; uint8 ChannelIndex; GptCoreId = (uint32)((uint32)0UL); if (Gpt_ConfigPtr[GptCoreId] != ((void *)0)) { ChannelIndex = (*(Gpt_ConfigPtr[(GptCoreId)]->GptChannelIdToIndexMap))[(Channel)]; if (GPT_CH_MODE_ONESHOT == (*(Gpt_ConfigPtr[(GptCoreId)]->GptChannelConfig))[(ChannelIndex)].GptChannelMode) { Gpt_Drvw_StopTimer( ((*(Gpt_ConfigPtr[(GptCoreId)]->GptChannelConfig))[(ChannelIndex)].GptDrvwHwChannelConfigPtr)); Gpt_ChangeChannelStatus(Channel, GPT_STATUS_EXPIRED); } if ((GPT_MODE_NORMAL == Gpt_Mode) && (1U == Gpt_ChannelInfo[Channel].NotificationEnabled) && (((void *)0) != (*(Gpt_ConfigPtr[(GptCoreId)]->GptChannelConfig))[(ChannelIndex)].GptNotification)) { (*(Gpt_ConfigPtr[(GptCoreId)]->GptChannelConfig))[(ChannelIndex)].GptNotification(); } if ((GPT_MODE_SLEEP == Gpt_Mode) && (1U == Gpt_ChannelInfo[Channel].WakeupEnabled)) { Gpt_ChangeWakeupGeneratedStatus(Channel, 1U); EcuM_CheckWakeup((*(Gpt_ConfigPtr[(GptCoreId)]->GptChannelConfig))[(ChannelIndex)].GptWakeupSource); } } } # 1 "../../../mcal/Base_ZX_K14xM/Inc/MemMap\\Gpt_MemMap.h" 1 # 1088 "../../../mcal/Base_ZX_K14xM/Inc/MemMap\\Gpt_MemMap.h" #pragma clang section text = "" # 1888 "../../../mcal/Gpt_ZX_K14xM/Src/Gpt.c" 2