Ftm_Icu_Ip_Defines.h 7.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162
  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 FTM_ICU_IP_DEFINES_H
  25. #define FTM_ICU_IP_DEFINES_H
  26. /**
  27. * @file
  28. *
  29. * @addtogroup ftm_icu_ip FTM 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 "StandardTypes.h"
  42. /* Include platform header file. */
  43. #include "S32K146_FTM.h"
  44. /*==================================================================================================
  45. * SOURCE FILE VERSION INFORMATION
  46. *================================================================================================*/
  47. #define FTM_ICU_IP_DEFINES_VENDOR_ID 43
  48. #define FTM_ICU_IP_DEFINES_AR_RELEASE_MAJOR_VERSION 4
  49. #define FTM_ICU_IP_DEFINES_AR_RELEASE_MINOR_VERSION 4
  50. #define FTM_ICU_IP_DEFINES_AR_RELEASE_REVISION_VERSION 0
  51. #define FTM_ICU_IP_DEFINES_SW_MAJOR_VERSION 1
  52. #define FTM_ICU_IP_DEFINES_SW_MINOR_VERSION 0
  53. #define FTM_ICU_IP_DEFINES_SW_PATCH_VERSION 0
  54. /*==================================================================================================
  55. * FILE VERSION CHECKS
  56. ==================================================================================================*/
  57. /* Check if header file and Std_Types.h file are of the same Autosar version */
  58. #ifndef DISABLE_MCAL_INTERMODULE_ASR_CHECK
  59. #if ((FTM_ICU_IP_DEFINES_AR_RELEASE_MAJOR_VERSION != STD_AR_RELEASE_MAJOR_VERSION) || \
  60. (FTM_ICU_IP_DEFINES_AR_RELEASE_MINOR_VERSION != STD_AR_RELEASE_MINOR_VERSION))
  61. #error "AutoSar Version Numbers of Ftm_Icu_Ip_Defines.h and Std_Types.h are different"
  62. #endif
  63. #endif
  64. /*==================================================================================================
  65. * CONSTANTS
  66. ==================================================================================================*/
  67. /*==================================================================================================
  68. * DEFINES AND MACROS
  69. ==================================================================================================*/
  70. /* Macros that indicate FTM instances used by ICU. */
  71. /** @brief Switches the Development Error Detection and Notification on or off. */
  72. #define FTM_ICU_IP_DEV_ERROR_DETECT (STD_ON)
  73. #if (STD_ON == FTM_ICU_IP_DEV_ERROR_DETECT)
  74. /** @brief The number of FTM instances available on platform */
  75. #define FTM_ICU_IP_NUM_OF_MODULES (6U)
  76. #endif
  77. /** @brief The number of channels available on each FTM instance */
  78. #define FTM_ICU_IP_NUM_OF_CHANNELS (8U)
  79. /** TODO:Generate @brief The number of channels with filter on each FTM instance */
  80. #define FTM_FILTER_MAX_NO_CH (4U)
  81. /** @brief Adds or removes all services related to the timestamp functionality. */
  82. #define FTM_ICU_TIMESTAMP_API (STD_ON)
  83. /** @brief Adds or removes all services related to the edge detect functionality. */
  84. #define FTM_ICU_EDGE_DETECT_API (STD_ON)
  85. /** @brief Adds or removes all services related to the signal mesurement functionality. */
  86. #define FTM_ICU_SIGNAL_MEASUREMENT_API (STD_ON)
  87. /** @brief Adds or removes all services related to the input level. */
  88. #define FTM_ICU_GET_INPUT_LEVEL_API (STD_ON)
  89. /** @brief Adds or removes all services related to the deinitialization functionality. */
  90. #define FTM_ICU_DEINIT_API (STD_ON)
  91. /** @brief Adds or removes all services related to mode set functionality. */
  92. #define FTM_ICU_SET_MODE_API (STD_ON)
  93. /** @brief Adds or removes all services related to edge count functionality. */
  94. #define FTM_ICU_EDGE_COUNT_API (STD_ON)
  95. /** @brief Adds or removes the service Icu_GetTimeElapsed() from the code. */
  96. #define FTM_ICU_GET_TIME_ELAPSED_API (STD_ON)
  97. /** @brief Adds or removes the service Icu_GetDutyCycleValues() from the code. */
  98. #define FTM_ICU_GET_DUTY_CYCLE_VALUES_API (STD_ON)
  99. /** @brief Adds or removes all services related to input state functionality. */
  100. #define FTM_ICU_GET_INPUT_STATE_API (STD_ON)
  101. /** @brief Adds or removes all services related to dual clock edge functionality. */
  102. #define FTM_ICU_DUAL_CLOCK_MODE_API (STD_OFF)
  103. /** @brief Support for User mode.If this parameter has been configured to 'STD_ON',
  104. * the FTM driver code can be executed from both supervisor and user mode. */
  105. #define FTM_ICU_ENABLE_USER_MODE_SUPPORT (STD_OFF)
  106. #define FTM_ICU_CAPTURERGISTER_API (STD_OFF)
  107. /** @brief Adds or Removes the code related to overflow notification */
  108. #define FTM_ICU_OVERFLOW_NOTIFICATION_API (STD_OFF)
  109. /* Verification for user mode support. */
  110. #ifndef MCAL_ENABLE_USER_MODE_SUPPORT
  111. #if (defined (FTM_ICU_ENABLE_USER_MODE_SUPPORT) && (STD_ON == FTM_ICU_ENABLE_USER_MODE_SUPPORT))
  112. #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
  113. #endif
  114. #endif
  115. /**
  116. * @brief Adds or removes the support for TimeStamp Measurement with DMA.
  117. * STD_ON: DMA in TS measurement can be used.
  118. * STD_OFF: DMA in TS measurement can not be used.
  119. */
  120. #define FTM_ICU_TIMESTAMP_USES_DMA (STD_OFF)
  121. /** @brief Get FTM type for each platform. */
  122. #define Ftm_Icu_Ip_BaseType FTM_Type
  123. /* Define used for FTM instance with distinct lines for overflow IRQ and event IRQ. */#define FTM_ICU_TOF_DISTINCT_LINE (STD_ON)
  124. #ifdef __cplusplus
  125. }
  126. #endif
  127. #endif /* FTM_ICU_IP_DEFINES_H */
  128. /** @} */