Ftm_Mcl_Ip.h 5.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127
  1. /*==================================================================================================
  2. * Project : RTD AUTOSAR 4.4
  3. * Platform : CORTEXM
  4. * Peripheral : DMA,CACHE,TRGMUX,FLEXIO
  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 Ftm_Mcl_Ip.h
  26. *
  27. * @version 1.0.0
  28. *
  29. * @brief AUTOSAR Mcl - Ftm Common driver header file.
  30. *
  31. * @addtogroup FTM_IP_DRIVER FTM IP Driver
  32. * @{
  33. */
  34. #ifndef FTM_MCL_IP_H
  35. #define FTM_MCL_IP_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 "StandardTypes.h"
  46. #include "Ftm_Mcl_Ip_Cfg.h"
  47. /*==================================================================================================
  48. * SOURCE FILE VERSION INFORMATION
  49. ==================================================================================================*/
  50. #define FTM_MCL_IP_VENDOR_ID_H 43
  51. #define FTM_MCL_IP_AR_RELEASE_MAJOR_VERSION_H 4
  52. #define FTM_MCL_IP_AR_RELEASE_MINOR_VERSION_H 4
  53. #define FTM_MCL_IP_AR_RELEASE_REVISION_VERSION_H 0
  54. #define FTM_MCL_IP_SW_MAJOR_VERSION_H 1
  55. #define FTM_MCL_IP_SW_MINOR_VERSION_H 0
  56. #define FTM_MCL_IP_SW_PATCH_VERSION_H 0
  57. /*==================================================================================================
  58. * FILE VERSION CHECKS
  59. ==================================================================================================*/
  60. #ifndef DISABLE_MCAL_INTERMODULE_ASR_CHECK
  61. /* Check if header file and StandardTypes.h are of the same AUTOSAR version */
  62. #if ((FTM_MCL_IP_AR_RELEASE_MAJOR_VERSION_H != STD_AR_RELEASE_MAJOR_VERSION) || \
  63. (FTM_MCL_IP_AR_RELEASE_MINOR_VERSION_H != STD_AR_RELEASE_MINOR_VERSION))
  64. #error "AUTOSAR Version Numbers of Ftm_Mcl_Ip.h and StandardTypes.h are different"
  65. #endif
  66. #endif
  67. /* Check if header file and Ftm_Mcl_Ip_Cfg header file are of the same vendor. */
  68. #if (FTM_MCL_IP_VENDOR_ID_H != FTM_MCL_IP_CFG_VENDOR_ID)
  69. #error "Vendor IDs of Ftm_Mcl_Ip.h and Ftm_Mcl_Ip_Cfg.h are different."
  70. #endif
  71. /* Check if header file and Ftm_Mcl_Ip_Cfg header file are of the same AUTOSAR version. */
  72. #if ((FTM_MCL_IP_AR_RELEASE_MAJOR_VERSION_H != FTM_MCL_IP_CFG_AR_RELEASE_MAJOR_VERSION) || \
  73. (FTM_MCL_IP_AR_RELEASE_MINOR_VERSION_H != FTM_MCL_IP_CFG_AR_RELEASE_MINOR_VERSION) || \
  74. (FTM_MCL_IP_AR_RELEASE_REVISION_VERSION_H != FTM_MCL_IP_CFG_AR_RELEASE_REVISION_VERSION))
  75. #error "AUTOSAR version numbers of Ftm_Mcl_Ip.h and Ftm_Mcl_Ip_Cfg.h are different."
  76. #endif
  77. /* Check if header file and Ftm_Mcl_Ip_Cfg header file are of the same software version */
  78. #if ((FTM_MCL_IP_SW_MAJOR_VERSION_H != FTM_MCL_IP_CFG_SW_MAJOR_VERSION) || \
  79. (FTM_MCL_IP_SW_MINOR_VERSION_H != FTM_MCL_IP_CFG_SW_MINOR_VERSION) || \
  80. (FTM_MCL_IP_SW_PATCH_VERSION_H != FTM_MCL_IP_CFG_SW_PATCH_VERSION))
  81. #error "Software version numbers of Ftm_Mcl_Ip.h and Ftm_Mcl_Ip_Cfg.h are different."
  82. #endif
  83. /*==================================================================================================
  84. * FUNCTION PROTOTYPES
  85. ==================================================================================================*/
  86. #if (FTM_MCL_SELECT_COMMON_TIMEBASE_API == STD_ON)
  87. #define MCL_START_SEC_CODE
  88. #include "Mcl_MemMap.h"
  89. /**
  90. * @brief Implementation specific function to updates the Global Timebase bits of configured modules.
  91. * @details This function is used to set the global timebase bits for modules that support
  92. * the global timebase feature. The function selects the module that gives the common timebase
  93. * and the modules that are use this timebase (as bits in syncList).
  94. * Then it synchronizes the modules.
  95. * example:
  96. * syncList is 0x0003 - modules 0 and 1 use the timebase given by instance
  97. * syncList is 0x0005 - modules 0 and 2 use the timebase given by instance
  98. *
  99. * @param[in] instance FTM module id
  100. * @param[in] syncList FTM module mask value
  101. * @return void
  102. */
  103. void Ftm_Mcl_Ip_SelectCommonTimebase(uint8 instance, uint32 syncList);
  104. #define MCL_STOP_SEC_CODE
  105. #include "Mcl_MemMap.h"
  106. #endif /* FTM_MCL_SELECT_COMMON_TIMEBASE_API */
  107. #ifdef __cplusplus
  108. }
  109. #endif
  110. /** @} */
  111. #endif /* FTM_MCL_IP_H */