Port_Ci_Icu_Ip_Defines.h 6.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141
  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_DEFINES_H
  25. #define PORT_CI_ICU_IP_DEFINES_H
  26. /**
  27. * @file Port2_Icu_Ip_Defines.h
  28. * @version 1.0.0
  29. *
  30. * @brief AUTOSAR Icu - contains the data exported by the Icu module
  31. * @details Contains the information that will be exported by the module, as requested by Autosar.
  32. *
  33. * @addtogroup port2_icu_ip PORT_CI IPL
  34. * @{
  35. */
  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 "StandardTypes.h"
  46. /* Include platform header file. */
  47. #include "S32K146_PORT.h"
  48. /*==================================================================================================
  49. * SOURCE FILE VERSION INFORMATION
  50. *================================================================================================*/
  51. #define PORT_CI_ICU_IP_DEFINES_VENDOR_ID 43
  52. #define PORT_CI_ICU_IP_DEFINES_AR_RELEASE_MAJOR_VERSION 4
  53. #define PORT_CI_ICU_IP_DEFINES_AR_RELEASE_MINOR_VERSION 4
  54. #define PORT_CI_ICU_IP_DEFINES_AR_RELEASE_REVISION_VERSION 0
  55. #define PORT_CI_ICU_IP_DEFINES_SW_MAJOR_VERSION 1
  56. #define PORT_CI_ICU_IP_DEFINES_SW_MINOR_VERSION 0
  57. #define PORT_CI_ICU_IP_DEFINES_SW_PATCH_VERSION 0
  58. /*==================================================================================================
  59. * FILE VERSION CHECKS
  60. ==================================================================================================*/
  61. #ifndef DISABLE_MCAL_INTERMODULE_ASR_CHECK
  62. /* Check if header file and StandardTypes.h file are of the same Autosar version */
  63. #if ((PORT_CI_ICU_IP_DEFINES_AR_RELEASE_MAJOR_VERSION != STD_AR_RELEASE_MAJOR_VERSION) || \
  64. (PORT_CI_ICU_IP_DEFINES_AR_RELEASE_MINOR_VERSION != STD_AR_RELEASE_MINOR_VERSION))
  65. #error "AutoSar Version Numbers of Port_Ci_Icu_Ip_Defines.h and StandardTypes.h are different"
  66. #endif
  67. #endif
  68. /*==================================================================================================
  69. * DEFINES AND MACROS
  70. ==================================================================================================*/
  71. /* Macros that indicate PORT instances used by ICU. */
  72. /** @brief PORT 0 ISR enable/disable */
  73. #define PORT_CI_ICU_IP_PORT_0_ISR_USED (STD_ON)
  74. /** @brief PORT 1 ISR enable/disable */
  75. #define PORT_CI_ICU_IP_PORT_1_ISR_USED (STD_ON)
  76. /** @brief PORT 3 ISR enable/disable */
  77. #define PORT_CI_ICU_IP_PORT_3_ISR_USED (STD_ON)
  78. /** @brief PORT 4 ISR enable/disable */
  79. #define PORT_CI_ICU_IP_PORT_4_ISR_USED (STD_ON)
  80. /**
  81. * @brief PORT CI channels defines
  82. */
  83. /*
  84. * PORT CI channel encoding
  85. *
  86. * [ 4 bit | 5 bit ]
  87. * [ module id: 15 ... 0 | channel id: 31 ... 0 ]
  88. */
  89. #define ICU_PORT_CI_MOD_MASK_U16 ((uint16)0x1E0)
  90. #define ICU_PORT_CI_MOD_SHIFT ((uint16)5U)
  91. #define ICU_PORT_CI_CH_MASK_U16 ((uint16)0x1F)
  92. #define ICU_PORT_CI_CH_SHIFT ((uint16)0U)
  93. /* PORT CI module and channel decoding */
  94. #define ICU_PORT_CI_MODULE_INDEX_U8(ch) ((uint8)(((ch) & ICU_PORT_CI_MOD_MASK_U16) >> ICU_PORT_CI_MOD_SHIFT))
  95. #define ICU_PORT_CI_CHANNEL_INDEX_U8(ch) ((uint8)(((ch) & ICU_PORT_CI_CH_MASK_U16) >> ICU_PORT_CI_CH_SHIFT))
  96. /** @brief Get A number of PORT_CI hardware modules from resource file*/
  97. #define ICU_NUM_PORT_CI_HW_MODULE_U8 ((uint8)5U)
  98. /** @brief Switches the Development Error Detection and Notification on or off. */
  99. #define PORT_CI_ICU_IP_DEV_ERROR_DETECT (STD_ON)
  100. /** @brief Adds or removes all services related to mode set functionality. */
  101. #define PORT_CI_ICU_IP_SET_MODE_API (STD_ON)
  102. /** @brief Add or remove all functions related to input state. */
  103. #define PORT_CI_ICU_IP_GET_INPUT_STATE_API (STD_ON)
  104. /** @brief Adds or removes all services related to the edge detect functionality. */
  105. #define PORT_CI_ICU_IP_EDGE_DETECT_API (STD_ON)
  106. /** @brief Adds or removes all services related to the deinitialization functionality. */
  107. #define PORT_CI_ICU_IP_DEINIT_API (STD_ON)
  108. /** @brief Support for User mode. If this parameter has been configured to 'STD_ON', the FTM driver
  109. * code can be executed from both supervisor and user mode. */
  110. #define PORT_CI_ICU_IP_ENABLE_USER_MODE_SUPPORT (STD_OFF)
  111. /* Verification for user mode support. */
  112. #ifndef MCAL_ENABLE_USER_MODE_SUPPORT
  113. #if (defined (PORT_CI_ICU_IP_ENABLE_USER_MODE_SUPPORT) && (STD_ON == PORT_CI_ICU_IP_ENABLE_USER_MODE_SUPPORT))
  114. #error MCAL_ENABLE_USER_MODE_SUPPORT is not enabled. For running Icu in user mode the MCAL_ENABLE_USER_MODE_SUPPORT needs to be defined
  115. #endif
  116. #endif
  117. #ifdef __cplusplus
  118. }
  119. #endif
  120. /** @} */
  121. #endif /* PORT_CI_ICU_IP_DEFINES_H */