Eep_Cfg.h 10 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257
  1. /*==================================================================================================
  2. * Project : RTD AUTOSAR 4.4
  3. * Platform : CORTEXM
  4. * Peripheral : IPV_FTFC
  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. #ifndef EEP_CFG_H
  25. #define EEP_CFG_H
  26. /**
  27. * @file Eep_Cfg.h
  28. *
  29. * @addtogroup EEP
  30. * @{
  31. */
  32. #ifdef __cplusplus
  33. extern "C"{
  34. #endif
  35. /*==================================================================================================
  36. * INCLUDE FILES
  37. * 1) system and project includes
  38. * 2) needed interfaces from external units
  39. * 3) internal and external interfaces from this unit
  40. ==================================================================================================*/
  41. #include "Eep_Types.h"
  42. #include "StandardTypes.h"
  43. #include "Ftfc_Eep_Ip_Cfg.h"
  44. #include "Mcal.h"
  45. #include "Eep_VS_0_PBcfg.h"
  46. /*==================================================================================================
  47. * SOURCE FILE VERSION INFORMATION
  48. ==================================================================================================*/
  49. #define EEP_VENDOR_ID_CFG 43
  50. #define EEP_AR_RELEASE_MAJOR_VERSION_CFG 4
  51. #define EEP_AR_RELEASE_MINOR_VERSION_CFG 4
  52. #define EEP_AR_RELEASE_REVISION_VERSION_CFG 0
  53. #define EEP_SW_MAJOR_VERSION_CFG 1
  54. #define EEP_SW_MINOR_VERSION_CFG 0
  55. #define EEP_SW_PATCH_VERSION_CFG 0
  56. /*==================================================================================================
  57. * FILE VERSION CHECKS
  58. ==================================================================================================*/
  59. /* Check if current file and Eep configuration header file are of the same vendor */
  60. #if (EEP_TYPES_VENDOR_ID != EEP_VENDOR_ID_CFG)
  61. #error "Eep_Types.h and Eep_Cfg.h have different vendor ids"
  62. #endif
  63. /* Check if current file and Eep configuration header file are of the same Autosar version */
  64. #if ((EEP_TYPES_AR_RELEASE_MAJOR_VERSION != EEP_AR_RELEASE_MAJOR_VERSION_CFG) || \
  65. (EEP_TYPES_AR_RELEASE_MINOR_VERSION != EEP_AR_RELEASE_MINOR_VERSION_CFG) || \
  66. (EEP_TYPES_AR_RELEASE_REVISION_VERSION != EEP_AR_RELEASE_REVISION_VERSION_CFG) \
  67. )
  68. #error "AutoSar Version Numbers of Eep_Types.h and Eep_Cfg.h are different"
  69. #endif
  70. /* Check if current file and Eep configuration header file are of the same software version */
  71. #if ((EEP_TYPES_SW_MAJOR_VERSION != EEP_SW_MAJOR_VERSION_CFG) || \
  72. (EEP_TYPES_SW_MINOR_VERSION != EEP_SW_MINOR_VERSION_CFG) || \
  73. (EEP_TYPES_SW_PATCH_VERSION != EEP_SW_PATCH_VERSION_CFG) \
  74. )
  75. #error "Software Version Numbers of Eep_Types.h and Eep_Cfg.h are different"
  76. #endif
  77. #ifndef DISABLE_MCAL_INTERMODULE_ASR_CHECK
  78. /* Check if current file and StandardTypes header file are of the same Autosar version */
  79. #if ((EEP_AR_RELEASE_MAJOR_VERSION_CFG != STD_AR_RELEASE_MAJOR_VERSION) || \
  80. (EEP_AR_RELEASE_MINOR_VERSION_CFG != STD_AR_RELEASE_MINOR_VERSION) \
  81. )
  82. #error "AutoSar Version Numbers of Eep_Cfg.h and StandardTypes.h are different"
  83. #endif
  84. #endif
  85. /* Check if current file and Ftfc_Eep_Ip_Cfg header file are of the same vendor */
  86. #if (EEP_VENDOR_ID_CFG != FTFC_EEP_IP_CFG_VENDOR_ID_H)
  87. #error "Eep_Cfg.h and Ftfc_Eep_Ip_Cfg.h have different vendor ids"
  88. #endif
  89. /* Check if current file and Ftfc_Eep_Ip_Cfg header file are of the same Autosar version */
  90. #if ((EEP_AR_RELEASE_MAJOR_VERSION_CFG != FTFC_EEP_IP_CFG_AR_RELEASE_MAJOR_VERSION_H) || \
  91. (EEP_AR_RELEASE_MINOR_VERSION_CFG != FTFC_EEP_IP_CFG_AR_RELEASE_MINOR_VERSION_H) || \
  92. (EEP_AR_RELEASE_REVISION_VERSION_CFG != FTFC_EEP_IP_CFG_AR_RELEASE_REVISION_VERSION_H) \
  93. )
  94. #error "AutoSar Version Numbers of Eep_Cfg.h and Ftfc_Eep_Ip_Cfg.h are different"
  95. #endif
  96. /* Check if current file and Ftfc_Eep_Ip_Cfg header file are of the same software version */
  97. #if ((EEP_SW_MAJOR_VERSION_CFG != FTFC_EEP_IP_CFG_SW_MAJOR_VERSION_H) || \
  98. (EEP_SW_MINOR_VERSION_CFG != FTFC_EEP_IP_CFG_SW_MINOR_VERSION_H) || \
  99. (EEP_SW_PATCH_VERSION_CFG != FTFC_EEP_IP_CFG_SW_PATCH_VERSION_H) \
  100. )
  101. #error "Software Version Numbers of Eep_Cfg.h and Ftfc_Eep_Ip_Cfg.h are different"
  102. #endif
  103. #ifndef DISABLE_MCAL_INTERMODULE_ASR_CHECK
  104. /* Check if current file and Mcal header file are of the same version */
  105. #if ((EEP_AR_RELEASE_MAJOR_VERSION_CFG != MCAL_AR_RELEASE_MAJOR_VERSION) || \
  106. (EEP_AR_RELEASE_MINOR_VERSION_CFG != MCAL_AR_RELEASE_MINOR_VERSION)\
  107. )
  108. #error "AutoSar Version Numbers of Eep_Cfg.h and Mcal.h are different"
  109. #endif
  110. #endif
  111. /* Check if current file and Eep_VS_0_PBcfg header file are of the same vendor */
  112. #if (EEP_VENDOR_ID_CFG != EEP_VS_0_PBCFG_VENDOR_ID)
  113. #error "Eep_Cfg.h and Eep_VS_0_PBcfg.h have different vendor ids"
  114. #endif
  115. /* Check if current file and Eep_VS_0_PBcfg header file are of the same Autosar version */
  116. #if ((EEP_AR_RELEASE_MAJOR_VERSION_CFG != EEP_VS_0_PBCFG_AR_RELEASE_MAJOR_VERSION) || \
  117. (EEP_AR_RELEASE_MINOR_VERSION_CFG != EEP_VS_0_PBCFG_AR_RELEASE_MINOR_VERSION) || \
  118. (EEP_AR_RELEASE_REVISION_VERSION_CFG != EEP_VS_0_PBCFG_AR_RELEASE_REVISION_VERSION) \
  119. )
  120. #error "AutoSar Version Numbers of Eep_Cfg.h and Eep_VS_0_PBcfg.h are different"
  121. #endif
  122. /* Check if current file and Eep_VS_0_PBcfg header file are of the same software version */
  123. #if ((EEP_SW_MAJOR_VERSION_CFG != EEP_VS_0_PBCFG_SW_MAJOR_VERSION) || \
  124. (EEP_SW_MINOR_VERSION_CFG != EEP_VS_0_PBCFG_SW_MINOR_VERSION) || \
  125. (EEP_SW_PATCH_VERSION_CFG != EEP_VS_0_PBCFG_SW_PATCH_VERSION) \
  126. )
  127. #error "Software Version Numbers of Eep_Cfg.h and Eep_VS_0_PBcfg.h are different"
  128. #endif
  129. /*==================================================================================================
  130. DEFINES AND MACROS
  131. ==================================================================================================*/
  132. /**
  133. * @brief Switches the Production Error Detection and Notification OFF
  134. */
  135. #define EEP_DISABLE_DEM_REPORT_ERROR_STATUS (STD_ON)
  136. #define EEP_QUICK_WRITES_API FTFC_EEP_IP_QUICK_WRITES_API
  137. #if (EEP_DISABLE_DEM_REPORT_ERROR_STATUS == STD_OFF)
  138. #define EEP_HIGH_TEMP_CHIP FTFC_EEP_IP_HIGH_TEMP_CHIP
  139. #endif
  140. /* Compile switch to enable and disable the Eep_Cancel function */
  141. #define EEP_CANCEL_API (STD_ON)
  142. /* Compile switch to enable and disable the Eep_Compare function */
  143. #define EEP_COMPARE_API FTFC_EEP_IP_COMPARE_API
  144. /* Pre-processor switch to enable and disable development error detection */
  145. #define EEP_DEV_ERROR_DETECT (STD_ON)
  146. /* Compile switch to enable and disable the Eep_GetJobResult function */
  147. #define EEP_GET_JOB_RESULT_API (STD_ON)
  148. /* Compile switch to enable and disable the Eep_GetStatus function */
  149. #define EEP_GET_STATUS_API (STD_ON)
  150. /* Compile switch to enable and disable the Eep_SetMode function */
  151. #define EEP_SET_MODE_API (STD_ON)
  152. /* Pre-processor switch to enable / disable the API to read out the modules version information */
  153. #define EEP_VERSION_INFO_API (STD_ON)
  154. /* defines if the write operation will be executed in asynchronous mode or not*/
  155. #define EEP_ASYNC_WRITE_OPERATIONS_ENABLED (STD_OFF)
  156. /* defines if the Erase operation will be executed in asynchronous mode or not*/
  157. #define EEP_ASYNC_ERASE_OPERATIONS_ENABLED (STD_OFF)
  158. /* Enable multi cores feature. */
  159. #define EEP_MCORE_ENABLED (STD_OFF)
  160. /*==================================================================================================
  161. STRUCTURES AND OTHER TYPEDEFS
  162. ==================================================================================================*/
  163. /**
  164. * @brief Eep Config Type
  165. * @details Eep module initialization data structure
  166. * @implements Eep_ConfigType_typedef
  167. *
  168. */
  169. typedef struct
  170. {
  171. /**
  172. * @brief pointer to job end notification function
  173. */
  174. Eep_JobEndNotificationPtrType jobEndNotificationPtr;
  175. /**
  176. * @brief pointer to job error notification function
  177. */
  178. Eep_JobErrorNotificationPtrType jobErrorNotificationPtr;
  179. /**
  180. * @brief default EEP device mode after initialization (MEMIF_MODE_FAST, MEMIF_MODE_SLOW)
  181. */
  182. MemIf_ModeType eDefaultMode;
  183. /**
  184. * @brief max number of bytes to read in one cycle of Eep_MainFunction (fast mode)
  185. */
  186. Eep_LengthType u32MaxReadFastMode;
  187. /**
  188. * @brief max number of bytes to read in one cycle of Eep_MainFunction (normal mode)
  189. */
  190. Eep_LengthType u32MaxReadNormalMode;
  191. /**
  192. * @brief max number of bytes to write in one cycle of Eep_MainFunction (fast mode)
  193. */
  194. Eep_LengthType u32MaxWriteFastMode;
  195. /**
  196. * @brief max number of bytes to write in one cycle of Eep_MainFunction (normal mode)
  197. */
  198. Eep_LengthType u32MaxWriteNormalMode;
  199. /**
  200. * @brief EEP Config Set CRC checksum
  201. */
  202. Eep_CrcType u16ConfigCrc;
  203. /** @brief FTFC IP Config Set */
  204. Ftfc_Eep_Ip_ConfigType const * pxFtfcEepIpConfig;
  205. } Eep_ConfigType;
  206. /*==================================================================================================
  207. GLOBAL CONSTANT DECLARATIONS
  208. ==================================================================================================*/
  209. #define EEP_CONFIG_EXT \
  210. EEP_CONFIG_VS_0_PB \
  211. #ifdef __cplusplus
  212. }
  213. #endif
  214. #endif /* EEP_CFG_H */