Det.h 8.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167
  1. /*==================================================================================================
  2. * Project : RTD AUTOSAR 4.4
  3. * Platform : CORTEXM
  4. * Peripheral :
  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 DET_H
  25. #define DET_H
  26. /**
  27. * @file Det.h
  28. *
  29. * @addtogroup DET_MODULE
  30. * @{
  31. */
  32. #ifdef __cplusplus
  33. extern "C"{
  34. #endif
  35. /*
  36. * @page misra_violations MISRA-C:2012 violations
  37. *
  38. * @section Det_h_REF_1
  39. * Violates 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.
  40. * This violation is not fixed since the inclusion of <MA>_MemMap.h is as per AUTOSAR requirement [SWS_MemMap_00003].
  41. *
  42. * @section Det_h_REF_2
  43. * Violates MISRA 2012 Advisory Rule 20.1, #Include directives should only be preceded by preprocessor directives or comments.
  44. * <MA>_MemMap.h is included after each section define in order to set the current memory section as defined by AUTOSAR.
  45. */
  46. /*==================================================================================================
  47. * INCLUDE FILES
  48. * 1) system and project includes
  49. * 2) needed interfaces from external units
  50. * 3) internal and external interfaces from this unit
  51. ==================================================================================================*/
  52. #include "Std_Types.h"
  53. /*==================================================================================================
  54. * SOURCE FILE VERSION INFORMATION
  55. ==================================================================================================*/
  56. /**
  57. * @file Det.h
  58. * @requirements DET001_PI
  59. */
  60. #define DET_VENDOR_ID 43
  61. #define DET_MODULE_ID 15
  62. #define DET_AR_RELEASE_MAJOR_VERSION 4
  63. #define DET_AR_RELEASE_MINOR_VERSION 4
  64. #define DET_AR_RELEASE_REVISION_VERSION 0
  65. #define DET_SW_MAJOR_VERSION 1
  66. #define DET_SW_MINOR_VERSION 0
  67. #define DET_SW_PATCH_VERSION 0
  68. /*==================================================================================================
  69. * FILE VERSION CHECKS
  70. ==================================================================================================*/
  71. /*==================================================================================================
  72. * CONSTANTS
  73. ==================================================================================================*/
  74. /*==================================================================================================
  75. * DEFINES AND MACROS
  76. ==================================================================================================*/
  77. /* Max numbers of ECU cores supported */
  78. #define DET_NO_ECU_CORES (uint8)(10U)
  79. /*==================================================================================================
  80. * ENUMS
  81. ==================================================================================================*/
  82. /*==================================================================================================
  83. * STRUCTURES AND OTHER TYPEDEFS
  84. ==================================================================================================*/
  85. /*==================================================================================================
  86. * GLOBAL VARIABLE DECLARATIONS
  87. ==================================================================================================*/
  88. #define DET_START_SEC_VAR_CLEARED_8_NO_CACHEABLE
  89. /*
  90. * @violates @ref Det_h_REF_1 Precautions shall be taken in order to prevent the contents of a header file being included more than once
  91. * @violates @ref Det_h_REF_2 #Include directives should only be preceded by preprocessor directives or comments
  92. */
  93. #include "Det_MemMap.h"
  94. /* Variables to store last DET error */
  95. extern uint8 Det_InstanceId[DET_NO_ECU_CORES]; /**< @brief DET instance ID*/
  96. extern uint8 Det_ApiId[DET_NO_ECU_CORES]; /**< @brief DET API ID*/
  97. extern uint8 Det_ErrorId[DET_NO_ECU_CORES]; /**< @brief DET Error ID*/
  98. /* Variables to store last DET runtime error */
  99. extern uint8 Det_RuntimeInstanceId[DET_NO_ECU_CORES]; /**< @brief DET instance ID*/
  100. extern uint8 Det_RuntimeApiId[DET_NO_ECU_CORES]; /**< @brief DET API ID*/
  101. extern uint8 Det_RuntimeErrorId[DET_NO_ECU_CORES]; /**< @brief DET Error ID*/
  102. /* Variables to store last DET transient error */
  103. extern uint8 Det_TransientInstanceId[DET_NO_ECU_CORES]; /**< @brief DET instance ID*/
  104. extern uint8 Det_TransientApiId[DET_NO_ECU_CORES]; /**< @brief DET API ID*/
  105. extern uint8 Det_TransientFaultId[DET_NO_ECU_CORES]; /**< @brief DET Error ID*/
  106. #define DET_STOP_SEC_VAR_CLEARED_8_NO_CACHEABLE
  107. /*
  108. * @violates @ref Det_h_REF_1 Precautions shall be taken in order to prevent the contents of a header file being included more than once
  109. * @violates @ref Det_h_REF_2 #Include directives should only be preceded by preprocessor directives or comments
  110. */
  111. #include "Det_MemMap.h"
  112. #define DET_START_SEC_VAR_CLEARED_16_NO_CACHEABLE
  113. /*
  114. * @violates @ref Det_h_REF_1 Precautions shall be taken in order to prevent the contents of a header file being included more than once
  115. * @violates @ref Det_h_REF_2 #Include directives should only be preceded by preprocessor directives or comments
  116. */
  117. #include "Det_MemMap.h"
  118. extern uint16 Det_TransientModuleId[DET_NO_ECU_CORES]; /**< @brief DET module ID*/
  119. extern uint16 Det_ModuleId[DET_NO_ECU_CORES]; /**< @brief DET module ID*/
  120. extern uint16 Det_RuntimeModuleId[DET_NO_ECU_CORES]; /**< @brief DET module ID*/
  121. #define DET_STOP_SEC_VAR_CLEARED_16_NO_CACHEABLE
  122. /*
  123. * @violates @ref Det_h_REF_1 Precautions shall be taken in order to prevent the contents of a header file being included more than once
  124. * @violates @ref Det_h_REF_2 #Include directives should only be preceded by preprocessor directives or comments
  125. */
  126. #include "Det_MemMap.h"
  127. /*==================================================================================================
  128. * FUNCTION PROTOTYPES
  129. ==================================================================================================*/
  130. #define DET_START_SEC_CODE
  131. #include "Det_MemMap.h"
  132. void Det_Init(void);
  133. Std_ReturnType Det_ReportError(uint16 ModuleId, uint8 InstanceId, uint8 ApiId, uint8 ErrorId);
  134. #if defined(ASR_REL_4_0_REV_0003)
  135. #else
  136. Std_ReturnType Det_ReportRuntimeError(uint16 ModuleId, uint8 InstanceId, uint8 ApiId, uint8 ErrorId);
  137. Std_ReturnType Det_ReportTransientFault(uint16 ModuleId, uint8 InstanceId, uint8 ApiId, uint8 FaultId);
  138. #endif /*if defined(ASR_REL_4_0_REV_0003)*/
  139. void Det_Start(void);
  140. #define DET_STOP_SEC_CODE
  141. #include "Det_MemMap.h"
  142. #ifdef __cplusplus
  143. }
  144. #endif
  145. /** @} */
  146. #endif /* DET_H */