Fls.h 7.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198
  1. /*==================================================================================================
  2. * Project : RTD AUTOSAR 4.4
  3. * Platform : CORTEXM
  4. * Peripheral : FTFC_FLS_IP IPV_QSPI
  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. ==================================================================================================*/
  26. #ifndef FLS_H
  27. #define FLS_H
  28. /**
  29. * @file Fls.h
  30. *
  31. * @addtogroup FLS FLS Driver
  32. * @{
  33. */
  34. /* implements Fls.h_Artifact */
  35. #ifdef __cplusplus
  36. extern "C"{
  37. #endif
  38. /*==================================================================================================
  39. INCLUDE FILES
  40. 1) system and project includes
  41. 2) needed interfaces from external units
  42. 3) internal and external interfaces from this unit
  43. ==================================================================================================*/
  44. #include "OsIf.h"
  45. #include "Fls_Cfg.h"
  46. #include "Fls_Api.h"
  47. /*==================================================================================================
  48. * SOURCE FILE VERSION INFORMATION
  49. ==================================================================================================*/
  50. #define FLS_VENDOR_ID 43
  51. #define FLS_AR_RELEASE_MAJOR_VERSION 4
  52. #define FLS_AR_RELEASE_MINOR_VERSION 4
  53. #define FLS_AR_RELEASE_REVISION_VERSION 0
  54. #define FLS_SW_MAJOR_VERSION 1
  55. #define FLS_SW_MINOR_VERSION 0
  56. #define FLS_SW_PATCH_VERSION 0
  57. /*==================================================================================================
  58. * FILE VERSION CHECKS
  59. ==================================================================================================*/
  60. #ifndef DISABLE_MCAL_INTERMODULE_ASR_CHECK
  61. /* Check if header file and Mcal.h header file are of the same Autosar version */
  62. #if ((FLS_AR_RELEASE_MAJOR_VERSION != MCAL_AR_RELEASE_MAJOR_VERSION) || \
  63. (FLS_AR_RELEASE_MINOR_VERSION != MCAL_AR_RELEASE_MINOR_VERSION) \
  64. )
  65. #error "AutoSar Version Numbers of Fls.h and Mcal.h are different"
  66. #endif
  67. /* Check if header file and OsIf.h header file are of the same Autosar version */
  68. #if ((FLS_AR_RELEASE_MAJOR_VERSION != OSIF_AR_RELEASE_MAJOR_VERSION) || \
  69. (FLS_AR_RELEASE_MINOR_VERSION != OSIF_AR_RELEASE_MINOR_VERSION) \
  70. )
  71. #error "AutoSar Version Numbers of Fls.h and OsIf.h are different"
  72. #endif
  73. #endif
  74. /* Check if header file and Fls_Cfg.h header file are of the same vendor */
  75. #if (FLS_VENDOR_ID != FLS_VENDOR_ID_CFG)
  76. #error "Fls.h and Fls_Cfg.h have different vendor ids"
  77. #endif
  78. /* Check if header file and Fls_Cfg.h header file are of the same Autosar version */
  79. #if ((FLS_AR_RELEASE_MAJOR_VERSION != FLS_AR_RELEASE_MAJOR_VERSION_CFG) || \
  80. (FLS_AR_RELEASE_MINOR_VERSION != FLS_AR_RELEASE_MINOR_VERSION_CFG) || \
  81. (FLS_AR_RELEASE_REVISION_VERSION != FLS_AR_RELEASE_REVISION_VERSION_CFG) \
  82. )
  83. #error "AutoSar Version Numbers of Fls.h and Fls_Cfg.h are different"
  84. #endif
  85. /* Check if header file and Fls_Cfg.h header file are of the same software version */
  86. #if ((FLS_SW_MAJOR_VERSION != FLS_SW_MAJOR_VERSION_CFG) || \
  87. (FLS_SW_MINOR_VERSION != FLS_SW_MINOR_VERSION_CFG) || \
  88. (FLS_SW_PATCH_VERSION != FLS_SW_PATCH_VERSION_CFG) \
  89. )
  90. #error "Software Version Numbers of Fls.h and Fls_Cfg.h are different"
  91. #endif
  92. /* Check if header file and Fls_Api.h header file are of the same vendor */
  93. #if (FLS_VENDOR_ID != FLS_API_VENDOR_ID)
  94. #error "Fls.h and Fls_Api.h have different vendor ids"
  95. #endif
  96. /* Check if header file and Fls_Api.h header file are of the same Autosar version */
  97. #if ((FLS_AR_RELEASE_MAJOR_VERSION != FLS_API_AR_RELEASE_MAJOR_VERSION) || \
  98. (FLS_AR_RELEASE_MINOR_VERSION != FLS_API_AR_RELEASE_MINOR_VERSION) || \
  99. (FLS_AR_RELEASE_REVISION_VERSION != FLS_API_AR_RELEASE_REVISION_VERSION) \
  100. )
  101. #error "AutoSar Version Numbers of Fls.h and Fls_Api.h are different"
  102. #endif
  103. /* Check if header file and Fls_Api.h header file are of the same software version */
  104. #if ((FLS_SW_MAJOR_VERSION != FLS_API_SW_MAJOR_VERSION) || \
  105. (FLS_SW_MINOR_VERSION != FLS_API_SW_MINOR_VERSION) || \
  106. (FLS_SW_PATCH_VERSION != FLS_API_SW_PATCH_VERSION) \
  107. )
  108. #error "Software Version Numbers of Fls.h and Fls_Api.h are different"
  109. #endif
  110. /*==================================================================================================
  111. CONSTANTS
  112. ==================================================================================================*/
  113. #define FLS_START_SEC_CONFIG_DATA_UNSPECIFIED
  114. #include "Fls_MemMap.h"
  115. FLS_CONFIG_EXT
  116. #define FLS_STOP_SEC_CONFIG_DATA_UNSPECIFIED
  117. #include "Fls_MemMap.h"
  118. /*! Invalid device instance */
  119. #define FLS_DEVICE_INSTANCE_INVALID (0xFFU)
  120. /*==================================================================================================
  121. GLOBAL VARIABLES
  122. ==================================================================================================*/
  123. #if ( STD_ON == FLS_AC_LOAD_ON_JOB_START )
  124. #define FLS_START_SEC_VAR_CLEARED_BOOLEAN
  125. #include "Fls_MemMap.h"
  126. extern boolean Fls_bACloaded;
  127. #define FLS_STOP_SEC_VAR_CLEARED_BOOLEAN
  128. #include "Fls_MemMap.h"
  129. #endif
  130. #define FLS_START_SEC_VAR_CLEARED_UNSPECIFIED
  131. #include "Fls_MemMap.h"
  132. /**
  133. * @brief Logical address of data block currently processed by Fls_MainFunction
  134. */
  135. extern Fls_AddressType Fls_u32JobAddrIt;
  136. /**
  137. * @brief Last logical address to be processed by a job
  138. */
  139. extern Fls_AddressType Fls_u32JobAddrEnd;
  140. /**
  141. * @brief Index of flash sector currently processed by a job
  142. * @details Used by all types of job
  143. */
  144. extern volatile Fls_SectorIndexType Fls_u32JobSectorIt;
  145. /**
  146. * @brief Index of last flash sector by current job
  147. * @details Used to check status of all external flash chips before start jobs
  148. * or is the last sector in Erease job
  149. */
  150. extern Fls_SectorIndexType Fls_u32JobSectorEnd;
  151. /**
  152. * @brief Result of last flash hardware job
  153. */
  154. extern volatile MemIf_JobResultType Fls_eLLDJobResult;
  155. /**
  156. * @brief Type of current flash hardware job - used for asynchronous operating mode.
  157. */
  158. extern Fls_LLDJobType Fls_eLLDJob;
  159. /**
  160. * @brief Pointer to current flash module configuration set
  161. */
  162. extern const Fls_ConfigType * Fls_pConfigPtr;
  163. #define FLS_STOP_SEC_VAR_CLEARED_UNSPECIFIED
  164. #include "Fls_MemMap.h"
  165. #ifdef __cplusplus
  166. }
  167. #endif
  168. /** @} */
  169. #endif /* FLS_H */