Ram_Ip.h 8.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212
  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. /**
  25. * @file Ram_Ip.h
  26. * @version 1.0.0
  27. *
  28. * @brief RAM IP driver header file.
  29. * @details RAM IP driver header file.
  30. *
  31. * @addtogroup RAM_DRIVER Ram Ip Driver
  32. * @{
  33. */
  34. #ifndef RAM_IP_H
  35. #define RAM_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 "Ram_Ip_Types.h"
  47. #include "Ram_Ip_Cfg.h"
  48. #ifdef RAM_IP_DEV_ERROR_DETECT
  49. #if (STD_ON == RAM_IP_DEV_ERROR_DETECT)
  50. #include "Devassert.h"
  51. #endif /* (STD_ON == RAM_IP_DEV_ERROR_DETECT) */
  52. #endif /* #ifdef RAM_IP_DEV_ERROR_DETECT */
  53. /*==================================================================================================
  54. SOURCE FILE VERSION INFORMATION
  55. ==================================================================================================*/
  56. #define RAM_IP_VENDOR_ID 43
  57. #define RAM_IP_AR_RELEASE_MAJOR_VERSION 4
  58. #define RAM_IP_AR_RELEASE_MINOR_VERSION 4
  59. #define RAM_IP_AR_RELEASE_REVISION_VERSION 0
  60. #define RAM_IP_SW_MAJOR_VERSION 1
  61. #define RAM_IP_SW_MINOR_VERSION 0
  62. #define RAM_IP_SW_PATCH_VERSION 0
  63. /*==================================================================================================
  64. * FILE VERSION CHECKS
  65. ==================================================================================================*/
  66. #ifndef DISABLE_MCAL_INTERMODULE_ASR_CHECK
  67. /* Check if Ram_Ip.h file and StandardTypes.h file are of the same Autosar version */
  68. #if ((RAM_IP_AR_RELEASE_MAJOR_VERSION != STD_AR_RELEASE_MAJOR_VERSION) || \
  69. (RAM_IP_AR_RELEASE_MINOR_VERSION != STD_AR_RELEASE_MINOR_VERSION))
  70. #error "AutoSar Version Numbers of Ram_Ip.h and StandardTypes.h are different"
  71. #endif
  72. #endif
  73. /* Check if Ram_Ip.h file and Ram_Ip_Types.h file are of the same vendor */
  74. #if (RAM_IP_VENDOR_ID != RAM_IP_TYPES_VENDOR_ID)
  75. #error "Ram_Ip.h and Ram_Ip_Types.h have different vendor ids"
  76. #endif
  77. /* Check if Ram_Ip.h file and Ram_Ip_Types.h file are of the same Autosar version */
  78. #if ((RAM_IP_AR_RELEASE_MAJOR_VERSION != RAM_IP_TYPES_AR_RELEASE_MAJOR_VERSION) || \
  79. (RAM_IP_AR_RELEASE_MINOR_VERSION != RAM_IP_TYPES_AR_RELEASE_MINOR_VERSION) || \
  80. (RAM_IP_AR_RELEASE_REVISION_VERSION != RAM_IP_TYPES_AR_RELEASE_REVISION_VERSION) \
  81. )
  82. #error "AutoSar Version Numbers of Ram_Ip.h and Ram_Ip_Types.h are different"
  83. #endif
  84. /* Check if Ram_Ip.h file and Ram_Ip_Types.h file are of the same Software version */
  85. #if ((RAM_IP_SW_MAJOR_VERSION != RAM_IP_TYPES_SW_MAJOR_VERSION) || \
  86. (RAM_IP_SW_MINOR_VERSION != RAM_IP_TYPES_SW_MINOR_VERSION) || \
  87. (RAM_IP_SW_PATCH_VERSION != RAM_IP_TYPES_SW_PATCH_VERSION) \
  88. )
  89. #error "Software Version Numbers of Ram_Ip.h and Ram_Ip_Types.h are different"
  90. #endif
  91. /* Check if Ram_Ip.h file and Ram_Ip_Cfg.h file are of the same vendor */
  92. #if (RAM_IP_VENDOR_ID != RAM_IP_CFG_VENDOR_ID)
  93. #error "Ram_Ip.h and Ram_Ip_Cfg.h have different vendor ids"
  94. #endif
  95. /* Check if Ram_Ip.h file and Ram_Ip_Cfg.h file are of the same Autosar version */
  96. #if ((RAM_IP_AR_RELEASE_MAJOR_VERSION != RAM_IP_CFG_AR_RELEASE_MAJOR_VERSION) || \
  97. (RAM_IP_AR_RELEASE_MINOR_VERSION != RAM_IP_CFG_AR_RELEASE_MINOR_VERSION) || \
  98. (RAM_IP_AR_RELEASE_REVISION_VERSION != RAM_IP_CFG_AR_RELEASE_REVISION_VERSION) \
  99. )
  100. #error "AutoSar Version Numbers of Ram_Ip.h and Ram_Ip_Cfg.h are different"
  101. #endif
  102. /* Check if Ram_Ip.h file and Ram_Ip_Cfg.h file are of the same Software version */
  103. #if ((RAM_IP_SW_MAJOR_VERSION != RAM_IP_CFG_SW_MAJOR_VERSION) || \
  104. (RAM_IP_SW_MINOR_VERSION != RAM_IP_CFG_SW_MINOR_VERSION) || \
  105. (RAM_IP_SW_PATCH_VERSION != RAM_IP_CFG_SW_PATCH_VERSION) \
  106. )
  107. #error "Software Version Numbers of Ram_Ip.h and Ram_Ip_Cfg.h are different"
  108. #endif
  109. #ifndef DISABLE_MCAL_INTERMODULE_ASR_CHECK
  110. #ifdef RAM_IP_DEV_ERROR_DETECT
  111. #if (STD_ON == RAM_IP_DEV_ERROR_DETECT)
  112. /* Check if Ram_Ip.h file and Devassert.h file are of the same Autosar version */
  113. #if ((RAM_IP_AR_RELEASE_MAJOR_VERSION != DEVASSERT_AR_RELEASE_MAJOR_VERSION) || \
  114. (RAM_IP_AR_RELEASE_MINOR_VERSION != DEVASSERT_AR_RELEASE_MINOR_VERSION))
  115. #error "AutoSar Version Numbers of Ram_Ip.h and Devassert.h are different"
  116. #endif
  117. #endif /* (STD_ON == RAM_IP_DEV_ERROR_DETECT) */
  118. #endif /* (RAM_IP_DEV_ERROR_DETECT) */
  119. #endif
  120. /*==================================================================================================
  121. * CONSTANTS
  122. ==================================================================================================*/
  123. /*==================================================================================================
  124. DEFINES AND MACROS
  125. ==================================================================================================*/
  126. #ifdef RAM_IP_DEV_ERROR_DETECT
  127. #if (STD_ON == RAM_IP_DEV_ERROR_DETECT)
  128. #define RAM_DEV_ASSERT(x) DevAssert(x)
  129. #else
  130. #define RAM_DEV_ASSERT(x)
  131. #endif
  132. #else
  133. #define RAM_DEV_ASSERT(x)
  134. #endif
  135. /*==================================================================================================
  136. * ENUMS
  137. ==================================================================================================*/
  138. /*==================================================================================================
  139. * STRUCTURES AND OTHER TYPEDEFS
  140. ==================================================================================================*/
  141. /*==================================================================================================
  142. GLOBAL VARIABLE DECLARATIONS
  143. ==================================================================================================*/
  144. /*==================================================================================================
  145. FUNCTION PROTOTYPES
  146. ==================================================================================================*/
  147. #define MCU_START_SEC_CODE
  148. #include "Mcu_MemMap.h"
  149. /*!
  150. * @brief Initializes RAM section
  151. *
  152. * This function initializes RAM section.
  153. *
  154. * @param[in] Ram_Ip_pRamConfigPtr Ram section configuration.
  155. *
  156. * @return Ram_Ip_StatusType Ram status
  157. */
  158. Ram_Ip_StatusType Ram_Ip_InitRamSection(const Ram_Ip_RamConfigType * Ram_Ip_pRamConfigPtr);
  159. #if (RAM_IP_GET_RAM_STATE_API == STD_ON)
  160. /*!
  161. * @brief Returns RAM state
  162. *
  163. * This function returns RAM section.
  164. *
  165. * @return Ram_Ip_RamStateType Ram state
  166. */
  167. Ram_Ip_RamStateType Ram_Ip_GetRamState(void);
  168. #endif
  169. #if (RAM_IP_GET_RAM_STATE_API == STD_ON)
  170. /*!
  171. * @brief Install report error callback.
  172. * This function installs a callback for reporting errors from Ram driver.
  173. *
  174. * @param[in] reportErrorsCallback Callback to be installed.
  175. *
  176. * @return void
  177. */
  178. void Ram_Ip_InstallNotificationsCallback(Ram_Ip_ReportErrorsCallbackType reportErrorsCallback);
  179. #endif
  180. #define MCU_STOP_SEC_CODE
  181. #include "Mcu_MemMap.h"
  182. #ifdef __cplusplus
  183. }
  184. #endif
  185. #endif /* RAM_IP_H */
  186. /** @} */