Dio_Cfg.c 12 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341
  1. /*==================================================================================================
  2. * Project : RTD AUTOSAR 4.4
  3. * Platform : CORTEXM
  4. * Peripheral : GPIO
  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 Dio_Cfg.c
  26. * @implements Dio_Cfg.c_Artifact
  27. *
  28. * @addtogroup DIO_CFG
  29. * @{
  30. */
  31. #ifdef __cplusplus
  32. extern "C" {
  33. #endif
  34. /*=================================================================================================
  35. * INCLUDE FILES
  36. * 1) system and project includes
  37. * 2) needed interfaces from external units
  38. * 3) internal and external interfaces from this unit
  39. =================================================================================================*/
  40. #include "Dio.h"
  41. #if (defined(DIO_PRECOMPILE_SUPPORT) || defined(DIO_LINKTIME_SUPPORT))
  42. /*=================================================================================================
  43. * SOURCE FILE VERSION INFORMATION
  44. =================================================================================================*/
  45. #define DIO_VENDOR_ID_CFG_C 43
  46. #define DIO_AR_RELEASE_MAJOR_VERSION_CFG_C 4
  47. #define DIO_AR_RELEASE_MINOR_VERSION_CFG_C 4
  48. #define DIO_AR_RELEASE_REVISION_VERSION_CFG_C 0
  49. #define DIO_SW_MAJOR_VERSION_CFG_C 1
  50. #define DIO_SW_MINOR_VERSION_CFG_C 0
  51. #define DIO_SW_PATCH_VERSION_CFG_C 0
  52. /*=================================================================================================
  53. * FILE VERSION CHECKS
  54. =================================================================================================*/
  55. #if (((DIO_AR_RELEASE_MAJOR_VERSION_CFG_C != DIO_AR_RELEASE_MAJOR_VERSION) || \
  56. (DIO_AR_RELEASE_MINOR_VERSION_CFG_C != DIO_AR_RELEASE_MINOR_VERSION)) || \
  57. (DIO_AR_RELEASE_REVISION_VERSION_CFG_C != DIO_AR_RELEASE_REVISION_VERSION)\
  58. )
  59. #error "AutoSar Version Numbers of Dio_Cfg.c and Dio.h are different"
  60. #endif
  61. #if ((DIO_SW_MAJOR_VERSION_CFG_C != DIO_SW_MAJOR_VERSION) || \
  62. (DIO_SW_MINOR_VERSION_CFG_C != DIO_SW_MINOR_VERSION) || \
  63. (DIO_SW_PATCH_VERSION_CFG_C != DIO_SW_PATCH_VERSION) \
  64. )
  65. #error "Software Version Numbers of Dio_Cfg.c and Dio.h are different"
  66. #endif
  67. #if ((DIO_VENDOR_ID_CFG_C != DIO_VENDOR_ID))
  68. #error "VENDOR ID for Dio_Cfg.c and Dio.h is different"
  69. #endif
  70. /*=================================================================================================
  71. * LOCAL TYPEDEFS (STRUCTURES, UNIONS, ENUMS)
  72. =================================================================================================*/
  73. /*=================================================================================================
  74. * LOCAL MACROS
  75. =================================================================================================*/
  76. /*=================================================================================================
  77. * LOCAL CONSTANTS
  78. =================================================================================================*/
  79. /*=================================================================================================
  80. * LOCAL VARIABLES
  81. =================================================================================================*/
  82. /*=================================================================================================
  83. * GLOBAL CONSTANTS
  84. =================================================================================================*/
  85. #define DIO_START_SEC_CONST_32
  86. #include "Dio_MemMap.h"
  87. /**
  88. * @brief Array containing list of mapping channel for partition
  89. */
  90. const uint32 au32Dio_ChannelToPartitionMap[DIO_CHANNEL_PARTITION_U16] =
  91. {
  92. (uint32)0x0000000000000001,
  93. (uint32)0x0000000000000001,
  94. (uint32)0x0000000000000001,
  95. (uint32)0x0000000000000001,
  96. (uint32)0x0000000000000001,
  97. (uint32)0x0000000000000001,
  98. (uint32)0x0000000000000001,
  99. (uint32)0x0000000000000001,
  100. (uint32)0x0000000000000001,
  101. (uint32)0x0000000000000001,
  102. (uint32)0x0000000000000001,
  103. (uint32)0x0000000000000001,
  104. (uint32)0x0000000000000001,
  105. (uint32)0x0000000000000001,
  106. (uint32)0x0000000000000001,
  107. (uint32)0x0000000000000001,
  108. (uint32)0x0000000000000001,
  109. (uint32)0x0000000000000001,
  110. (uint32)0x0000000000000001,
  111. (uint32)0x0000000000000001,
  112. (uint32)0x0000000000000001,
  113. (uint32)0x0000000000000001,
  114. (uint32)0x0000000000000001,
  115. (uint32)0x0000000000000001,
  116. (uint32)0x0000000000000001,
  117. (uint32)0x0000000000000001,
  118. (uint32)0x0000000000000001,
  119. (uint32)0x0000000000000001,
  120. (uint32)0x0000000000000001,
  121. (uint32)0x0000000000000001,
  122. (uint32)0x0000000000000001,
  123. (uint32)0x0000000000000001,
  124. (uint32)0x0000000000000001,
  125. (uint32)0x0000000000000001,
  126. (uint32)0x0000000000000001,
  127. (uint32)0x0000000000000001,
  128. (uint32)0x0000000000000001,
  129. (uint32)0x0000000000000001,
  130. (uint32)0x0000000000000001,
  131. (uint32)0x0000000000000001,
  132. (uint32)0x0000000000000001,
  133. (uint32)0x0000000000000001,
  134. (uint32)0x0000000000000001,
  135. (uint32)0x0000000000000001,
  136. (uint32)0x0000000000000001,
  137. (uint32)0x0000000000000001,
  138. (uint32)0x0000000000000001,
  139. (uint32)0x0000000000000001,
  140. (uint32)0x0000000000000001,
  141. (uint32)0x0000000000000001,
  142. (uint32)0x0000000000000001,
  143. (uint32)0x0000000000000001,
  144. (uint32)0x0000000000000001,
  145. (uint32)0x0000000000000001,
  146. (uint32)0x0000000000000001,
  147. (uint32)0x0000000000000001,
  148. (uint32)0x0000000000000001,
  149. (uint32)0x0000000000000001,
  150. (uint32)0x0000000000000001,
  151. (uint32)0x0000000000000001,
  152. (uint32)0x0000000000000001,
  153. (uint32)0x0000000000000001,
  154. (uint32)0x0000000000000001,
  155. (uint32)0x0000000000000001,
  156. (uint32)0x0000000000000001,
  157. (uint32)0x0000000000000001,
  158. (uint32)0x0000000000000001,
  159. (uint32)0x0000000000000001,
  160. (uint32)0x0000000000000001,
  161. (uint32)0x0000000000000001,
  162. (uint32)0x0000000000000001,
  163. (uint32)0x0000000000000001,
  164. (uint32)0x0000000000000001,
  165. (uint32)0x0000000000000001,
  166. (uint32)0x0000000000000001,
  167. (uint32)0x0000000000000001,
  168. (uint32)0x0000000000000001,
  169. (uint32)0x0000000000000001,
  170. (uint32)0x0000000000000001,
  171. (uint32)0x0000000000000001,
  172. (uint32)0x0000000000000001,
  173. (uint32)0x0000000000000001,
  174. (uint32)0x0000000000000001,
  175. (uint32)0x0000000000000001,
  176. (uint32)0x0000000000000001,
  177. (uint32)0x0000000000000001,
  178. (uint32)0x0000000000000001,
  179. (uint32)0x0000000000000001,
  180. (uint32)0x0000000000000001,
  181. (uint32)0x0000000000000001,
  182. (uint32)0x0000000000000001,
  183. (uint32)0x0000000000000001,
  184. (uint32)0x0000000000000001,
  185. (uint32)0x0000000000000001,
  186. (uint32)0x0000000000000001,
  187. (uint32)0x0000000000000001,
  188. (uint32)0x0000000000000001,
  189. (uint32)0x0000000000000001,
  190. (uint32)0x0000000000000001,
  191. (uint32)0x0000000000000001,
  192. (uint32)0x0000000000000001,
  193. (uint32)0x0000000000000001,
  194. (uint32)0x0000000000000001,
  195. (uint32)0x0000000000000001,
  196. (uint32)0x0000000000000001,
  197. (uint32)0x0000000000000001,
  198. (uint32)0x0000000000000001,
  199. (uint32)0x0000000000000001,
  200. (uint32)0x0000000000000001,
  201. (uint32)0x0000000000000001,
  202. (uint32)0x0000000000000001,
  203. (uint32)0x0000000000000001,
  204. (uint32)0x0000000000000001,
  205. (uint32)0x0000000000000001,
  206. (uint32)0x0000000000000001,
  207. (uint32)0x0000000000000001,
  208. (uint32)0x0000000000000001,
  209. (uint32)0x0000000000000001,
  210. (uint32)0x0000000000000001,
  211. (uint32)0x0000000000000001,
  212. (uint32)0x0000000000000001,
  213. (uint32)0x0000000000000001,
  214. (uint32)0x0000000000000001,
  215. (uint32)0x0000000000000001,
  216. (uint32)0x0000000000000001,
  217. (uint32)0x0000000000000001,
  218. (uint32)0x0000000000000001,
  219. (uint32)0x0000000000000001,
  220. (uint32)0x0000000000000001,
  221. (uint32)0x0000000000000001,
  222. (uint32)0x0000000000000001,
  223. (uint32)0x0000000000000001,
  224. (uint32)0x0000000000000001,
  225. (uint32)0x0000000000000001,
  226. (uint32)0x0000000000000001,
  227. (uint32)0x0000000000000001,
  228. (uint32)0x0000000000000001,
  229. (uint32)0x0000000000000001,
  230. (uint32)0x0000000000000001,
  231. (uint32)0x0000000000000001
  232. };
  233. /**
  234. * @brief Array containing list of mapping port for partition
  235. */
  236. const uint32 au32Dio_PortToPartitionMap[DIO_PORT_PARTITION_U16] =
  237. {
  238. (uint32)0x0000000000000001,
  239. (uint32)0x0000000000000001,
  240. (uint32)0x0000000000000001,
  241. (uint32)0x0000000000000001,
  242. (uint32)0x0000000000000001
  243. };
  244. /**
  245. * @brief Platform implemented port pins representation.
  246. * @details Array of bit maps reflecting the available pins in each port.
  247. * The number of elements in the array corresponds to the number of
  248. * ports implemented in the platform package. Rightmost bit of each
  249. * array element corresponds to channel 0 of the associated port,
  250. * while leftmost bit of each array element corresponds to channel 31
  251. * of the associated port. A 0 bit means that the correspondent channel
  252. * is not available in the platform package, while a bit of 1 means
  253. * that the correspondent channel is available in the platform package.
  254. *
  255. * @api
  256. */
  257. const Dio_PortLevelType Dio_aAvailablePinsForWrite[DIO_NUM_PORTS_U16] =
  258. {
  259. (Dio_PortLevelType)0x00003CFFUL,
  260. (Dio_PortLevelType)0x000030FFUL,
  261. (Dio_PortLevelType)0x0003C3FFUL,
  262. (Dio_PortLevelType)0x000180FFUL,
  263. (Dio_PortLevelType)0x00000FFFUL
  264. };
  265. const Dio_PortLevelType Dio_aAvailablePinsForRead[DIO_NUM_PORTS_U16] =
  266. {
  267. (Dio_PortLevelType)0x00003CFFUL,
  268. (Dio_PortLevelType)0x000030FFUL,
  269. (Dio_PortLevelType)0x0003C3FFUL,
  270. (Dio_PortLevelType)0x000180FFUL,
  271. (Dio_PortLevelType)0x00000FFFUL
  272. };
  273. #define DIO_STOP_SEC_CONST_32
  274. #include "Dio_MemMap.h"
  275. #define DIO_START_SEC_CONFIG_DATA_UNSPECIFIED
  276. #include "Dio_MemMap.h"
  277. /* ========== DioConfig ========== */
  278. /**
  279. * @brief Data structure for configuration DioConfig.
  280. */
  281. const Dio_ConfigType Dio_Config =
  282. {
  283. (uint8)0x0,
  284. NULL_PTR,
  285. au32Dio_ChannelToPartitionMap,
  286. au32Dio_PortToPartitionMap
  287. };
  288. #define DIO_STOP_SEC_CONFIG_DATA_UNSPECIFIED
  289. #include "Dio_MemMap.h"
  290. /*=================================================================================================
  291. * GLOBAL VARIABLES
  292. =================================================================================================*/
  293. /*=================================================================================================
  294. * LOCAL FUNCTION PROTOTYPES
  295. =================================================================================================*/
  296. /*=================================================================================================
  297. * LOCAL FUNCTIONS
  298. =================================================================================================*/
  299. /*=================================================================================================
  300. * GLOBAL FUNCTIONS
  301. =================================================================================================*/
  302. #endif /* (defined(DIO_PRECOMPILE_SUPPORT) || defined(DIO_LINKTIME_SUPPORT)) */
  303. #ifdef __cplusplus
  304. }
  305. #endif
  306. /** @} */