Can_Irq.h 6.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158
  1. /*==================================================================================================
  2. * Project : RTD AUTOSAR 4.4
  3. * Platform : CORTEXM
  4. * Peripheral : FLEXCAN
  5. * Dependencies :
  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. ==================================================================================================*/
  26. #ifndef CAN_IRQ_H
  27. #define CAN_IRQ_H
  28. /**
  29. * @file Can_Irq.h
  30. * @version 1.0.0
  31. *
  32. * @brief AUTOSAR Can - module interface.
  33. * @details API header for CAN driver.
  34. *
  35. * @addtogroup CAN_DRIVER
  36. * @{
  37. */
  38. #ifdef __cplusplus
  39. extern "C"{
  40. #endif
  41. /*
  42. * @page misra_violations MISRA-C:2012 violations
  43. *
  44. * @section [global]
  45. * Violates MISRA 2012 Required Rule 5.1, External identifiers shall be distinct.
  46. * The used compilers use more than 31 chars for identifiers.
  47. *
  48. * @section [global]
  49. * Violates MISRA 2012 Required Rule 5.2, Identifiers declared in the same scope and name space shall be distinct.
  50. * The used compilers use more than 31 chars for identifiers.
  51. *
  52. * @section [global]
  53. * Violates MISRA 2012 Required Rule 5.4, Macro identifiers shall be distinct.
  54. * The used compilers use more than 31 chars for identifiers.
  55. *
  56. * @section [global]
  57. * Violates MISRA 2012 Required Rule 5.5, Identifiers shall be distinct from macro names.
  58. * The used compilers use more than 31 chars for identifiers.
  59. *
  60. * @section Can_Irq_h_REF_1
  61. * Violates MISRA 2012 Required Directive 4.10, Precautions shall be taken in order to prevent the contents
  62. * of a header file being included more than once.
  63. * This violation is not fixed since the inclusion of <MA>_MemMap.h is as per AUTOSAR requirement [SWS_MemMap_00003].
  64. **
  65. * @section Can_Irq_h_REF_2
  66. * Violates MISRA 2012 Advisory Rule 20.1, #include directives should only be preceded by preprocessor
  67. * directives or comments.
  68. */
  69. /*==================================================================================================
  70. * INCLUDE FILES
  71. * 1) system and project includes
  72. * 2) needed interfaces from external units
  73. * 3) internal and external interfaces from this unit
  74. ==================================================================================================*/
  75. #include "Can_Ipw_Cfg.h"
  76. /*==================================================================================================
  77. * SOURCE FILE VERSION INFORMATION
  78. ==================================================================================================*/
  79. #define CAN_IRQ_VENDOR_ID 43
  80. #define CAN_IRQ_AR_RELEASE_MAJOR_VERSION 4
  81. #define CAN_IRQ_AR_RELEASE_MINOR_VERSION 4
  82. #define CAN_IRQ_AR_RELEASE_REVISION_VERSION 0
  83. #define CAN_IRQ_SW_MAJOR_VERSION 1
  84. #define CAN_IRQ_SW_MINOR_VERSION 0
  85. #define CAN_IRQ_SW_PATCH_VERSION 0
  86. /*==================================================================================================
  87. * FILE VERSION CHECKS
  88. ==================================================================================================*/
  89. /* Check if current file and Can_Ipw_Cfg.h header file are of the same vendor */
  90. #if (CAN_IRQ_VENDOR_ID != CAN_IPW_CFG_VENDOR_ID)
  91. #error "Can_Irq.h and Can_Ipw_Cfg.h have different vendor ids"
  92. #endif
  93. /* Check if current file and Can_Ipw_Cfg.h file are of the same Autosar version */
  94. #if ((CAN_IRQ_AR_RELEASE_MAJOR_VERSION != CAN_IPW_CFG_AR_RELEASE_MAJOR_VERSION) || \
  95. (CAN_IRQ_AR_RELEASE_MINOR_VERSION != CAN_IPW_CFG_AR_RELEASE_MINOR_VERSION) || \
  96. (CAN_IRQ_AR_RELEASE_REVISION_VERSION != CAN_IPW_CFG_AR_RELEASE_REVISION_VERSION))
  97. #error "AutoSar Version Numbers of Can_Irq.h and Can_Ipw_Cfg.h are different"
  98. #endif
  99. /* Check if current file and Can_Ipw_Cfg header file are of the same Software version */
  100. #if ((CAN_IRQ_SW_MAJOR_VERSION != CAN_IPW_CFG_SW_MAJOR_VERSION) || \
  101. (CAN_IRQ_SW_MINOR_VERSION != CAN_IPW_CFG_SW_MINOR_VERSION) || \
  102. (CAN_IRQ_SW_PATCH_VERSION != CAN_IPW_CFG_SW_PATCH_VERSION))
  103. #error "Software Version Numbers of Can_Irq.h and Can_Ipw_Cfg.h are different"
  104. #endif
  105. /*==================================================================================================
  106. * FUNCTION PROTOTYPES
  107. ==================================================================================================*/
  108. #define CAN_START_SEC_CODE
  109. /* @violates @ref Can_Irq_h_REF_1 MISRA 2012 Required Directive 4.10 */
  110. #include "Can_MemMap.h"
  111. #if (CAN_MB_INTERRUPT_SUPPORT == STD_ON)
  112. /* Function process Message Buffer Interrupt */
  113. void Can_ProcessMesgBufferCommonInterrupt
  114. (
  115. uint8 u8CtrlOffset,
  116. uint8 u8MbIdx,
  117. Can_MbType mbType
  118. );
  119. #endif /* (CAN_MB_INTERRUPT_SUPPORT == STD_ON) */
  120. /* Function process Bus Off Interrupt */
  121. void Can_ProcessBusOffInterrupt
  122. (
  123. uint8 u8CtrlOffset
  124. );
  125. #if (CAN_ERROR_INTERRUPT_SUPPORT == STD_ON)
  126. /* Function process Error Interrupt */
  127. void Can_ProcessErrorInterrupt
  128. (
  129. uint8 u8CtrlOffset,
  130. boolean bIsErrFast
  131. );
  132. #endif /* (CAN_ERROR_INTERRUPT_SUPPORT == STD_ON) */
  133. #if (CAN_PUBLIC_ICOM_SUPPORT == STD_ON)
  134. void Can_ProcessPNInterrupt(uint8 u8CtrlOffset);
  135. #endif /* (CAN_PUBLIC_ICOM_SUPPORT == STD_OFF) */
  136. #define CAN_STOP_SEC_CODE
  137. /* @violates @ref Can_Irq_h_REF_1 MISRA 2012 Required Directive 4.10 */
  138. /* @violates @ref Can_Irq_h_REF_2 MISRA 2012 Advisory Rule 20.1 */
  139. #include "Can_MemMap.h"
  140. #ifdef __cplusplus
  141. }
  142. #endif
  143. /** @} */
  144. #endif /* CAN_IRQ_H */