Power_Ip_SMC.h 9.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213
  1. /*==================================================================================================
  2. * Project : RTD AUTOSAR 4.4
  3. * Platform : CORTEXM
  4. * Peripheral :
  5. * Dependencies : none
  6. *
  7. * Autosar Version : 4.4.0
  8. * Autosar Revision : ASR_REL_4_4_REV_0000
  9. * Autosar Conf.Variant :
  10. * SW Version : 1.0.0
  11. * Build Version : S32K1_RTD_1_0_0_HF01_D2109_ASR_REL_4_4_REV_0000_20210907
  12. *
  13. * (c) Copyright 2020-2021 NXP Semiconductors
  14. * All Rights Reserved.
  15. *
  16. * NXP Confidential. This software is owned or controlled by NXP and may only be
  17. * used strictly in accordance with the applicable license terms. By expressly
  18. * accepting such terms or by downloading, installing, activating and/or otherwise
  19. * using the software, you are agreeing that you have read, and that you agree to
  20. * comply with and are bound by, such license terms. If you do not agree to be
  21. * bound by the applicable license terms, then you may not retain, install,
  22. * activate or otherwise use the software.
  23. ==================================================================================================*/
  24. /**
  25. * @file Power_Ip_SMC.h
  26. * @version 1.0.0
  27. *
  28. * @brief POWER IP driver header file.
  29. * @details POWER IP driver header file.
  30. *
  31. * @addtogroup POWER_DRIVER Power Ip Driver
  32. * @{
  33. */
  34. #ifndef POWER_IP_SMC_H
  35. #define POWER_IP_SMC_H
  36. #ifdef __cplusplus
  37. extern "C"{
  38. #endif
  39. /*==================================================================================================
  40. INCLUDE FILES
  41. 1) system and project includes
  42. 2) needed interfaces from external units
  43. 3) internal and external interfaces from this unit
  44. ==================================================================================================*/
  45. #include "Power_Ip_SMC_Types.h"
  46. #include "Power_Ip_Cfg.h"
  47. #include "StandardTypes.h"
  48. #include "OsIf.h"
  49. #include "Mcal.h"
  50. /*==================================================================================================
  51. SOURCE FILE VERSION INFORMATION
  52. ==================================================================================================*/
  53. #define POWER_IP_SMC_VENDOR_ID 43
  54. #define POWER_IP_SMC_AR_RELEASE_MAJOR_VERSION 4
  55. #define POWER_IP_SMC_AR_RELEASE_MINOR_VERSION 4
  56. #define POWER_IP_SMC_AR_RELEASE_REVISION_VERSION 0
  57. #define POWER_IP_SMC_SW_MAJOR_VERSION 1
  58. #define POWER_IP_SMC_SW_MINOR_VERSION 0
  59. #define POWER_IP_SMC_SW_PATCH_VERSION 0
  60. /*==================================================================================================
  61. FILE VERSION CHECKS
  62. ==================================================================================================*/
  63. #ifndef DISABLE_MCAL_INTERMODULE_ASR_CHECK
  64. /* Check if Power_Ip_SMC.h file and StandardTypes.h file are of the same Autosar version */
  65. #if ((POWER_IP_SMC_AR_RELEASE_MAJOR_VERSION != STD_AR_RELEASE_MAJOR_VERSION) || \
  66. (POWER_IP_SMC_AR_RELEASE_MINOR_VERSION != STD_AR_RELEASE_MINOR_VERSION))
  67. #error "AutoSar Version Numbers of Power_Ip_SMC.h and StandardTypes.h are different"
  68. #endif
  69. /* Check if Power_Ip_SMC.h file and OsIf.h file are of the same Autosar version */
  70. #if ((POWER_IP_SMC_AR_RELEASE_MAJOR_VERSION != OSIF_AR_RELEASE_MAJOR_VERSION) || \
  71. (POWER_IP_SMC_AR_RELEASE_MINOR_VERSION != OSIF_AR_RELEASE_MINOR_VERSION))
  72. #error "AutoSar Version Numbers of Power_Ip_SMC.h and OsIf.h are different"
  73. #endif
  74. /* Check if Power_Ip_SMC.h file and Mcal.h file are of the same Autosar version */
  75. #if ((POWER_IP_SMC_AR_RELEASE_MAJOR_VERSION != MCAL_AR_RELEASE_MAJOR_VERSION) || \
  76. (POWER_IP_SMC_AR_RELEASE_MINOR_VERSION != MCAL_AR_RELEASE_MINOR_VERSION))
  77. #error "AutoSar Version Numbers of Power_Ip_SMC.h and Mcal.h are different"
  78. #endif
  79. #endif /* DISABLE_MCAL_INTERMODULE_ASR_CHECK */
  80. /* Check if Power_Ip_SMC.h file and Power_Ip_SMC_Types.h file are of the same vendor */
  81. #if (POWER_IP_SMC_VENDOR_ID != POWER_IP_SMC_TYPES_VENDOR_ID)
  82. #error "Power_Ip_SMC.h and Power_Ip_SMC_Types.h have different vendor ids"
  83. #endif
  84. /* Check if Power_Ip_SMC.h file and Power_Ip_SMC_Types.h file are of the same Autosar version */
  85. #if ((POWER_IP_SMC_AR_RELEASE_MAJOR_VERSION != POWER_IP_SMC_TYPES_AR_RELEASE_MAJOR_VERSION) || \
  86. (POWER_IP_SMC_AR_RELEASE_MINOR_VERSION != POWER_IP_SMC_TYPES_AR_RELEASE_MINOR_VERSION) || \
  87. (POWER_IP_SMC_AR_RELEASE_REVISION_VERSION != POWER_IP_SMC_TYPES_AR_RELEASE_REVISION_VERSION) \
  88. )
  89. #error "AutoSar Version Numbers of Power_Ip_SMC.h and Power_Ip_SMC_Types.h are different"
  90. #endif
  91. /* Check if Power_Ip_SMC.h file and Power_Ip_SMC_Types.h file are of the same Software version */
  92. #if ((POWER_IP_SMC_SW_MAJOR_VERSION != POWER_IP_SMC_TYPES_SW_MAJOR_VERSION) || \
  93. (POWER_IP_SMC_SW_MINOR_VERSION != POWER_IP_SMC_TYPES_SW_MINOR_VERSION) || \
  94. (POWER_IP_SMC_SW_PATCH_VERSION != POWER_IP_SMC_TYPES_SW_PATCH_VERSION) \
  95. )
  96. #error "Software Version Numbers of Power_Ip_SMC.h and Power_Ip_SMC_Types.h are different"
  97. #endif
  98. /* Check if Power_Ip_SMC.h file and Power_Ip_Cfg.h file are of the same vendor */
  99. #if (POWER_IP_SMC_VENDOR_ID != POWER_IP_CFG_VENDOR_ID)
  100. #error "Power_Ip_SMC.h and Power_Ip_Cfg.h have different vendor ids"
  101. #endif
  102. /* Check if Power_Ip_SMC.h file and Power_Ip_Cfg.h file are of the same Autosar version */
  103. #if ((POWER_IP_SMC_AR_RELEASE_MAJOR_VERSION != POWER_IP_CFG_AR_RELEASE_MAJOR_VERSION) || \
  104. (POWER_IP_SMC_AR_RELEASE_MINOR_VERSION != POWER_IP_CFG_AR_RELEASE_MINOR_VERSION) || \
  105. (POWER_IP_SMC_AR_RELEASE_REVISION_VERSION != POWER_IP_CFG_AR_RELEASE_REVISION_VERSION) \
  106. )
  107. #error "AutoSar Version Numbers of Power_Ip_SMC.h and Power_Ip_Cfg.h are different"
  108. #endif
  109. /* Check if Power_Ip_SMC.h file and Power_Ip_Cfg.h file are of the same Software version */
  110. #if ((POWER_IP_SMC_SW_MAJOR_VERSION != POWER_IP_CFG_SW_MAJOR_VERSION) || \
  111. (POWER_IP_SMC_SW_MINOR_VERSION != POWER_IP_CFG_SW_MINOR_VERSION) || \
  112. (POWER_IP_SMC_SW_PATCH_VERSION != POWER_IP_CFG_SW_PATCH_VERSION) \
  113. )
  114. #error "Software Version Numbers of Power_Ip_SMC.h and Power_Ip_Cfg.h are different"
  115. #endif
  116. /*==================================================================================================
  117. * CONSTANTS
  118. ==================================================================================================*/
  119. /*==================================================================================================
  120. DEFINES AND MACROS
  121. ==================================================================================================*/
  122. /*==================================================================================================
  123. * ENUMS
  124. ==================================================================================================*/
  125. /*==================================================================================================
  126. * STRUCTURES AND OTHER TYPEDEFS
  127. ==================================================================================================*/
  128. /*==================================================================================================
  129. * GLOBAL VARIABLE DECLARATIONS
  130. ==================================================================================================*/
  131. /*==================================================================================================
  132. * FUNCTION PROTOTYPES
  133. ==================================================================================================*/
  134. #define MCU_START_SEC_CODE
  135. #include "Mcu_MemMap.h"
  136. #if (defined(POWER_IP_DISABLE_SMC_INIT) && (STD_OFF == POWER_IP_DISABLE_SMC_INIT))
  137. #ifdef POWER_IP_ENABLE_USER_MODE_SUPPORT
  138. #if (STD_ON == POWER_IP_ENABLE_USER_MODE_SUPPORT)
  139. #define Call_Power_Ip_SMC_AllowedModesConfig(SMC_pConfigPtr) \
  140. OsIf_Trusted_Call1param(Power_Ip_SMC_AllowedModesConfig,(SMC_pConfigPtr))
  141. #else
  142. #define Call_Power_Ip_SMC_AllowedModesConfig(SMC_pConfigPtr) \
  143. Power_Ip_SMC_AllowedModesConfig(SMC_pConfigPtr)
  144. #endif
  145. #endif
  146. #endif
  147. #ifdef POWER_IP_ENABLE_USER_MODE_SUPPORT
  148. #if (STD_ON == POWER_IP_ENABLE_USER_MODE_SUPPORT)
  149. #define Call_Power_Ip_SMC_ModeConfig(pModeConfigPtr) \
  150. OsIf_Trusted_Call_Return1param(Power_Ip_SMC_ModeConfig,(pModeConfigPtr))
  151. #else
  152. #define Call_Power_Ip_SMC_ModeConfig(pModeConfigPtr) \
  153. Power_Ip_SMC_ModeConfig(pModeConfigPtr)
  154. #endif
  155. #endif
  156. #if (defined(POWER_IP_DISABLE_SMC_INIT) && (STD_OFF == POWER_IP_DISABLE_SMC_INIT))
  157. void Power_Ip_SMC_AllowedModesConfig(const Power_Ip_SMC_ConfigType * pConfigPtr);
  158. #endif
  159. Power_Ip_SMC_ModeStatusType Power_Ip_SMC_ModeCheckEntry(Power_Ip_PowerModeType ePowerMode);
  160. uint32 Power_Ip_SMC_ModeConfig(const Power_Ip_ModeConfigType * pModeConfigPtr);
  161. #ifdef POWER_IP_POWERMODE_STATE_API
  162. #if (STD_ON == POWER_IP_POWERMODE_STATE_API)
  163. Power_Ip_PowerModeStateType Power_Ip_SMC_GetPowerModeState(void);
  164. #endif
  165. #endif
  166. #define MCU_STOP_SEC_CODE
  167. #include "Mcu_MemMap.h"
  168. #ifdef __cplusplus
  169. }
  170. #endif
  171. #endif /* POWER_IP_SMC_H */
  172. /** @} */