Uart_VS_0_PBcfg.c 11 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301
  1. /*==================================================================================================
  2. * Project : RTD AUTOSAR 4.4
  3. * Platform : CORTEXM
  4. * Peripheral : FLEXIO
  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. /**
  25. * @file
  26. *
  27. * @defgroup uart_driver UART Driver
  28. * @addtogroup uart_driver UART Driver
  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 "StandardTypes.h"
  41. #include "Uart_Cfg.h"
  42. #include "Uart_Ipw_Cfg.h"
  43. #include "Uart_Defines.h"
  44. /*==================================================================================================
  45. * SOURCE FILE VERSION INFORMATION
  46. ==================================================================================================*/
  47. #define UART_PBCFG_VS_0_VENDOR_ID_C 43
  48. #define UART_PBCFG_VS_0_AR_RELEASE_MAJOR_VERSION_C 4
  49. #define UART_PBCFG_VS_0_AR_RELEASE_MINOR_VERSION_C 4
  50. #define UART_PBCFG_VS_0_AR_RELEASE_REVISION_VERSION_C 0
  51. #define UART_PBCFG_VS_0_SW_MAJOR_VERSION_C 1
  52. #define UART_PBCFG_VS_0_SW_MINOR_VERSION_C 0
  53. #define UART_PBCFG_VS_0_SW_PATCH_VERSION_C 0
  54. /*==================================================================================================
  55. * FILE VERSION CHECKS
  56. ==================================================================================================*/
  57. /* Checks against Uart_Cfg.h */
  58. #if (UART_PBCFG_VS_0_VENDOR_ID_C != UART_CFG_VENDOR_ID)
  59. #error "Uart_VS_0_PBcfg.c and Uart_Cfg.h have different vendor ids"
  60. #endif
  61. #if ((UART_PBCFG_VS_0_AR_RELEASE_MAJOR_VERSION_C != UART_CFG_AR_RELEASE_MAJOR_VERSION) || \
  62. (UART_PBCFG_VS_0_AR_RELEASE_MINOR_VERSION_C != UART_CFG_AR_RELEASE_MINOR_VERSION) || \
  63. (UART_PBCFG_VS_0_AR_RELEASE_REVISION_VERSION_C != UART_CFG_AR_RELEASE_REVISION_VERSION))
  64. #error "AUTOSAR Version Numbers of Uart_VS_0_PBcfg.c and Uart_Cfg.h are different"
  65. #endif
  66. #if ((UART_PBCFG_VS_0_SW_MAJOR_VERSION_C != UART_CFG_SW_MAJOR_VERSION) || \
  67. (UART_PBCFG_VS_0_SW_MINOR_VERSION_C != UART_CFG_SW_MINOR_VERSION) || \
  68. (UART_PBCFG_VS_0_SW_PATCH_VERSION_C != UART_CFG_SW_PATCH_VERSION) \
  69. )
  70. #error "Software Version Numbers of Uart_VS_0_PBcfg.c and Uart_Cfg.h are different"
  71. #endif
  72. /* Checks against Uart_Ipw_Cfg.h */
  73. #if (UART_PBCFG_VS_0_VENDOR_ID_C != UART_IPW_CFG_VENDOR_ID)
  74. #error "Uart_VS_0_PBcfg.c and Uart_Ipw_Cfg.h have different vendor ids"
  75. #endif
  76. #if ((UART_PBCFG_VS_0_AR_RELEASE_MAJOR_VERSION_C != UART_IPW_CFG_AR_RELEASE_MAJOR_VERSION) || \
  77. (UART_PBCFG_VS_0_AR_RELEASE_MINOR_VERSION_C != UART_IPW_CFG_AR_RELEASE_MINOR_VERSION) || \
  78. (UART_PBCFG_VS_0_AR_RELEASE_REVISION_VERSION_C != UART_IPW_CFG_AR_RELEASE_REVISION_VERSION))
  79. #error "AUTOSAR Version Numbers of Uart_VS_0_PBcfg.c and Uart_Ipw_Cfg.h are different"
  80. #endif
  81. #if ((UART_PBCFG_VS_0_SW_MAJOR_VERSION_C != UART_IPW_CFG_SW_MAJOR_VERSION) || \
  82. (UART_PBCFG_VS_0_SW_MINOR_VERSION_C != UART_IPW_CFG_SW_MINOR_VERSION) || \
  83. (UART_PBCFG_VS_0_SW_PATCH_VERSION_C != UART_IPW_CFG_SW_PATCH_VERSION) \
  84. )
  85. #error "Software Version Numbers of Uart_VS_0_PBcfg.c and Uart_Ipw_Cfg.h are different"
  86. #endif
  87. /* Checks against Uart_Defines.h */
  88. #if (UART_PBCFG_VS_0_VENDOR_ID_C != UART_DEFINES_VENDOR_ID_CFG)
  89. #error "Uart_VS_0_PBcfg.c and Uart_Defines.h have different vendor ids"
  90. #endif
  91. #if ((UART_PBCFG_VS_0_AR_RELEASE_MAJOR_VERSION_C != UART_DEFINES_AR_RELEASE_MAJOR_VERSION_CFG) || \
  92. (UART_PBCFG_VS_0_AR_RELEASE_MINOR_VERSION_C != UART_DEFINES_AR_RELEASE_MINOR_VERSION_CFG) || \
  93. (UART_PBCFG_VS_0_AR_RELEASE_REVISION_VERSION_C != UART_DEFINES_AR_RELEASE_REVISION_VERSION_CFG))
  94. #error "AUTOSAR Version Numbers of Uart_VS_0_PBcfg.c and Uart_Defines.h are different"
  95. #endif
  96. #if ((UART_PBCFG_VS_0_SW_MAJOR_VERSION_C != UART_DEFINES_SW_MAJOR_VERSION_CFG) || \
  97. (UART_PBCFG_VS_0_SW_MINOR_VERSION_C != UART_DEFINES_SW_MINOR_VERSION_CFG) || \
  98. (UART_PBCFG_VS_0_SW_PATCH_VERSION_C != UART_DEFINES_SW_PATCH_VERSION_CFG) \
  99. )
  100. #error "Software Version Numbers of Uart_VS_0_PBcfg.c and Uart_Defines.h are different"
  101. #endif
  102. #ifndef DISABLE_MCAL_INTERMODULE_ASR_CHECK
  103. /* Check if current file and StandardTypes.h header file are of the same Autosar version */
  104. #if ((UART_PBCFG_VS_0_AR_RELEASE_MAJOR_VERSION_C != STD_AR_RELEASE_MAJOR_VERSION) || \
  105. (UART_PBCFG_VS_0_AR_RELEASE_MINOR_VERSION_C != STD_AR_RELEASE_MINOR_VERSION))
  106. #error "AutoSar Version Numbers of Uart_VS_0_PBcfg.c and StandardTypes.h are different"
  107. #endif
  108. #endif
  109. /*==================================================================================================
  110. GLOBAL VARIABLE DECLARATIONS
  111. ==================================================================================================*/
  112. #define UART_START_SEC_CONFIG_DATA_UNSPECIFIED
  113. #include "Uart_MemMap.h"
  114. /**
  115. * @brief Export IPW configurations.
  116. */
  117. UART_IPW_CONFIG_EXT
  118. #define UART_STOP_SEC_CONFIG_DATA_UNSPECIFIED
  119. #include "Uart_MemMap.h"
  120. /*==================================================================================================
  121. * LOCAL TYPEDEFS (STRUCTURES, UNIONS, ENUMS)
  122. ==================================================================================================*/
  123. /*==================================================================================================
  124. * LOCAL MACROS
  125. ==================================================================================================*/
  126. /*==================================================================================================
  127. * LOCAL CONSTANTS
  128. ==================================================================================================*/
  129. #define UART_CORE_ID ((uint32)0U)
  130. /*==================================================================================================
  131. * LOCAL VARIABLES
  132. ==================================================================================================*/
  133. /*==================================================================================================
  134. * GLOBAL CONSTANTS
  135. ==================================================================================================*/
  136. #define UART_START_SEC_CONFIG_DATA_UNSPECIFIED
  137. /**
  138. * @violates @ref Uart_VS_0_PBcfg_c_REF_1 <MA>_MemMap.h is included
  139. after each section define in order to set the current memory section as defined by AUTOSAR.
  140. * @violates @ref Uart_VS_0_PBcfg_c_REF_2 This violation is not fixed
  141. since the inclusion of <MA>_MemMap.h is as per AUTOSAR requirement [SWS_MemMap_00003].
  142. */
  143. #include "Uart_MemMap.h"
  144. /**
  145. * @brief Configuration for Uart Channel 0
  146. *
  147. *
  148. */
  149. const Uart_ChannelConfigType Uart_ChannelConfig_0_VS_0 =
  150. {
  151. 0, /*Uart Channel Id*/
  152. #if (UART_MULTICORE_SUPPORT == STD_ON)
  153. UART_CORE_ID, /*Uart Channel Core Id*/
  154. #endif
  155. 2000000U, /* Clock frequency */
  156. &Uart_Ipw_xHwConfigPB_0_VS_0 /* Uart Hardware config */
  157. };
  158. /**
  159. * @brief Configuration for Uart Channel 1
  160. *
  161. *
  162. */
  163. const Uart_ChannelConfigType Uart_ChannelConfig_1_VS_0 =
  164. {
  165. 1, /*Uart Channel Id*/
  166. #if (UART_MULTICORE_SUPPORT == STD_ON)
  167. UART_CORE_ID, /*Uart Channel Core Id*/
  168. #endif
  169. 2000000U, /* Clock frequency */
  170. &Uart_Ipw_xHwConfigPB_1_VS_0 /* Uart Hardware config */
  171. };
  172. /**
  173. * @brief Configuration for Uart Channel 2
  174. *
  175. *
  176. */
  177. const Uart_ChannelConfigType Uart_ChannelConfig_2_VS_0 =
  178. {
  179. 2, /*Uart Channel Id*/
  180. #if (UART_MULTICORE_SUPPORT == STD_ON)
  181. UART_CORE_ID, /*Uart Channel Core Id*/
  182. #endif
  183. 2000000U, /* Clock frequency */
  184. &Uart_Ipw_xHwConfigPB_2_VS_0 /* Uart Hardware config */
  185. };
  186. /**
  187. * @brief Configuration for Uart driver
  188. *
  189. *
  190. */
  191. static const Uart_ConfigType Uart_xConfig =
  192. {
  193. #if (UART_MULTICORE_SUPPORT == STD_ON)
  194. UART_CORE_ID,
  195. #endif
  196. {
  197. &Uart_ChannelConfig_0_VS_0
  198. ,
  199. &Uart_ChannelConfig_1_VS_0
  200. ,
  201. &Uart_ChannelConfig_2_VS_0
  202. }
  203. };
  204. /**
  205. * @brief Uart Configuration data for Uart_pxPBcfgVariantPredefined.
  206. *
  207. */
  208. /**
  209. * @violates @ref Uart_VS_0_PBcfg_c_REF_3 Function with external linkage is not visible.
  210. * @violates @ref Uart_VS_0_PBcfg_c_REF_4 These functions
  211. represent the API of the driver. External linkage is needed to "export" the API.
  212. * @violates @ref Uart_VS_0_PBcfg_c_REF_5 This violation is due to exporting
  213. the externally configured initialization structure used by the "<MA>_Init" function.
  214. */
  215. const Uart_ConfigType* const Uart_pxPBcfgVariantPredefined[UART_MAX_PARTITIONS] =
  216. {
  217. &Uart_xConfig
  218. };
  219. #define UART_STOP_SEC_CONFIG_DATA_UNSPECIFIED
  220. /**
  221. * @violates @ref Uart_VS_0_PBcfg_c_REF_1 <MA>_MemMap.h is included
  222. after each section define in order to set the current memory section as defined by AUTOSAR.
  223. * @violates @ref Uart_VS_0_PBcfg_c_REF_2 This violation is not fixed
  224. since the inclusion of <MA>_MemMap.h is as per AUTOSAR requirement [SWS_MemMap_00003].
  225. */
  226. #include "Uart_MemMap.h"
  227. /*==================================================================================================
  228. * GLOBAL VARIABLES
  229. ==================================================================================================*/
  230. /*==================================================================================================
  231. * LOCAL FUNCTION PROTOTYPES
  232. ==================================================================================================*/
  233. /*==================================================================================================
  234. * LOCAL FUNCTIONS
  235. ==================================================================================================*/
  236. /*==================================================================================================
  237. * GLOBAL FUNCTIONS
  238. ==================================================================================================*/
  239. #ifdef __cplusplus
  240. }
  241. /** @} */
  242. #endif