Eep_InternalTypes.h 6.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179
  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_INTERNALTYPES_H
  25. #define EEP_INTERNALTYPES_H
  26. /**
  27. * @file
  28. *
  29. * @addtogroup EEP_DRIVER Eeprom Driver
  30. * @{
  31. */
  32. #ifdef __cplusplus
  33. extern "C"{
  34. #endif
  35. #include "Eep_Cfg.h"
  36. /*==================================================================================================
  37. * SOURCE FILE VERSION INFORMATION
  38. ==================================================================================================*/
  39. #define EEP_INTERNALTYPES_VENDOR_ID 43
  40. #define EEP_INTERNALTYPES_AR_RELEASE_MAJOR_VERSION 4
  41. #define EEP_INTERNALTYPES_AR_RELEASE_MINOR_VERSION 4
  42. #define EEP_INTERNALTYPES_AR_RELEASE_REVISION_VERSION 0
  43. #define EEP_INTERNALTYPES_SW_MAJOR_VERSION 1
  44. #define EEP_INTERNALTYPES_SW_MINOR_VERSION 0
  45. #define EEP_INTERNALTYPES_SW_PATCH_VERSION 0
  46. /*==================================================================================================
  47. * FILE VERSION CHECKS
  48. ==================================================================================================*/
  49. /* Check if current file and Eep configuration header file are of the same vendor */
  50. #if (EEP_INTERNALTYPES_VENDOR_ID != EEP_VENDOR_ID_CFG)
  51. #error "Eep_InternalTypes.h and Eep_Cfg.h have different vendor ids"
  52. #endif
  53. /* Check if current file and Eep configuration header file are of the same Autosar version */
  54. #if ((EEP_INTERNALTYPES_AR_RELEASE_MAJOR_VERSION != EEP_AR_RELEASE_MAJOR_VERSION_CFG) || \
  55. (EEP_INTERNALTYPES_AR_RELEASE_MINOR_VERSION != EEP_AR_RELEASE_MINOR_VERSION_CFG) || \
  56. (EEP_INTERNALTYPES_AR_RELEASE_REVISION_VERSION != EEP_AR_RELEASE_REVISION_VERSION_CFG) \
  57. )
  58. #error "AutoSar Version Numbers of Eep_InternalTypes.h and Eep_Cfg.h are different"
  59. #endif
  60. /* Check if current file and Eep configuration header file are of the same software version */
  61. #if ((EEP_INTERNALTYPES_SW_MAJOR_VERSION != EEP_SW_MAJOR_VERSION_CFG) || \
  62. (EEP_INTERNALTYPES_SW_MINOR_VERSION != EEP_SW_MINOR_VERSION_CFG) || \
  63. (EEP_INTERNALTYPES_SW_PATCH_VERSION != EEP_SW_PATCH_VERSION_CFG) \
  64. )
  65. #error "Software Version Numbers of Eep_InternalTypes.h and Eep_Cfg.h are different"
  66. #endif
  67. /*==================================================================================================
  68. * ENUMS
  69. ==================================================================================================*/
  70. /**
  71. * @brief Type of job currently executed by Eep_MainFunction.
  72. */
  73. typedef enum
  74. {
  75. /**
  76. * @brief erase one or more complete eeprom sectors
  77. */
  78. EEP_JOB_ERASE = 0,
  79. /**
  80. * @brief write one or more complete eeprom pages
  81. */
  82. EEP_JOB_WRITE,
  83. /**
  84. * @brief read one or more bytes from eeprom memory
  85. */
  86. EEP_JOB_READ,
  87. /**
  88. * @brief compare data buffer with content of eeprom memory
  89. */
  90. EEP_JOB_COMPARE
  91. #if (EEP_QUICK_WRITES_API == STD_ON)
  92. /**
  93. * @brief write a certain number of bytes in quick write mode
  94. */
  95. , EEP_JOB_QUICK_WRITE
  96. #endif /* EEP_QUICK_WRITES_API */
  97. } Eep_JobType;
  98. /**
  99. * @brief Result of low-level eeprom operation.
  100. */
  101. typedef enum
  102. {
  103. EEP_E_OK = 0, /**< @brief operation succeeded */
  104. EEP_E_FAILED, /**< @brief operation failed due to hardware error */
  105. EEP_E_BLOCK_INCONSISTENT, /**< @brief data buffer doesn't match with content of eeprom memory */
  106. EEP_E_PENDING /**< @brief operation is pending */
  107. } Eep_ReturnType;
  108. /**
  109. * @brief Size of data to be processeed by CRC.
  110. *
  111. *
  112. */
  113. typedef enum
  114. {
  115. EEP_CRC_8_BITS = 0,
  116. EEP_CRC_16_BITS
  117. } Eep_CrcDataSizeType;
  118. #if (EEP_MCORE_ENABLED == STD_ON)
  119. /* Muticore feature */
  120. /**
  121. * @brief Eep Multi Core Request Return Type.
  122. * @details The return value for the function requesting multi core access.
  123. *
  124. */
  125. typedef enum
  126. {
  127. EEP_MCORE_ERROR = 0,
  128. EEP_MCORE_TIMEOUT,
  129. EEP_MCORE_PENDING,
  130. EEP_MCORE_GRANTED,
  131. EEP_MCORE_CANCELLED
  132. } Eep_MCoreReqReturnType;
  133. /**
  134. * @brief Eep Multi Core hardware job status
  135. * @details The status of a multicore core flash job, in hardware. Used to determine
  136. * if a flash job subject to multicore arbitration was started/suspended/aborted
  137. * in hardware, in the flash controller. This can be used for example, to
  138. * clear a semaphore granted for erase directly, if the job was not actually started
  139. * in hardware, instead of attempting to suspend it.
  140. *
  141. */
  142. typedef enum
  143. {
  144. EEP_MCORE_HW_JOB_IDLE = 0,
  145. EEP_MCORE_HW_JOB_MAINF_STARTED,
  146. EEP_MCORE_HW_JOB_STARTED,
  147. EEP_MCORE_HW_JOB_CANCELLED
  148. } Eep_MCoreHwJobStatusType;
  149. #endif /* #if (EEP_MCORE_ENABLED == STD_ON) */
  150. /*==================================================================================================
  151. * STRUCTURES AND OTHER TYPEDEFS
  152. ==================================================================================================*/
  153. #ifdef __cplusplus
  154. }
  155. #endif
  156. #endif /* EEP_INTERNALTYPES_H */
  157. /** @}*/