Port_Ci_Icu_Ip.h 9.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191
  1. /*==================================================================================================
  2. * Project : RTD AUTOSAR 4.4
  3. * Platform : CORTEXM
  4. * Peripheral : Ftm Lpit Lptmr Port_Ci LpCmp
  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. #ifndef PORT_CI_ICU_IP_H
  25. #define PORT_CI_ICU_IP_H
  26. /**
  27. * @file
  28. *
  29. * @addtogroup port_ci_icu_ip PORT_CI IPL
  30. * @{
  31. */
  32. #ifdef __cplusplus
  33. extern "C"{
  34. #endif
  35. /*==================================================================================================
  36. * INCLUDE FILES
  37. * 1) system and project includes
  38. * 2) needed interfaces from external units
  39. * 3) internal and external interfaces from this unit
  40. ==================================================================================================*/
  41. #include "Port_Ci_Icu_Ip_Types.h"
  42. #include "Port_Ci_Icu_Ip_Cfg.h"
  43. #if (PORT_CI_ICU_IP_ENABLE_USER_MODE_SUPPORT == STD_ON)
  44. #include "Reg_eSys.h"
  45. #endif
  46. /*==================================================================================================
  47. * SOURCE FILE VERSION INFORMATION
  48. ==================================================================================================*/
  49. #define PORT_CI_ICU_IP_VENDOR_ID 43
  50. #define PORT_CI_ICU_IP_AR_RELEASE_MAJOR_VERSION 4
  51. #define PORT_CI_ICU_IP_AR_RELEASE_MINOR_VERSION 4
  52. #define PORT_CI_ICU_IP_AR_RELEASE_REVISION_VERSION 0
  53. #define PORT_CI_ICU_IP_SW_MAJOR_VERSION 1
  54. #define PORT_CI_ICU_IP_SW_MINOR_VERSION 0
  55. #define PORT_CI_ICU_IP_SW_PATCH_VERSION 0
  56. /*==================================================================================================
  57. * FILE VERSION CHECKS
  58. ==================================================================================================*/
  59. /* Check if source file and ICU header file are of the same vendor */
  60. #if (PORT_CI_ICU_IP_VENDOR_ID != PORT_CI_ICU_IP_TYPES_VENDOR_ID)
  61. #error "Port_Ci_Icu_Ip.h and Port_Ci_Icu_Ip_Types.h have different vendor IDs"
  62. #endif
  63. /* Check if source file and ICU header file are of the same AutoSar version */
  64. #if ((PORT_CI_ICU_IP_AR_RELEASE_MAJOR_VERSION != PORT_CI_ICU_IP_TYPES_AR_RELEASE_MAJOR_VERSION) || \
  65. (PORT_CI_ICU_IP_AR_RELEASE_MINOR_VERSION != PORT_CI_ICU_IP_TYPES_AR_RELEASE_MINOR_VERSION) || \
  66. (PORT_CI_ICU_IP_AR_RELEASE_REVISION_VERSION != PORT_CI_ICU_IP_TYPES_AR_RELEASE_REVISION_VERSION))
  67. #error "AutoSar Version Numbers of Port_Ci_Icu_Ip.h and Port_Ci_Icu_Ip_Types.h are different"
  68. #endif
  69. /* Check if source file and ICU header file are of the same Software version */
  70. #if ((PORT_CI_ICU_IP_SW_MAJOR_VERSION != PORT_CI_ICU_IP_TYPES_SW_MAJOR_VERSION) || \
  71. (PORT_CI_ICU_IP_SW_MINOR_VERSION != PORT_CI_ICU_IP_TYPES_SW_MINOR_VERSION) || \
  72. (PORT_CI_ICU_IP_SW_PATCH_VERSION != PORT_CI_ICU_IP_TYPES_SW_PATCH_VERSION))
  73. #error "Software Version Numbers of Port_Ci_Icu_Ip.h and Port_Ci_Icu_Ip_Types.h are different"
  74. #endif
  75. /* Check if source file and ICU header file are of the same vendor */
  76. #if (PORT_CI_ICU_IP_VENDOR_ID != PORT_CI_ICU_IP_CFG_VENDOR_ID)
  77. #error "Port_Ci_Icu_Ip.h and Port_Ci_Icu_Ip_Cfg.h have different vendor IDs"
  78. #endif
  79. /* Check if source file and ICU header file are of the same AutoSar version */
  80. #if ((PORT_CI_ICU_IP_AR_RELEASE_MAJOR_VERSION != PORT_CI_ICU_IP_CFG_AR_RELEASE_MAJOR_VERSION) || \
  81. (PORT_CI_ICU_IP_AR_RELEASE_MINOR_VERSION != PORT_CI_ICU_IP_CFG_AR_RELEASE_MINOR_VERSION) || \
  82. (PORT_CI_ICU_IP_AR_RELEASE_REVISION_VERSION != PORT_CI_ICU_IP_CFG_AR_RELEASE_REVISION_VERSION))
  83. #error "AutoSar Version Numbers of Port_Ci_Icu_Ip.h and Port_Ci_Icu_Ip_Cfg.h are different"
  84. #endif
  85. /* Check if source file and ICU header file are of the same Software version */
  86. #if ((PORT_CI_ICU_IP_SW_MAJOR_VERSION != PORT_CI_ICU_IP_CFG_SW_MAJOR_VERSION) || \
  87. (PORT_CI_ICU_IP_SW_MINOR_VERSION != PORT_CI_ICU_IP_CFG_SW_MINOR_VERSION) || \
  88. (PORT_CI_ICU_IP_SW_PATCH_VERSION != PORT_CI_ICU_IP_CFG_SW_PATCH_VERSION))
  89. #error "Software Version Numbers of Port_Ci_Icu_Ip.h and Port_Ci_Icu_Ip_Cfg.h are different"
  90. #endif
  91. #ifndef DISABLE_MCAL_INTERMODULE_ASR_CHECK
  92. #if (PORT_CI_ICU_IP_ENABLE_USER_MODE_SUPPORT == STD_ON)
  93. /* Check if header file and Reg_eSys.h file are of the same Autosar version */
  94. #if ((PORT_CI_ICU_IP_AR_RELEASE_MAJOR_VERSION != REG_ESYS_AR_RELEASE_MAJOR_VERSION) || \
  95. (PORT_CI_ICU_IP_AR_RELEASE_MINOR_VERSION != REG_ESYS_AR_RELEASE_MINOR_VERSION))
  96. #error "AutoSar Version Numbers of Port_Ci_Icu_Ip.h and Reg_eSys.h are different"
  97. #endif
  98. #endif
  99. #endif
  100. /*==================================================================================================
  101. * CONSTANTS
  102. ==================================================================================================*/
  103. /*==================================================================================================
  104. * DEFINES AND MACROS
  105. ==================================================================================================*/
  106. #if (defined PORT_CI_ICU_CONFIG_EXT)
  107. #define ICU_START_SEC_CONFIG_DATA_UNSPECIFIED
  108. #include "Icu_MemMap.h"
  109. /* Macro used to import PORT_CI PB generated configurations. */
  110. PORT_CI_ICU_CONFIG_EXT
  111. #define ICU_STOP_SEC_CONFIG_DATA_UNSPECIFIED
  112. #include "Icu_MemMap.h"
  113. #endif
  114. /* @brief DMA/Interrupt Request rising/falling/either edge masks */
  115. #define ICU_PORT_CI_PCR_IREE_U32 (0x90000u)
  116. #define ICU_PORT_CI_PCR_IFEE_U32 (0xA0000u)
  117. #define ICU_PORT_CI_PCR_IEEE_U32 (0xB0000u)
  118. /*==================================================================================================
  119. * ENUMS
  120. ==================================================================================================*/
  121. /*==================================================================================================
  122. * STRUCTURES AND OTHER TYPEDEFS
  123. ==================================================================================================*/
  124. /*==================================================================================================
  125. * GLOBAL VARIABLE DECLARATIONS
  126. ==================================================================================================*/
  127. #define ICU_START_SEC_CONST_UNSPECIFIED
  128. #include "Icu_MemMap.h"
  129. extern PORT_Type * const s_Port_Ci_Base[];
  130. #define ICU_STOP_SEC_CONST_UNSPECIFIED
  131. #include "Icu_MemMap.h"
  132. /*==================================================================================================
  133. * FUNCTION PROTOTYPES
  134. ==================================================================================================*/
  135. #define ICU_START_SEC_CODE
  136. #include "Icu_MemMap.h"
  137. #if ((PORT_CI_ICU_IP_SET_MODE_API == STD_ON) ||(PORT_CI_ICU_IP_EDGE_DETECT_API == STD_ON))
  138. void Port_Ci_Icu_Ip_EnableInterrupt(uint8 instance, uint8 hwChannel);
  139. #endif
  140. void Port_Ci_Icu_Ip_DisableInterrupt(uint8 instance, uint8 hwChannel);
  141. Port_Ci_Icu_Ip_StatusType Port_Ci_Icu_Ip_Init (uint8 instance, const Port_Ci_Icu_Ip_ConfigType * userConfig);
  142. #if (STD_ON == PORT_CI_ICU_IP_DEINIT_API)
  143. Port_Ci_Icu_Ip_StatusType Port_Ci_Icu_Ip_DeInit(uint8 instance);
  144. #endif
  145. #if (PORT_CI_ICU_IP_SET_MODE_API == STD_ON)
  146. void Port_Ci_Icu_Ip_SetSleepMode(uint8 instance, uint8 hwChannel);
  147. void Port_Ci_Icu_Ip_SetNormalMode(uint8 instance, uint8 hwChannel);
  148. #endif /* PORT_CI_ICU_IP_SET_MODE_API */
  149. void Port_Ci_Icu_Ip_SetActivationCondition(uint8 instance, uint8 hwChannel, Port_Ci_Icu_Ip_EdgeType activation);
  150. #if (PORT_CI_ICU_IP_EDGE_DETECT_API == STD_ON)
  151. void Port_Ci_Icu_Ip_EnableEdgeDetection(uint8 instance, uint8 hwChannel);
  152. void Port_Ci_Icu_Ip_DisableDetection(uint8 instance, uint8 hwChannel);
  153. #endif /* PORT_CI_ICU_IP_EDGE_DETECT_API */
  154. #if (PORT_CI_ICU_IP_GET_INPUT_STATE_API == STD_ON)
  155. boolean Port_Ci_Icu_Ip_GetInputState(uint8 instance, uint8 hwChannel);
  156. #endif /* PORT_CI_ICU_IP_GET_INPUT_STATE_API */
  157. #define ICU_STOP_SEC_CODE
  158. #include "Icu_MemMap.h"
  159. #ifdef __cplusplus
  160. }
  161. #endif
  162. /** @} */
  163. #endif /* PORT_CI_ICU_IP_H */