Trgmux_Ip.h 6.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150
  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. /* Prevention from multiple including the same header */
  25. #ifndef TRGMUX_IP_H_
  26. #define TRGMUX_IP_H_
  27. /**
  28. * @file Trgmux_Ip.h
  29. *
  30. * @version 1.0.0
  31. *
  32. * @brief AUTOSAR Mcl - Trgmux Ip driver header file.
  33. * @details
  34. *
  35. * @addtogroup TRGMUX_IP_DRIVER TRGMUX IP Driver
  36. * @{
  37. */
  38. /*==================================================================================================
  39. * INCLUDE FILES
  40. * 1) system and project includes
  41. * 2) needed interfaces from external units
  42. * 3) internal and external interfaces from this unit
  43. ==================================================================================================*/
  44. #include "Trgmux_Ip_Cfg.h"
  45. #if (TRGMUX_IP_IS_AVAILABLE == STD_ON)
  46. /*==================================================================================================
  47. * SOURCE FILE VERSION INFORMATION
  48. ==================================================================================================*/
  49. #define TRGMUX_IP_VENDOR_ID_H 43
  50. #define TRGMUX_IP_MODULE_ID_H 255
  51. #define TRGMUX_IP_AR_RELEASE_MAJOR_VERSION_H 4
  52. #define TRGMUX_IP_AR_RELEASE_MINOR_VERSION_H 4
  53. #define TRGMUX_IP_AR_RELEASE_REVISION_VERSION_H 0
  54. #define TRGMUX_IP_SW_MAJOR_VERSION_H 1
  55. #define TRGMUX_IP_SW_MINOR_VERSION_H 0
  56. #define TRGMUX_IP_SW_PATCH_VERSION_H 0
  57. /**
  58. * @page misra_violations MISRA-C:2012 violations
  59. */
  60. /*==================================================================================================
  61. FILE VERSION CHECKS
  62. ==================================================================================================*/
  63. /* Check if header file and Trgmux_Ip_Cfg.h file are of the same vendor */
  64. #if (TRGMUX_IP_VENDOR_ID_H != TRGMUX_IP_CFG_VENDOR_ID_H)
  65. #error "Trgmux_Ip.h and Trgmux_Ip_Cfg.h have different vendor ids"
  66. #endif
  67. /* Check if header file and Trgmux_Ip_Cfg.h file are of the same Autosar version */
  68. #if ((TRGMUX_IP_AR_RELEASE_MAJOR_VERSION_H != TRGMUX_IP_CFG_AR_RELEASE_MAJOR_VERSION_H) || \
  69. (TRGMUX_IP_AR_RELEASE_MINOR_VERSION_H != TRGMUX_IP_CFG_AR_RELEASE_MINOR_VERSION_H) || \
  70. (TRGMUX_IP_AR_RELEASE_REVISION_VERSION_H != TRGMUX_IP_CFG_AR_RELEASE_REVISION_VERSION_H) \
  71. )
  72. #error "AutoSar Version Numbers of Trgmux_Ip.h and Trgmux_Ip_Cfg.h are different"
  73. #endif
  74. /* Check if header file and Trgmux_Ip_Cfg.h file are of the same Software version */
  75. #if ((TRGMUX_IP_SW_MAJOR_VERSION_H != TRGMUX_IP_CFG_SW_MAJOR_VERSION_H) || \
  76. (TRGMUX_IP_SW_MINOR_VERSION_H != TRGMUX_IP_CFG_SW_MINOR_VERSION_H) || \
  77. (TRGMUX_IP_SW_PATCH_VERSION_H != TRGMUX_IP_CFG_SW_PATCH_VERSION_H) \
  78. )
  79. #error "Software Version Numbers of Trgmux_Ip.h and Trgmux_Ip_Cfg.h are different"
  80. #endif
  81. /*==================================================================================================
  82. * GLOBAL FUNCTION
  83. ==================================================================================================*/
  84. #define MCL_START_SEC_CODE
  85. /* @violates @ref Mcl_Dma_h_REF_1 MISRA 2012 Required Directive 4.10, Precautions shall be taken in order to prevent the contents of a header file being included more than once. */
  86. #include "Mcl_MemMap.h"
  87. /**
  88. * @brief This function initializes the Trgmux Ip Driver.
  89. * @details This service is a non reentrant function that shall initialize the Trgmux Ip driver.
  90. *
  91. * @param[in] pxTrgmuxInit Pointer to the initialization structure.
  92. *
  93. * @return TRGMUX_IP_STATUS_LOCKED The trigger is locked.
  94. * TRGMUX_IP_STATUS_SUCCESS The initialization was successful.
  95. *
  96. * @implements Trgmux_Ip_Init_Activity
  97. * */
  98. Trgmux_Ip_StatusType Trgmux_Ip_Init(const Trgmux_Ip_InitType * const pxTrgmuxInit);
  99. /**
  100. * @brief This function sets the Trgmux Ip Input.
  101. * @details This service is a reentrant function that shall set the Trgmux Ip Input.
  102. *
  103. * @param[in] LogicTrigger The logic trigger id.
  104. * @param[in] Input The input value.
  105. *
  106. * @return TRGMUX_IP_STATUS_LOCKED The trigger is locked.
  107. * TRGMUX_IP_STATUS_SUCCESS The initialization was successful.
  108. *
  109. * @implements Trgmux_Ip_SetInput_Activity
  110. * */
  111. Trgmux_Ip_StatusType Trgmux_Ip_SetInput(const uint32 LogicTrigger, const uint32 Input);
  112. /**
  113. * @brief This function locks the Trgmux Ip Trigger.
  114. * @details This service is a reentrant function that shall lock the Trgmux Ip Trigger.
  115. *
  116. * @param[in] LogicTrigger The logic trigger id.
  117. *
  118. * @return TRGMUX_IP_STATUS_LOCKED The trigger is locked.
  119. * TRGMUX_IP_STATUS_SUCCESS The initialization was successful.
  120. *
  121. * @implements Trgmux_Ip_SetLock_Activity
  122. * */
  123. Trgmux_Ip_StatusType Trgmux_Ip_SetLock(const uint32 LogicTrigger);
  124. #define MCL_STOP_SEC_CODE
  125. /* @violates @ref Mcl_Dma_h_REF_1 MISRA 2012 Required Directive 4.10, Precautions shall be taken in order to prevent the contents of a header file being included more than once. */
  126. #include "Mcl_MemMap.h"
  127. #endif /* TRGMUX_IP_IS_AVAILABLE */
  128. /** @} */
  129. #endif /* #ifndef TRGMUX_IP_H_ */
  130. /*==================================================================================================
  131. * END OF FILE
  132. ==================================================================================================*/