Flexio_Mcl_Ip.h 10 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215
  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 Flexio_Mcl_Ip.h
  26. *
  27. * @version 1.0.0
  28. *
  29. * @brief AUTOSAR Mcl - Flexio Common driver header file.
  30. *
  31. * @addtogroup FLEXIO_IP_DRIVER FLEXIO IP Driver
  32. * @{
  33. */
  34. #ifndef FLEXIO_MCL_IP_H
  35. #define FLEXIO_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 "Mcal.h"
  46. #include "PlatformTypes.h"
  47. #include "Flexio_Mcl_Ip_HwAccess.h"
  48. #include "Flexio_Mcl_Ip_Cfg.h"
  49. #include "Flexio_Mcl_Ip_Types.h"
  50. #if (FLEXIO_MCL_IP_DEV_ERROR_DETECT == STD_ON)
  51. #include "Devassert.h"
  52. #endif
  53. /*==================================================================================================
  54. * SOURCE FILE VERSION INFORMATION
  55. ==================================================================================================*/
  56. #define FLEXIO_MCL_IP_VENDOR_ID_H 43
  57. #define FLEXIO_MCL_IP_AR_RELEASE_MAJOR_VERSION_H 4
  58. #define FLEXIO_MCL_IP_AR_RELEASE_MINOR_VERSION_H 4
  59. #define FLEXIO_MCL_IP_AR_RELEASE_REVISION_VERSION_H 0
  60. #define FLEXIO_MCL_IP_SW_MAJOR_VERSION_H 1
  61. #define FLEXIO_MCL_IP_SW_MINOR_VERSION_H 0
  62. #define FLEXIO_MCL_IP_SW_PATCH_VERSION_H 0
  63. /*==================================================================================================
  64. * FILE VERSION CHECKS
  65. ==================================================================================================*/
  66. #ifndef DISABLE_MCAL_INTERMODULE_ASR_CHECK
  67. /* Check if header file and Mcal header file are of the same Autosar version */
  68. #if ((FLEXIO_MCL_IP_AR_RELEASE_MAJOR_VERSION_H != MCAL_AR_RELEASE_MAJOR_VERSION) || \
  69. (FLEXIO_MCL_IP_AR_RELEASE_MINOR_VERSION_H != MCAL_AR_RELEASE_MINOR_VERSION))
  70. #error "AutoSar Version Numbers of Flexio_Mcl_Ip.h and Mcal.h are different"
  71. #endif
  72. /* Check if header file and PlatformTypes header file are of the same Autosar version */
  73. #if ((FLEXIO_MCL_IP_AR_RELEASE_MAJOR_VERSION_H != PLATFORM_TYPES_AR_RELEASE_MAJOR_VERSION) || \
  74. (FLEXIO_MCL_IP_AR_RELEASE_MINOR_VERSION_H != PLATFORM_TYPES_AR_RELEASE_MINOR_VERSION))
  75. #error "AutoSar Version Numbers of Flexio_Mcl_Ip.h and PlatformTypes.h are different"
  76. #endif
  77. #if (FLEXIO_MCL_IP_DEV_ERROR_DETECT == STD_ON)
  78. /* Check if header file and Devassert header file are of the same Autosar version */
  79. #if ((FLEXIO_MCL_IP_AR_RELEASE_MAJOR_VERSION_H != DEVASSERT_AR_RELEASE_MAJOR_VERSION) || \
  80. (FLEXIO_MCL_IP_AR_RELEASE_MINOR_VERSION_H != DEVASSERT_AR_RELEASE_MINOR_VERSION))
  81. #error "AutoSar Version Numbers of Flexio_Mcl_Ip.h and Devassert.h are different"
  82. #endif
  83. #endif /* (FLEXIO_MCL_IP_DEV_ERROR_DETECT == STD_ON) */
  84. #endif /* DISABLE_MCAL_INTERMODULE_ASR_CHECK */
  85. /* Check if header file and Flexio_Mcl_Ip_HwAccess.h file are of the same vendor */
  86. #if (FLEXIO_MCL_IP_VENDOR_ID_H != FLEXIO_IP_HW_ACCESS_VENDOR_ID_H)
  87. #error "Flexio_Mcl_Ip.h and Flexio_Mcl_Ip_HwAccess.h have different vendor ids"
  88. #endif
  89. /* Check if header file and Flexio_Mcl_Ip_HwAccess.h file are of the same Autosar version */
  90. #if ((FLEXIO_MCL_IP_AR_RELEASE_MAJOR_VERSION_H != FLEXIO_IP_HW_ACCESS_AR_RELEASE_MAJOR_VERSION_H) || \
  91. (FLEXIO_MCL_IP_AR_RELEASE_MINOR_VERSION_H != FLEXIO_IP_HW_ACCESS_AR_RELEASE_MINOR_VERSION_H) || \
  92. (FLEXIO_MCL_IP_AR_RELEASE_REVISION_VERSION_H != FLEXIO_IP_HW_ACCESS_AR_RELEASE_REVISION_VERSION_H) \
  93. )
  94. #error "AutoSar Version Numbers of Flexio_Mcl_Ip.h and Flexio_Mcl_Ip_HwAccess.h are different"
  95. #endif
  96. /* Check if header file and Flexio_Mcl_Ip_HwAccess.h file are of the same Software version */
  97. #if ((FLEXIO_MCL_IP_SW_MAJOR_VERSION_H != FLEXIO_IP_HW_ACCESS_SW_MAJOR_VERSION_H) || \
  98. (FLEXIO_MCL_IP_SW_MINOR_VERSION_H != FLEXIO_IP_HW_ACCESS_SW_MINOR_VERSION_H) || \
  99. (FLEXIO_MCL_IP_SW_PATCH_VERSION_H != FLEXIO_IP_HW_ACCESS_SW_PATCH_VERSION_H) \
  100. )
  101. #error "Software Version Numbers of Flexio_Mcl_Ip.h and Flexio_Mcl_Ip_HwAccess.h are different"
  102. #endif
  103. /* Check if header file and Flexio_Mcl_Ip_Cfg.h file are of the same vendor */
  104. #if (FLEXIO_MCL_IP_VENDOR_ID_H != FLEXIO_MCL_IP_CFG_VENDOR_ID_H)
  105. #error "Flexio_Mcl_Ip.h and Flexio_Mcl_Ip_Cfg.h have different vendor ids"
  106. #endif
  107. /* Check if header file and Flexio_Mcl_Ip_Cfg.h file are of the same Autosar version */
  108. #if ((FLEXIO_MCL_IP_AR_RELEASE_MAJOR_VERSION_H != FLEXIO_MCL_IP_CFG_AR_RELEASE_MAJOR_VERSION_H) || \
  109. (FLEXIO_MCL_IP_AR_RELEASE_MINOR_VERSION_H != FLEXIO_MCL_IP_CFG_AR_RELEASE_MINOR_VERSION_H) || \
  110. (FLEXIO_MCL_IP_AR_RELEASE_REVISION_VERSION_H != FLEXIO_MCL_IP_CFG_AR_RELEASE_REVISION_VERSION_H) \
  111. )
  112. #error "AutoSar Version Numbers of Flexio_Mcl_Ip.h and Flexio_Mcl_Ip_Cfg.h are different"
  113. #endif
  114. /* Check if header file and Flexio_Mcl_Ip_Cfg.h file are of the same Software version */
  115. #if ((FLEXIO_MCL_IP_SW_MAJOR_VERSION_H != FLEXIO_MCL_IP_CFG_SW_MAJOR_VERSION_H) || \
  116. (FLEXIO_MCL_IP_SW_MINOR_VERSION_H != FLEXIO_MCL_IP_CFG_SW_MINOR_VERSION_H) || \
  117. (FLEXIO_MCL_IP_SW_PATCH_VERSION_H != FLEXIO_MCL_IP_CFG_SW_PATCH_VERSION_H) \
  118. )
  119. #error "Software Version Numbers of Flexio_Mcl_Ip.h and Flexio_Mcl_Ip_Cfg.h are different"
  120. #endif
  121. /* Check if header file and Flexio_Mcl_Ip_Types.h file are of the same vendor */
  122. #if (FLEXIO_MCL_IP_VENDOR_ID_H != FLEXIO_MCL_IP_TYPES_VENDOR_ID_H)
  123. #error "Flexio_Mcl_Ip.h and Flexio_Mcl_Ip_Types.h have different vendor ids"
  124. #endif
  125. /* Check if header file and Flexio_Mcl_Ip_Types.h file are of the same Autosar version */
  126. #if ((FLEXIO_MCL_IP_AR_RELEASE_MAJOR_VERSION_H != FLEXIO_MCL_IP_TYPES_AR_RELEASE_MAJOR_VERSION_H) || \
  127. (FLEXIO_MCL_IP_AR_RELEASE_MINOR_VERSION_H != FLEXIO_MCL_IP_TYPES_AR_RELEASE_MINOR_VERSION_H) || \
  128. (FLEXIO_MCL_IP_AR_RELEASE_REVISION_VERSION_H != FLEXIO_MCL_IP_TYPES_AR_RELEASE_REVISION_VERSION_H) \
  129. )
  130. #error "AutoSar Version Numbers of Flexio_Mcl_Ip.h and Flexio_Mcl_Ip_Types.h are different"
  131. #endif
  132. /* Check if header file and Flexio_Mcl_Ip_Types.h file are of the same Software version */
  133. #if ((FLEXIO_MCL_IP_SW_MAJOR_VERSION_H != FLEXIO_MCL_IP_TYPES_SW_MAJOR_VERSION_H) || \
  134. (FLEXIO_MCL_IP_SW_MINOR_VERSION_H != FLEXIO_MCL_IP_TYPES_SW_MINOR_VERSION_H) || \
  135. (FLEXIO_MCL_IP_SW_PATCH_VERSION_H != FLEXIO_MCL_IP_TYPES_SW_PATCH_VERSION_H) \
  136. )
  137. #error "Software Version Numbers of Flexio_Mcl_Ip.h and Flexio_Mcl_Ip_Types.h are different"
  138. #endif
  139. /*==================================================================================================
  140. * CONSTANTS
  141. ==================================================================================================*/
  142. /*==================================================================================================
  143. * DEFINES AND MACROS
  144. ==================================================================================================*/
  145. /*==================================================================================================
  146. * ENUMS
  147. ==================================================================================================*/
  148. /*==================================================================================================
  149. * STRUCTURES AND OTHER TYPEDEFS
  150. ==================================================================================================*/
  151. /*==================================================================================================
  152. * GLOBAL VARIABLE DECLARATIONS
  153. ==================================================================================================*/
  154. #define MCL_START_SEC_CONST_UNSPECIFIED
  155. #include "Mcl_MemMap.h"
  156. /* Table of base addresses for FLEXIO instances. */
  157. extern FLEXIO_Type * const flexioBase[FLEXIO_INSTANCE_COUNT];
  158. #define MCL_STOP_SEC_CONST_UNSPECIFIED
  159. #include "Mcl_MemMap.h"
  160. #define MCL_START_SEC_VAR_CLEARED_BOOLEAN
  161. #include "Mcl_MemMap.h"
  162. /* Table of base addresses for FLEXIO instances. */
  163. extern boolean Flexio_Ip_IpIsInitialized[FLEXIO_INSTANCE_COUNT];
  164. #define MCL_STOP_SEC_VAR_CLEARED_BOOLEAN
  165. #include "Mcl_MemMap.h"
  166. /*==================================================================================================
  167. * FUNCTION PROTOTYPES
  168. ==================================================================================================*/
  169. #define MCL_START_SEC_CODE
  170. #include "Mcl_MemMap.h"
  171. /* Implementation of Flexio handler named in startup code. */
  172. ISR(MCL_FLEXIO_ISR);
  173. void Flexio_Mcl_Ip_DeinitDevice(uint32 instance);
  174. Flexio_Ip_CommonStatusType Flexio_Mcl_Ip_InitDevice(const Flexio_Ip_InstanceConfigType * const pFlexioInitType);
  175. #define MCL_STOP_SEC_CODE
  176. #include "Mcl_MemMap.h"
  177. #ifdef __cplusplus
  178. }
  179. #endif
  180. /** @} */
  181. #endif /* FLEXIO_MCL_IP_H */