Spi_Ipw_VS_0_PBcfg.c 11 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234
  1. /**
  2. * @file Spi_Ipw_VS_0_PBcfg.c
  3. * @version 1.0.0
  4. *
  5. * @brief AUTOSAR Spi - Post-Build(PB) configuration file code template.
  6. * @details Code template for Post-Build(PB) configuration file generation.
  7. *
  8. * @addtogroup SPI_DRIVER_CONFIGURATION Spi Driver Configuration
  9. * @{
  10. */
  11. /*==================================================================================================
  12. * Project : RTD AUTOSAR 4.4
  13. * Platform : CORTEXM
  14. * Peripheral : LPSPI
  15. * Dependencies :
  16. *
  17. * Autosar Version : 4.4.0
  18. * Autosar Revision : ASR_REL_4_4_REV_0000
  19. * Autosar Conf.Variant :
  20. * SW Version : 1.0.0
  21. * Build Version : S32K1_RTD_1_0_0_HF01_D2109_ASR_REL_4_4_REV_0000_20210907
  22. *
  23. * (c) Copyright 2020-2021 NXP Semiconductors
  24. * All Rights Reserved.
  25. *
  26. * NXP Confidential. This software is owned or controlled by NXP and may only be
  27. * used strictly in accordance with the applicable license terms. By expressly
  28. * accepting such terms or by downloading, installing, activating and/or otherwise
  29. * using the software, you are agreeing that you have read, and that you agree to
  30. * comply with and are bound by, such license terms. If you do not agree to be
  31. * bound by the applicable license terms, then you may not retain, install,
  32. * activate or otherwise use the software.
  33. ==================================================================================================*/
  34. #ifdef __cplusplus
  35. extern "C"{
  36. #endif
  37. /*==================================================================================================
  38. * INCLUDE FILES
  39. * 1) system and project includes
  40. * 2) needed interfaces from external units
  41. * 3) internal and external interfaces from this unit
  42. ==================================================================================================*/
  43. #include "Spi_Ipw_VS_0_PBcfg.h"
  44. #include "Lpspi_Ip_Cfg.h"
  45. #include "Flexio_Spi_Ip_Cfg.h"
  46. #include "Spi.h"
  47. /*==================================================================================================
  48. * SOURCE FILE VERSION INFORMATION
  49. ==================================================================================================*/
  50. #define SPI_IPW_VS_0_VENDOR_ID_PBCFG_C 43
  51. #define SPI_IPW_VS_0_AR_RELEASE_MAJOR_VERSION_PBCFG_C 4
  52. #define SPI_IPW_VS_0_AR_RELEASE_MINOR_VERSION_PBCFG_C 4
  53. #define SPI_IPW_VS_0_AR_RELEASE_REVISION_VERSION_PBCFG_C 0
  54. #define SPI_IPW_VS_0_SW_MAJOR_VERSION_PBCFG_C 1
  55. #define SPI_IPW_VS_0_SW_MINOR_VERSION_PBCFG_C 0
  56. #define SPI_IPW_VS_0_SW_PATCH_VERSION_PBCFG_C 0
  57. /*==================================================================================================
  58. * FILE VERSION CHECKS
  59. ==================================================================================================*/
  60. /* Check if Spi_Ipw_PBcfg.h and Spi_Ipw_PBcfg.c are of the same vendor */
  61. #if (SPI_IPW_VENDOR_ID_VS_0_PBCFG_H != SPI_IPW_VS_0_VENDOR_ID_PBCFG_C)
  62. #error "Spi_Ipw_PBcfg.h and Spi_Ipw_PBcfg.c have different vendor ids"
  63. #endif
  64. /* Check if Spi_Ipw_PBcfg.h file and Spi_Ipw_PBcfg.c file are of the same Autosar version */
  65. #if ((SPI_IPW_AR_RELEASE_MAJOR_VERSION_VS_0_PBCFG_H != SPI_IPW_VS_0_AR_RELEASE_MAJOR_VERSION_PBCFG_C) || \
  66. (SPI_IPW_AR_RELEASE_MINOR_VERSION_VS_0_PBCFG_H != SPI_IPW_VS_0_AR_RELEASE_MINOR_VERSION_PBCFG_C) || \
  67. (SPI_IPW_AR_RELEASE_REVISION_VERSION_VS_0_PBCFG_H != SPI_IPW_VS_0_AR_RELEASE_REVISION_VERSION_PBCFG_C))
  68. #error "AutoSar Version Numbers of Spi_Ipw_PBcfg.h and Spi_Ipw_PBcfg.c are different"
  69. #endif
  70. #if ((SPI_IPW_SW_MAJOR_VERSION_VS_0_PBCFG_H != SPI_IPW_VS_0_SW_MAJOR_VERSION_PBCFG_C) || \
  71. (SPI_IPW_SW_MINOR_VERSION_VS_0_PBCFG_H != SPI_IPW_VS_0_SW_MINOR_VERSION_PBCFG_C) || \
  72. (SPI_IPW_SW_PATCH_VERSION_VS_0_PBCFG_H != SPI_IPW_VS_0_SW_PATCH_VERSION_PBCFG_C))
  73. #error "Software Version Numbers of Spi_Ipw_PBcfg.h and Spi_Ipw_PBcfg.c are different"
  74. #endif
  75. /* Check if Lpspi_Ip_Cfg.h and Spi_Ipw_PBcfg.c are of the same vendor */
  76. #if (LPSPI_IP_VENDOR_ID_CFG != SPI_IPW_VS_0_VENDOR_ID_PBCFG_C)
  77. #error "Lpspi_Ip_Cfg.h and Spi_Ipw_PBcfg.c have different vendor ids"
  78. #endif
  79. /* Check if Lpspi_Ip_Cfg.h file and Spi_Ipw_PBcfg.c file are of the same Autosar version */
  80. #if ((LPSPI_IP_AR_RELEASE_MAJOR_VERSION_CFG != SPI_IPW_VS_0_AR_RELEASE_MAJOR_VERSION_PBCFG_C) || \
  81. (LPSPI_IP_AR_RELEASE_MINOR_VERSION_CFG != SPI_IPW_VS_0_AR_RELEASE_MINOR_VERSION_PBCFG_C) || \
  82. (LPSPI_IP_AR_RELEASE_REVISION_VERSION_CFG != SPI_IPW_VS_0_AR_RELEASE_REVISION_VERSION_PBCFG_C))
  83. #error "AutoSar Version Numbers of Lpspi_Ip_Cfg.h and Spi_Ipw_PBcfg.c are different"
  84. #endif
  85. #if ((LPSPI_IP_SW_MAJOR_VERSION_CFG != SPI_IPW_VS_0_SW_MAJOR_VERSION_PBCFG_C) || \
  86. (LPSPI_IP_SW_MINOR_VERSION_CFG != SPI_IPW_VS_0_SW_MINOR_VERSION_PBCFG_C) || \
  87. (LPSPI_IP_SW_PATCH_VERSION_CFG != SPI_IPW_VS_0_SW_PATCH_VERSION_PBCFG_C))
  88. #error "Software Version Numbers of Lpspi_Ip_Cfg.h and Spi_Ipw_PBcfg.c are different"
  89. #endif
  90. /* Check if Spi.h and Spi_Ipw_PBcfg.c are of the same vendor */
  91. #if (SPI_VENDOR_ID != SPI_IPW_VS_0_VENDOR_ID_PBCFG_C)
  92. #error "Spi.h and Spi_Ipw_PBcfg.c have different vendor ids"
  93. #endif
  94. /* Check if Spi.h file and Spi_Ipw_PBcfg.c file are of the same Autosar version */
  95. #if ((SPI_AR_RELEASE_MAJOR_VERSION != SPI_IPW_VS_0_AR_RELEASE_MAJOR_VERSION_PBCFG_C) || \
  96. (SPI_AR_RELEASE_MINOR_VERSION != SPI_IPW_VS_0_AR_RELEASE_MINOR_VERSION_PBCFG_C) || \
  97. (SPI_AR_RELEASE_REVISION_VERSION != SPI_IPW_VS_0_AR_RELEASE_REVISION_VERSION_PBCFG_C))
  98. #error "AutoSar Version Numbers of Spi.h and Spi_Ipw_PBcfg.c are different"
  99. #endif
  100. #if ((SPI_SW_MAJOR_VERSION != SPI_IPW_VS_0_SW_MAJOR_VERSION_PBCFG_C) || \
  101. (SPI_SW_MINOR_VERSION != SPI_IPW_VS_0_SW_MINOR_VERSION_PBCFG_C) || \
  102. (SPI_SW_PATCH_VERSION != SPI_IPW_VS_0_SW_PATCH_VERSION_PBCFG_C))
  103. #error "Software Version Numbers of Spi.h and Spi_Ipw_PBcfg.c are different"
  104. #endif
  105. /* Check if Flexio_Spi_Ip_Cfg.h and Spi_Ipw_PBcfg.c are of the same vendor */
  106. #if (FLEXIO_SPI_IP_VENDOR_ID_CFG != SPI_IPW_VS_0_VENDOR_ID_PBCFG_C)
  107. #error "Flexio_Spi_Ip_Cfg.h and Spi_Ipw_VS_0_PBcfg.c have different vendor ids"
  108. #endif
  109. /* Check if Flexio_Spi_Ip_Cfg.h file and Spi_Ipw_PBcfg.c file are of the same Autosar version */
  110. #if ((FLEXIO_SPI_IP_AR_RELEASE_MAJOR_VERSION_CFG != SPI_IPW_VS_0_AR_RELEASE_MAJOR_VERSION_PBCFG_C) || \
  111. (FLEXIO_SPI_IP_AR_RELEASE_MINOR_VERSION_CFG != SPI_IPW_VS_0_AR_RELEASE_MINOR_VERSION_PBCFG_C) || \
  112. (FLEXIO_SPI_IP_AR_RELEASE_REVISION_VERSION_CFG != SPI_IPW_VS_0_AR_RELEASE_REVISION_VERSION_PBCFG_C))
  113. #error "AutoSar Version Numbers of Flexio_Spi_Ip_Cfg.h and Spi_Ipw_VS_0_PBcfg.c are different"
  114. #endif
  115. #if ((FLEXIO_SPI_IP_SW_MAJOR_VERSION_CFG != SPI_IPW_VS_0_SW_MAJOR_VERSION_PBCFG_C) || \
  116. (FLEXIO_SPI_IP_SW_MINOR_VERSION_CFG != SPI_IPW_VS_0_SW_MINOR_VERSION_PBCFG_C) || \
  117. (FLEXIO_SPI_IP_SW_PATCH_VERSION_CFG != SPI_IPW_VS_0_SW_PATCH_VERSION_PBCFG_C))
  118. #error "Software Version Numbers of Flexio_Spi_Ip_Cfg.h and Spi_Ipw_VS_0_PBcfg.c are different"
  119. #endif
  120. /*==================================================================================================
  121. * LOCAL TYPEDEFS (STRUCTURES, UNIONS, ENUMS)
  122. ==================================================================================================*/
  123. /*==================================================================================================
  124. * LOCAL MACROS
  125. ==================================================================================================*/
  126. /*==================================================================================================
  127. * LOCAL FUNCTION PROTOTYPES
  128. ==================================================================================================*/
  129. /*==================================================================================================
  130. * LOCAL FUNCTIONS
  131. ==================================================================================================*/
  132. /*==================================================================================================
  133. * GLOBAL FUNCTIONS
  134. ==================================================================================================*/
  135. /*==================================================================================================
  136. * GLOBAL VARIABLES
  137. ==================================================================================================*/
  138. #define SPI_START_SEC_VAR_CLEARED_UNSPECIFIED
  139. #include "Spi_MemMap.h"
  140. #define SPI_STOP_SEC_VAR_CLEARED_UNSPECIFIED
  141. #include "Spi_MemMap.h"
  142. #define SPI_START_SEC_CONFIG_DATA_UNSPECIFIED
  143. #include "Spi_MemMap.h"
  144. /* External device Configuration of SpiExternalDevice_0*/
  145. static const Spi_ExternalDeviceConfigType Spi_ExternalDeviceConfig_SpiExternalDevice_0_VS_0 =
  146. {
  147. /* SpiExternalDevice_0*/
  148. SPI_OVER_LPSPI, /* IpType */
  149. 2U, /* Instance */
  150. { /* ExternalDeviceConfig */
  151. &Lpspi_Ip_DeviceAttributes_SpiExternalDevice_0_VS_0 /* LPSPI ExternalDeviceConfig */
  152. #if (SPI_IPW_SPI_FLEXIO_ENABLE == STD_ON)
  153. ,NULL_PTR /* Don't have FLEXIO_SPI ExternalDeviceConfig */
  154. #endif
  155. },
  156. SPI_SPURIOUS_CORE_ID};
  157. /* Spi_apExternalDeviceConfigList_VS_0 External device Configuration of Spi*/
  158. const Spi_ExDevicesConfigType Spi_aExternalDeviceConfigList_VS_0[1U] =
  159. {
  160. {
  161. /* SpiExternalDevice_0 */
  162. &Spi_ExternalDeviceConfig_SpiExternalDevice_0_VS_0
  163. }
  164. };
  165. /* Hardware Unit configuration for SpiPhyUnit_0 */
  166. static const Spi_HWUnitConfigType Spi_HwUnitConfig_SpiPhyUnit_0_VS_0 =
  167. {
  168. SPI_OVER_LPSPI, /* IpType */
  169. (uint8)2U, /* Instance */
  170. SPI_SPURIOUS_CORE_ID, /* SpiCoreUse */
  171. {
  172. &Lpspi_Ip_PhyUnitConfig_SpiPhyUnit_0_VS_0 /* LPSPI IpConfig */
  173. #if (SPI_IPW_SPI_FLEXIO_ENABLE == STD_ON)
  174. ,NULL_PTR /* Don't have Ipconfig of FLEXIO_SPI */
  175. #endif
  176. #if ((LPSPI_IP_DMA_USED == STD_ON) && (LPSPI_IP_ENABLE_DMAFASTTRANSFER_SUPPORT == STD_ON))
  177. ,NULL_PTR
  178. #endif
  179. },
  180. SPI_PHYUNIT_SYNC_U32 /* IsSync */
  181. };
  182. /* Array of Hardware Unit configurations */
  183. const Spi_PhyUnitsConfigType Spi_aHwUnitConfigList_VS_0[SPI_MAX_HWUNIT] =
  184. {
  185. /* SpiPhyUnit_0 */
  186. {
  187. &Spi_HwUnitConfig_SpiPhyUnit_0_VS_0
  188. }
  189. };
  190. #define SPI_STOP_SEC_CONFIG_DATA_UNSPECIFIED
  191. #include "Spi_MemMap.h"
  192. /*==================================================================================================
  193. * LOCAL VARIABLES
  194. ==================================================================================================*/
  195. /*==================================================================================================
  196. * LOCAL CONSTANTS
  197. ==================================================================================================*/
  198. /*==================================================================================================
  199. * GLOBAL CONSTANTS
  200. ==================================================================================================*/
  201. #ifdef __cplusplus
  202. }
  203. #endif
  204. /** @} */