CDD_Mcl.h 89 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471147214731474147514761477147814791480148114821483148414851486148714881489149014911492149314941495149614971498149915001501150215031504150515061507150815091510151115121513151415151516151715181519152015211522152315241525152615271528152915301531153215331534153515361537153815391540154115421543154415451546154715481549155015511552155315541555155615571558155915601561156215631564156515661567156815691570157115721573157415751576157715781579158015811582158315841585158615871588158915901591159215931594159515961597159815991600160116021603160416051606160716081609161016111612161316141615161616171618161916201621162216231624162516261627162816291630163116321633163416351636163716381639164016411642164316441645164616471648164916501651165216531654165516561657165816591660166116621663166416651666166716681669167016711672167316741675167616771678167916801681168216831684168516861687168816891690169116921693169416951696169716981699170017011702170317041705170617071708170917101711171217131714171517161717171817191720172117221723172417251726172717281729173017311732173317341735173617371738173917401741174217431744174517461747174817491750175117521753175417551756175717581759176017611762176317641765176617671768176917701771177217731774177517761777177817791780178117821783178417851786178717881789179017911792179317941795179617971798179918001801180218031804180518061807180818091810181118121813181418151816181718181819182018211822182318241825182618271828182918301831183218331834183518361837183818391840184118421843184418451846184718481849185018511852185318541855185618571858185918601861186218631864186518661867186818691870187118721873187418751876187718781879188018811882188318841885188618871888188918901891189218931894189518961897189818991900190119021903190419051906190719081909191019111912191319141915191619171918191919201921192219231924192519261927192819291930193119321933193419351936193719381939194019411942194319441945194619471948194919501951195219531954195519561957195819591960196119621963196419651966196719681969197019711972197319741975197619771978197919801981198219831984198519861987198819891990199119921993
  1. /*==================================================================================================
  2. * Project : RTD AUTOSAR 4.4
  3. * Platform : CORTEXM
  4. * Peripheral : DMA,CACHE,TRGMUX,FLEXIO
  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. #ifndef CDD_MCL_H_
  25. #define CDD_MCL_H_
  26. /**
  27. * @file CDD_Mcl.h
  28. *
  29. * @version 1.0.0
  30. *
  31. * @brief AUTOSAR Mcl - MCL driver header file.
  32. * @details
  33. *
  34. * @addtogroup MCL_DRIVER MCL Driver
  35. * @{
  36. */
  37. #ifdef __cplusplus
  38. extern "C"
  39. {
  40. #endif
  41. /**
  42. * @page misra_violations MISRA-C:2012 violations
  43. */
  44. /*==================================================================================================
  45. * INCLUDE FILES
  46. * 1) system and project includes
  47. * 2) needed interfaces from external units
  48. * 3) internal and external interfaces from this unit
  49. ==================================================================================================*/
  50. #include "CDD_Mcl_Cfg.h"
  51. #include "CDD_Mcl_Ipw.h"
  52. /*==================================================================================================
  53. * SOURCE FILE VERSION INFORMATION
  54. ==================================================================================================*/
  55. #define CDD_MCL_MODULE_ID_H 255
  56. #define CDD_MCL_VENDOR_ID_H 43
  57. #define CDD_MCL_AR_RELEASE_MAJOR_VERSION_H 4
  58. #define CDD_MCL_AR_RELEASE_MINOR_VERSION_H 4
  59. #define CDD_MCL_AR_RELEASE_REVISION_VERSION_H 0
  60. #define CDD_MCL_SW_MAJOR_VERSION_H 1
  61. #define CDD_MCL_SW_MINOR_VERSION_H 0
  62. #define CDD_MCL_SW_PATCH_VERSION_H 0
  63. /*==================================================================================================
  64. * FILE VERSION CHECKS
  65. ==================================================================================================*/
  66. /* Check if header file and CDD_Mcl_Cfg.h file are of the same vendor */
  67. #if (CDD_MCL_VENDOR_ID_H != CDD_MCL_CFG_VENDOR_ID_H)
  68. #error "CDD_Mcl.h and CDD_Mcl_Cfg.h have different vendor ids"
  69. #endif
  70. /* Check if header file and CDD_Mcl_Cfg.h file are of the same Autosar version */
  71. #if ((CDD_MCL_AR_RELEASE_MAJOR_VERSION_H != CDD_MCL_CFG_AR_RELEASE_MAJOR_VERSION_H) || \
  72. (CDD_MCL_AR_RELEASE_MINOR_VERSION_H != CDD_MCL_CFG_AR_RELEASE_MINOR_VERSION_H) || \
  73. (CDD_MCL_AR_RELEASE_REVISION_VERSION_H != CDD_MCL_CFG_AR_RELEASE_REVISION_VERSION_H) \
  74. )
  75. #error "AutoSar Version Numbers of CDD_Mcl.h and CDD_Mcl_Cfg.h are different"
  76. #endif
  77. /* Check if header file and CDD_Mcl_Cfg.h file are of the same Software version */
  78. #if ((CDD_MCL_SW_MAJOR_VERSION_H != CDD_MCL_CFG_SW_MAJOR_VERSION_H) || \
  79. (CDD_MCL_SW_MINOR_VERSION_H != CDD_MCL_CFG_SW_MINOR_VERSION_H) || \
  80. (CDD_MCL_SW_PATCH_VERSION_H != CDD_MCL_CFG_SW_PATCH_VERSION_H) \
  81. )
  82. #error "Software Version Numbers of CDD_Mcl.h and CDD_Mcl_Cfg.h are different"
  83. #endif
  84. /* Check if header file and CDD_Mcl_Ipw.h file are of the same vendor */
  85. #if (CDD_MCL_VENDOR_ID_H != CDD_MCL_IPW_VENDOR_ID_H)
  86. #error "CDD_Mcl.h and CDD_Mcl_Ipw.h have different vendor ids"
  87. #endif
  88. /* Check if header file and CDD_Mcl_Ipw.h file are of the same Autosar version */
  89. #if ((CDD_MCL_AR_RELEASE_MAJOR_VERSION_H != CDD_MCL_IPW_AR_RELEASE_MAJOR_VERSION_H) || \
  90. (CDD_MCL_AR_RELEASE_MINOR_VERSION_H != CDD_MCL_IPW_AR_RELEASE_MINOR_VERSION_H) || \
  91. (CDD_MCL_AR_RELEASE_REVISION_VERSION_H != CDD_MCL_IPW_AR_RELEASE_REVISION_VERSION_H) \
  92. )
  93. #error "AutoSar Version Numbers of CDD_Mcl.h and CDD_Mcl_Ipw.h are different"
  94. #endif
  95. /* Check if header file and CDD_Mcl_Ipw.h file are of the same Software version */
  96. #if ((CDD_MCL_SW_MAJOR_VERSION_H != CDD_MCL_IPW_SW_MAJOR_VERSION_H) || \
  97. (CDD_MCL_SW_MINOR_VERSION_H != CDD_MCL_IPW_SW_MINOR_VERSION_H) || \
  98. (CDD_MCL_SW_PATCH_VERSION_H != CDD_MCL_IPW_SW_PATCH_VERSION_H) \
  99. )
  100. #error "Software Version Numbers of CDD_Mcl.h and CDD_Mcl_Ipw.h are different"
  101. #endif
  102. /*==================================================================================================
  103. * CONSTANTS
  104. ==================================================================================================*/
  105. /*==================================================================================================
  106. * DEFINES AND MACROS
  107. ==================================================================================================*/
  108. /* DET APIs */
  109. /**
  110. * @brief API service ID for Mcl_Init function
  111. * @details Parameters used when raising an error/exception
  112. * */
  113. #define MCL_DET_INIT ((uint8)0x00U)
  114. #if (MCL_DMA_IS_AVAILABLE == STD_ON)
  115. /**
  116. * @brief API service ID for Mcl_SetDmaInstanceCommand function
  117. * @details Parameters used when raising an error/exception
  118. * */
  119. #define MCL_DET_DMA_INSTANCE_COMMAND ((uint8)0x01U)
  120. /**
  121. * @brief API service ID for Mcl_GetDmaInstanceStatus function
  122. * @details Parameters used when raising an error/exception
  123. * */
  124. #define MCL_DET_DMA_INSTANCE_STATUS ((uint8)0x02U)
  125. /**
  126. * @brief API service ID for Mcl_SetDmaChannelCommand function
  127. * @details Parameters used when raising an error/exception
  128. * */
  129. #define MCL_DET_DMA_CHANNEL_COMMAND ((uint8)0x03U)
  130. /**
  131. * @brief API service ID for Mcl_GetDmaChannelStatus function
  132. * @details Parameters used when raising an error/exception
  133. * */
  134. #define MCL_DET_DMA_CHANNEL_STATUS ((uint8)0x04U)
  135. /**
  136. * @brief API service ID for Mcl_SetDmaChannelGlobalList function
  137. * @details Parameters used when raising an error/exception
  138. * */
  139. #define MCL_DET_DMA_GLOBAL ((uint8)0x05U)
  140. /**
  141. * @brief API service ID for Mcl_SetDmaChannelTransferList function
  142. * @details Parameters used when raising an error/exception
  143. * */
  144. #define MCL_DET_DMA_TRANSFER ((uint8)0x06U)
  145. /**
  146. * @brief API service ID for Mcl_SetDmaChannelScatterGatherList function
  147. * @details Parameters used when raising an error/exception
  148. * */
  149. #define MCL_DET_DMA_SCATTER_GATHER_LIST ((uint8)0x07U)
  150. /**
  151. * @brief API service ID for Mcl_GetDmaChannelParam function
  152. * @details Parameters used when raising an error/exception
  153. * */
  154. #define MCL_DET_DMA_INFORMATION ((uint8)0x08U)
  155. /**
  156. * @brief API service ID for Mcl_SetDmaChannelScatterGatherConfig function
  157. * @details Parameters used when raising an error/exception
  158. * */
  159. #define MCL_DET_DMA_SCATTER_GATHER_CONFIG ((uint8)0x09U)
  160. #if (MCL_DMA_CRC_IS_AVAILABLE == STD_ON)
  161. /**
  162. * @brief API service ID for Mcl_SetDmaChannelCrcList function
  163. * @details Parameters used when raising an error/exception
  164. * */
  165. #define MCL_DET_DMA_CRC ((uint8)0x0AU)
  166. #endif /* (MCL_DMA_CRC_IS_AVAILABLE == STD_ON) */
  167. #endif /* (MCL_DMA_IS_AVAILABLE == STD_ON) */
  168. /**
  169. * @brief API service ID for Mcl_DeInit function
  170. * @details Parameters used when raising an error/exception
  171. * */
  172. #define MCL_DET_DEINIT ((uint8)0x0BU)
  173. #if (MCL_CACHE_IS_AVAILABLE == STD_ON)
  174. /**
  175. * @brief API service ID for Mcl_CacheEnable function
  176. * @details Parameters used when raising an error/exception
  177. * */
  178. #define MCL_DET_CACHE_ENABLE ((uint8)0x10U)
  179. /**
  180. * @brief API service ID for Mcl_CacheDisable function
  181. * @details Parameters used when raising an error/exception
  182. * */
  183. #define MCL_DET_CACHE_DISABLE ((uint8)0x11U)
  184. /**
  185. * @brief API service ID for Mcl_CacheInvalidate function
  186. * @details Parameters used when raising an error/exception
  187. * */
  188. #define MCL_DET_CACHE_INVALIDATE ((uint8)0x12U)
  189. /**
  190. * @brief API service ID for Mcl_CacheClean function
  191. * @details Parameters used when raising an error/exception
  192. * */
  193. #define MCL_DET_CACHE_CLEAN ((uint8)0x13U)
  194. /**
  195. * @brief API service ID for Mcl_CacheInvalidateByAddr function
  196. * @details Parameters used when raising an error/exception
  197. * */
  198. #define MCL_DET_CACHE_INVALIDATE_BY_ADDRESS ((uint8)0x14U)
  199. /**
  200. * @brief API service ID for Mcl_CacheCleanByAddr function
  201. * @details Parameters used when raising an error/exception
  202. * */
  203. #define MCL_DET_CACHE_CLEAN_BY_ADDRESS ((uint8)0x15U)
  204. #endif /* if (MCL_CACHE_IS_AVAILABLE == STD_ON) */
  205. #if (MCL_TRGMUX_IS_AVAILABLE == STD_ON)
  206. /**
  207. * @brief API service ID for Mcl_SetTrgMuxInput function
  208. * @details Parameters used when raising an error/exception
  209. * */
  210. #define MCL_DET_TRGMUX_INPUT ((uint8)0x20U)
  211. /**
  212. * @brief API service ID for Mcl_SetTrgMuxLock function
  213. * @details Parameters used when raising an error/exception
  214. * */
  215. #define MCL_DET_TRGMUX_LOCK ((uint8)0x21U)
  216. #endif /* MCL_TRGMUX_IS_AVAILABLE */
  217. #if (MCL_LCU_IS_AVAILABLE == STD_ON)
  218. #if (MCL_LCU_ASYNC_FUNC_IS_AVAILABLE == STD_ON)
  219. /**
  220. * @brief API service ID for Mcl_SetLcuAsyncInputList function
  221. * @details Parameters used when raising an error/exception
  222. * */
  223. #define MCL_DET_LCU_ASYNC_SET_INPUT ((uint8)0x47U)
  224. /**
  225. * @brief API service ID for Mcl_SetLcuAsyncOutputList function
  226. * @details Parameters used when raising an error/exception
  227. * */
  228. #define MCL_DET_LCU_ASYNC_SET_OUTPUT ((uint8)0x48U)
  229. #endif /* #if (MCL_LCU_ASYNC_FUNC_IS_AVAILABLE == STD_ON) */
  230. #if (MCL_LCU_SYNC_FUNC_IS_AVAILABLE == STD_ON)
  231. /**
  232. * @brief API service ID for Mcl_SetLcuSyncInputSwOverrideEnable function
  233. * @details Parameters used when raising an error/exception
  234. * */
  235. #define MCL_DET_LCU_SYNC_SET_INPUT_SW_OVERRIDE_EN ((uint8)0x30U)
  236. /**
  237. * @brief API service ID for Mcl_SetLcuSyncInputSwOverrideValue function
  238. * @details Parameters used when raising an error/exception
  239. * */
  240. #define MCL_DET_LCU_SYNC_SET_INPUT_SW_OVERRIDE_VALUE ((uint8)0x31U)
  241. /**
  242. * @brief API service ID for Mcl_SetLcuSyncInputMuxSelect function
  243. * @details Parameters used when raising an error/exception
  244. * */
  245. #define MCL_DET_LCU_SYNC_SET_INPUT_MUX_SEL ((uint8)0x32U)
  246. /**
  247. * @brief API service ID for Mcl_SetLcuSyncInputSwSyncMode function
  248. * @details Parameters used when raising an error/exception
  249. * */
  250. #define MCL_DET_LCU_SYNC_SET_INPUT_SW_SYNC_MODE ((uint8)0x33U)
  251. /**
  252. * @brief API service ID for Mcl_SetLcuSyncOutputDebugMode function
  253. * @details Parameters used when raising an error/exception
  254. * */
  255. #define MCL_DET_LCU_SYNC_SET_OUTPUT_DEBUG_MODE_EN ((uint8)0x34U)
  256. /**
  257. * @brief API service ID for Mcl_SetLcuSyncOutputEnable function
  258. * @details Parameters used when raising an error/exception
  259. * */
  260. #define MCL_DET_LCU_SYNC_SET_OUTPUT_ENABLE ((uint8)0x35U)
  261. /**
  262. * @brief API service ID for Mcl_SetLcuSyncOutputForceInputSensitivity function
  263. * @details Parameters used when raising an error/exception
  264. * */
  265. #define MCL_DET_LCU_SYNC_SET_OUTPUT_FORCE_SENSITIVITY ((uint8)0x36U)
  266. /**
  267. * @brief API service ID for Mcl_SetLcuSyncOutputForceClearingMode function
  268. * @details Parameters used when raising an error/exception
  269. * */
  270. #define MCL_DET_LCU_SYNC_SET_OUTPUT_FORCE_CLEAR_MODE ((uint8)0x37U)
  271. /**
  272. * @brief API service ID for Mcl_SetLcuSyncOutputForceSyncSelect function
  273. * @details Parameters used when raising an error/exception
  274. * */
  275. #define MCL_DET_LCU_SYNC_SET_OUTPUT_FORCE_SYNC_SEL ((uint8)0x38U)
  276. /**
  277. * @brief API service ID for Mcl_SetLcuSyncOutputPolarity function
  278. * @details Parameters used when raising an error/exception
  279. * */
  280. #define MCL_DET_LCU_SYNC_SET_OUTPUT_POLARITY ((uint8)0x39U)
  281. /**
  282. * @brief API service ID for Mcl_SetLcuSyncOutputForceDma function
  283. * @details Parameters used when raising an error/exception
  284. * */
  285. #define MCL_DET_LCU_SYNC_SET_OUTPUT_FORCE_DMA ((uint8)0x3AU)
  286. /**
  287. * @brief API service ID for Mcl_SetLcuSyncOutputForceInt function
  288. * @details Parameters used when raising an error/exception
  289. * */
  290. #define MCL_DET_LCU_SYNC_SET_OUTPUT_FORCE_INT ((uint8)0x3CU)
  291. /**
  292. * @brief API service ID for Mcl_SetLcuSyncOutputLutDma function
  293. * @details Parameters used when raising an error/exception
  294. * */
  295. #define MCL_DET_LCU_SYNC_SET_OUTPUT_LUT_DMA ((uint8)0x3BU)
  296. /**
  297. * @brief API service ID for Mcl_SetLcuSyncOutputLutInt function
  298. * @details Parameters used when raising an error/exception
  299. * */
  300. #define MCL_DET_LCU_SYNC_SET_OUTPUT_LUT_INT ((uint8)0x3DU)
  301. /**
  302. * @brief API service ID for Mcl_SetLcuSyncOutputFallFilter function
  303. * @details Parameters used when raising an error/exception
  304. * */
  305. #define MCL_DET_LCU_SYNC_SET_OUTPUT_FALL_FILTER ((uint8)0x3EU)
  306. /**
  307. * @brief API service ID for Mcl_SetLcuSyncOutputRiseFilter function
  308. * @details Parameters used when raising an error/exception
  309. * */
  310. #define MCL_DET_LCU_SYNC_SET_OUTPUT_RISE_FILTER ((uint8)0x3FU)
  311. /**
  312. * @brief API service ID for Mcl_SetLcuSyncOutputLutControl function
  313. * @details Parameters used when raising an error/exception
  314. * */
  315. #define MCL_DET_LCU_SYNC_SET_OUTPUT_LUT_CONTROL ((uint8)0x40U)
  316. /**
  317. * @brief API service ID for Mcl_ClearLcuSyncOutputForceEvent function
  318. * @details Parameters used when raising an error/exception
  319. * */
  320. #define MCL_DET_LCU_SYNC_CLEAR_OUTPUT_FORCE_EVENT ((uint8)0x49U)
  321. /**
  322. * @brief API service ID for Mcl_GetLcuSyncLogicInput function
  323. * @details Parameters used when raising an error/exception
  324. * */
  325. #define MCL_DET_LCU_SYNC_GET_LOGIC_INPUT ((uint8)0x41U)
  326. /**
  327. * @brief API service ID for Mcl_GetLcuSyncSwOverrideInput function
  328. * @details Parameters used when raising an error/exception
  329. * */
  330. #define MCL_DET_LCU_SYNC_GET_SW_OVERRIDE_INPUT ((uint8)0x42U)
  331. /**
  332. * @brief API service ID for Mcl_GetLcuSyncLogicOutput function
  333. * @details Parameters used when raising an error/exception
  334. * */
  335. #define MCL_DET_LCU_SYNC_GET_LOGIC_OUTPUT ((uint8)0x43U)
  336. /**
  337. * @brief API service ID for Mcl_GetLcuSyncForceOutput function
  338. * @details Parameters used when raising an error/exception
  339. * */
  340. #define MCL_DET_LCU_SYNC_GET_FORCE_OUTPUT ((uint8)0x44U)
  341. /**
  342. * @brief API service ID for Mcl_GetLcuSyncForceStatus function
  343. * @details Parameters used when raising an error/exception
  344. * */
  345. #define MCL_DET_LCU_SYNC_GET_FORCE_STATUS ((uint8)0x45U)
  346. /**
  347. * @brief API service ID for Mcl_GetLcuSyncCombineForceInput function
  348. * @details Parameters used when raising an error/exception
  349. * */
  350. #define MCL_DET_LCU_SYNC_GET_COMBINE_FORCE_INPUT ((uint8)0x46U)
  351. #endif /* #if (MCL_LCU_SYNC_FUNC_IS_AVAILABLE == STD_ON) */
  352. /**
  353. * @brief API service ID for Mcl_GetLcuSyncCombineForceInput function
  354. * @details Parameters used when raising an error/exception
  355. * */
  356. #define MCL_DET_LCU_SET_WRITE_PROTECT ((uint8)0x4CU)
  357. #if (MCL_LCU_ASYNC_FUNC_IS_AVAILABLE == STD_ON)
  358. /**
  359. * @brief API service ID for Mcl_SetLcuAsyncInputList function
  360. * @details Parameters used when raising an error/exception
  361. * */
  362. #define MCL_DET_LCU_ASYNC_GET_INPUT_INFO ((uint8)0x4AU)
  363. /**
  364. * @brief API service ID for Mcl_SetLcuAsyncOutputList function
  365. * @details Parameters used when raising an error/exception
  366. * */
  367. #define MCL_DET_LCU_ASYNC_GET_OUTPUT_INFO ((uint8)0x4BU)
  368. #endif /* #if (MCL_LCU_ASYNC_FUNC_IS_AVAILABLE == STD_ON) */
  369. #endif /* #if (MCL_LCU_IS_AVAILABLE == STD_ON) */
  370. #if (MCL_EMIOS_IS_AVAILABLE == STD_ON)
  371. /** @brief All API's called with wrong logic channel shall return this error. */
  372. #define MCL_DET_EMIOS_E_INVALID_CHANNEL ((uint8)0x50)
  373. /** @brief All API's called with wrong logic channel shall return this error. */
  374. #define MCL_DET_EMIOS_E_INVALID_SET ((uint8)0x51)
  375. #endif /* MCL_EMIOS_IS_AVAILABLE == STD_ON */
  376. /* DET ERRORS */
  377. /**
  378. * @brief All API's having pointers as parameters shall return this error if
  379. * called with with a NULL value
  380. * @implements MCL_E_UNINIT_define
  381. * */
  382. #define MCL_E_UNINIT ((uint8)0x00)
  383. /**
  384. * @brief All API's having pointers as parameters shall return this error if
  385. * called with with a NULL value
  386. * @implements MCL_E_PARAM_POINTER_define
  387. * */
  388. #define MCL_E_PARAM_POINTER ((uint8)0x01)
  389. /**
  390. * @brief All API's called with wrong instance shall return this error
  391. * @implements MCL_E_INVALID_INSTANCE_define
  392. * */
  393. #define MCL_E_INVALID_INSTANCE ((uint8)0x02)
  394. /**
  395. * @brief All API's called with wrong channel shall return this error
  396. * @implements MCL_E_INVALID_CHANNEL_define
  397. * */
  398. #define MCL_E_INVALID_CHANNEL ((uint8)0x03)
  399. /**
  400. * @brief All API's called with wrong instance shall return this error
  401. * @implements MCL_E_INVALID_COMMAND_define
  402. * */
  403. #define MCL_E_INVALID_COMMAND ((uint8)0x04)
  404. /**
  405. * @brief All API's called with wrong read parameter shall return this error
  406. * @implements MCL_E_INVALID_PARAMETER_define
  407. * */
  408. #define MCL_E_INVALID_PARAMETER ((uint8)0x05)
  409. /**
  410. * @brief All API's called in wrong sequence shall return this error
  411. * @implements MCL_E_INVALID_STATE_define
  412. * */
  413. #define MCL_E_INVALID_STATE ((uint8)0x06)
  414. /**
  415. * @brief All API's called while hardware has error status shall return this error
  416. * @implements MCL_E_INCONSISTENCY_define
  417. * */
  418. #define MCL_E_INCONSISTENCY ((uint8)0x07)
  419. /**
  420. * @brief All API's called with a timeout value shall return this error if execution
  421. * is not finished in the allocated timeframe
  422. * @implements MCL_E_TIMEOUT_define
  423. * */
  424. #define MCL_E_TIMEOUT ((uint8)0x08)
  425. /**
  426. * @brief If DET error reporting is enabled, the MCL will check upon each API call
  427. * if the requested resource is configured to be available on the current core,
  428. * and in case of error will return MCL_E_PARAM_CONFIG.
  429. * @implements MCL_E_PARAM_CONFIG_define
  430. * */
  431. #define MCL_E_PARAM_CONFIG ((uint8)0x09)
  432. /**
  433. * @brief If DET error reporting is enabled, the MCL will check if registers are protected
  434. * */
  435. #define MCL_E_PROTECTED ((uint8)0x0A)
  436. /**
  437. * @brief If VariantPreCompile is used, the configuration pointer shall have a NULL_PTR value.
  438. * If VariantPostBuild is used, the configuration pointer shall be different from NULL_PTR.
  439. * And in case of violate will return MCL_E_INIT_FAILED.
  440. * */
  441. #define MCL_E_INIT_FAILED ((uint8)0x0B)
  442. /*==================================================================================================
  443. * ENUMS
  444. ==================================================================================================*/
  445. #if (MCL_DMA_IS_AVAILABLE == STD_ON)
  446. /**
  447. * @brief This type contains the Mcl Dma Instance Commands.
  448. * @details The Commands trigger specific actions in the Dma Instance.
  449. *
  450. * @implements Mcl_DmaInstanceCmdType_enum
  451. * */
  452. typedef enum{
  453. MCL_DMA_INST_STOP = 0U, /**< @brief The Stop Command stops the executing channel and forces the Minor Loop to finish. */
  454. MCL_DMA_INST_STOP_ERROR = 1U, /**< @brief The StopError Command stops the executing channel, forces the Minor Loop to finish and generates an error interrupt. */
  455. MCL_DMA_INST_PAUSE = 2U, /**< @brief The Pause Command allows the ongoing transfer to finish and pauses any new transfer. */
  456. MCL_DMA_INST_RESUME = 3U, /**< @brief The Resume Command allows the transfer to continue. */
  457. }Mcl_DmaInstanceCmdType;
  458. /**
  459. * @brief This type contains the Mcl Dma Channel Commands.
  460. * @details The Commands trigger specific actions in the Dma Channel.
  461. *
  462. * @implements Mcl_DmaChannelCmdType_enum
  463. * */
  464. typedef enum{
  465. MCL_DMA_CH_START_REQUEST = 0U, /**< @brief The Start Request Command enables the Dma Channel to be triggered by hardware requests. */
  466. MCL_DMA_CH_STOP_REQUEST = 1U, /**< @brief The Stop Request Command disables the Dma Channel to be triggered by hardware requests. */
  467. MCL_DMA_CH_START_SERVICE = 2U, /**< @brief The Start Service Command sends a start request to the Dma Channel. */
  468. MCL_DMA_CH_ACK_DONE = 3U, /**< @brief The Ack Done Command resets the Dma Channel Done status. */
  469. MCL_DMA_CH_ACK_ERROR = 4U, /**< @brief The Ack Error Command resets the Dma Channel Error status. */
  470. }Mcl_DmaChannelCmdType;
  471. /**
  472. * @brief This type contains the Mcl Dma Channel Global Parameters.
  473. * @details The Parameters set specific functionalities.
  474. *
  475. * @implements Mcl_DmaChannelGlobalParamType_enum
  476. * */
  477. typedef enum{
  478. #if (MCL_DMA_MASTER_ID_REPLICATION_IS_AVAILABLE == STD_ON)
  479. MCL_DMA_CH_SET_EN_MASTER_ID_REPLICATION = 0U, /**< @brief [BOOLEAN] The EnMasterIdReplication Parameter sets the Dma Channel to use the same protection level and system bus ID of the master programming the Dma Channel. */
  480. #endif
  481. #if (MCL_DMA_BUFFERED_WRITES_IS_AVAILABLE == STD_ON)
  482. MCL_DMA_CH_SET_EN_BUFFERED_WRITES = 1U, /**< @brief [BOOLEAN] The EnBufferedWrites Parameter sets the Dma Channel writes to be bufferable. */
  483. #endif
  484. MCL_DMA_CH_SET_EN_MUX_SOURCE_REQ = 2U, /**< @brief [BOOLEAN] The EnMuxSource Parameter enables the Dma Channel Mux Source. */
  485. MCL_DMA_CH_SET_MUX_SOURCE_REQ = 3U, /**< @brief [VALUE] The MuxSource Parameter sets the Dma Channel Mux Source value. */
  486. MCL_DMA_CH_SET_EN_MUX_TRIGGER = 4U, /**< @brief [BOOLEAN] The EnMuxTrigger Parameter enables the Dma Channel Mux Trigger. */
  487. MCL_DMA_CH_SET_EN_HARDWARE_REQ = 5U, /**< @brief [BOOLEAN] The EnRequest Parameter enables the Dma Channel Request. */
  488. MCL_DMA_CH_SET_EN_ERROR_INTERRUPT = 6U, /**< @brief [BOOLEAN] The EnError Parameter enables the Dma Channel Error Interrupt. */
  489. MCL_DMA_CH_SET_GROUP_PRIORITY = 7U, /**< @brief [VALUE] The Group Parameter sets the Dma Channel Group Priority. */
  490. MCL_DMA_CH_SET_LEVEL_PRIORITY = 8U, /**< @brief [VALUE] The Level Parameter sets the Dma Channel Level Priority. */
  491. #if (MCL_DMA_PREEMPTION_IS_AVAILABLE == STD_ON)
  492. MCL_DMA_CH_SET_EN_PREEMPTION_PRIORITY = 9U, /**< @brief [BOOLEAN] The EnPreemption Parameter enables the Dma Channel Preemption. */
  493. #endif
  494. #if (MCL_DMA_DISABLE_PREEMPT_IS_AVAILABLE == STD_ON)
  495. MCL_DMA_CH_SET_DIS_PREEMPT_PRIORITY = 10U, /**< @brief [BOOLEAN] The DisPreempt Parameter disables the Dma Channel Preempt. */
  496. #endif
  497. }Mcl_DmaChannelGlobalParamType;
  498. /**
  499. * @brief This type contains the Mcl Dma Channel Transfer Parameters.
  500. * @details The Parameters set specific functionalities.
  501. *
  502. * @implements Mcl_DmaChannelTransferParamType_enum
  503. * */
  504. typedef enum{
  505. MCL_DMA_CH_SET_SOURCE_ADDRESS = 0U, /**< @brief [VALUE] The Source Address Parameter sets the Dma Channel source address value. */
  506. MCL_DMA_CH_SET_SOURCE_SIGNED_OFFSET = 1U, /**< @brief [VALUE] The Source Signed Offset Parameter sets the Dma Channel source signed offset value. */
  507. MCL_DMA_CH_SET_SOURCE_SIGNED_LAST_ADDR_ADJ = 2U, /**< @brief [VALUE] The Source Signed Last Address Adjustment Parameter sets the Dma Channel source signed last address adjustment. */
  508. MCL_DMA_CH_SET_SOURCE_TRANSFER_SIZE = 3U, /**< @brief [VALUE] The Source Transfer Size Parameter sets the Dma Channel source transfer size. */
  509. MCL_DMA_CH_SET_SOURCE_MODULO = 4U, /**< @brief [VALUE] The Source Modulo Parameter sets the Dma Channel source modulo. */
  510. MCL_DMA_CH_SET_DESTINATION_ADDRESS = 5U, /**< @brief [VALUE] The Destination Address Parameter sets the Dma Channel destination address value. */
  511. MCL_DMA_CH_SET_DESTINATION_SIGNED_OFFSET = 6U, /**< @brief [VALUE] The Destination Signed Offset Parameter sets the Dma Channel destination signed offset value. */
  512. MCL_DMA_CH_SET_DESTINATION_SIGNED_LAST_ADDR_ADJ = 7U, /**< @brief [VALUE] The Destination Signed Last Address Adjustment Parameter sets the Dma Channel destination signed last address adjustment. */
  513. MCL_DMA_CH_SET_DESTINATION_TRANSFER_SIZE = 8U, /**< @brief [VALUE] The Destination Transfer Size Parameter sets the Dma Channel destination transfer size. */
  514. MCL_DMA_CH_SET_DESTINATION_MODULO = 9U, /**< @brief [VALUE] The Destination Modulo Parameter sets the Dma Channel destination modulo. */
  515. MCL_DMA_CH_SET_MINORLOOP_EN_SRC_OFFSET = 10U, /**< @brief [BOOLEAN] The Minor Loop Enable Source Offset Parameter enables the Dma Channel minor loop source offset. */
  516. MCL_DMA_CH_SET_MINORLOOP_EN_DST_OFFSET = 11U, /**< @brief [BOOLEAN] The Minor Loop Enable Destination Offset Parameter enables the Dma Channel minor loop destination offset. */
  517. MCL_DMA_CH_SET_MINORLOOP_SIGNED_OFFSET = 12U, /**< @brief [VALUE] The Minor Loop Signed Offset Parameter sets the Dma Channel minor loop signed offset. */
  518. MCL_DMA_CH_SET_MINORLOOP_EN_LINK = 13U, /**< @brief [BOOLEAN] The Minor Loop Enable Link Parameter enables the Dma Channel minor loop logic channel linking. */
  519. MCL_DMA_CH_SET_MINORLOOP_LOGIC_LINK_CH = 14U, /**< @brief [VALUE] The Minor Loop Logic Channel Link Parameter sets the Dma Channel minor loop logic channel link. */
  520. MCL_DMA_CH_SET_MINORLOOP_SIZE = 15U, /**< @brief [VALUE] The Minor Loop Size Parameter sets the Dma Channel minor loop transfer size. */
  521. MCL_DMA_CH_SET_MAJORLOOP_EN_LINK = 16U, /**< @brief [BOOLEAN] The Major Loop Enable Link Parameter enables the Dma Channel major loop logic channel linking. */
  522. MCL_DMA_CH_SET_MAJORLOOP_LOGIC_LINK_CH = 17U, /**< @brief [VALUE] The Major Loop Logic Channel Link Parameter sets the Dma Channel major loop logic channel link. */
  523. MCL_DMA_CH_SET_MAJORLOOP_COUNT = 18U, /**< @brief [VALUE] The Major Loop Count Parameter sets the Dma Channel major loop count. */
  524. #if (MCL_DMA_STORE_DST_ADDR_IS_AVAILABLE == STD_ON)
  525. MCL_DMA_CH_SET_CONTROL_STORE_DST_ADDR = 19U, /**< @brief [VALUE] The Store Destination Address Parameter saves the final destination address in system memory. */
  526. #endif
  527. MCL_DMA_CH_SET_CONTROL_SOFTWARE_REQUEST = 20U, /**< @brief [BOOLEAN] The Enable Start Parameter enables the Dma Channel start service request. */
  528. MCL_DMA_CH_SET_CONTROL_EN_MAJOR_INTERRUPT = 21U, /**< @brief [BOOLEAN] The Enable Major Interrupt Parameter enables the Dma Channel major interrupt. */
  529. MCL_DMA_CH_SET_CONTROL_EN_HALF_MAJOR_INTERRUPT = 22U, /**< @brief [BOOLEAN] The Enable Half Interrupt Parameter enables the Dma Channel half major interrupt. */
  530. MCL_DMA_CH_SET_CONTROL_DIS_AUTO_REQUEST = 23U, /**< @brief [BOOLEAN] The Disable Automatic Request Parameter disables the Dma Channel automatic request. */
  531. #if (MCL_DMA_END_OF_PACKET_SIGNAL_IS_AVAILABLE == STD_ON)
  532. MCL_DMA_CH_SET_CONTROL_EN_END_OF_PACKET_SIGNAL = 24U, /**< @brief [BOOLEAN] The Enable End Of Packet Signal Parameter enables the Dma Channel end of packet signal. */
  533. #endif
  534. MCL_DMA_CH_SET_CONTROL_BANDWIDTH = 25U, /**< @brief [VALUE] The Bandwidth Control Parameter sets the Dma Channel bandwidth control. */
  535. }Mcl_DmaChannelTransferParamType;
  536. /**
  537. * @brief This type contains the Mcl Dma Channel State values.
  538. * @details The states represent the Channel status during runtime.
  539. *
  540. * @implements Mcl_DmaChannelStateType_enum
  541. * */
  542. typedef enum{
  543. MCL_DMA_CH_RESET_STATE = 0U,
  544. MCL_DMA_CH_READY_STATE = 1U,
  545. MCL_DMA_CH_TRANSFER_STATE = 2U,
  546. MCL_DMA_CH_SCATTERGATHER_STATE = 3U,
  547. MCL_DMA_CH_ERROR_STATE = 4U,
  548. }Mcl_DmaChannelStateType;
  549. #if (MCL_DMA_CRC_IS_AVAILABLE == STD_ON)
  550. /**
  551. * @brief This type contains the Mcl Dma Channel Crc Parameters.
  552. * @details The Parameters set specific functionalities.
  553. *
  554. * @implements Mcl_DmaChannelCrcParamType_enum
  555. * */
  556. typedef enum{
  557. MCL_DMA_CH_SET_CRC_MODE = 0U,
  558. MCL_DMA_CH_SET_CRC_POLYNOMIAL = 1U,
  559. MCL_DMA_CH_SET_CRC_EN_INITIAL_VALUE = 2U,
  560. MCL_DMA_CH_SET_CRC_INITIAL_VALUE = 3U,
  561. MCL_DMA_CH_SET_CRC_EN_LOGIC = 4U,
  562. }Mcl_DmaChannelCrcParamType;
  563. #endif
  564. /**
  565. * @brief This type contains the Mcl Dma Channel Information Parameters.
  566. * @details The Parameters get specific information.
  567. *
  568. * @implements Mcl_DmaChannelInfoParamType_enum
  569. * */
  570. typedef enum{
  571. MCL_DMA_CH_GET_SOURCE_ADDRESS = 0U, /**< @brief [VALUE] The Source Address Parameter gets the Dma Channel source address. */
  572. MCL_DMA_CH_GET_DESTINATION_ADDRESS = 1U, /**< @brief [VALUE] The Destination Address Parameter gets the Dma Channel destination address. */
  573. MCL_DMA_CH_GET_BEGIN_ITER_COUNT = 2U, /**< @brief [VALUE] The Begin Iteration Count Parameter gets the Dma Channel begin iteration count. */
  574. MCL_DMA_CH_GET_CURRENT_ITER_COUNT = 3U, /**< @brief [VALUE] The Current Iteration Count Parameter gets the Dma Channel current iteration count. */
  575. #if (MCL_DMA_STORE_DST_ADDR_IS_AVAILABLE == STD_ON)
  576. MCL_DMA_CH_GET_STORE_DST_ADDR = 4U, /**< @brief [VALUE] The Store Destination Address Parameter gets the Dma Channel stored destination address. */
  577. #endif
  578. #if (MCL_DMA_MASTER_ID_REPLICATION_IS_AVAILABLE == STD_ON)
  579. MCL_DMA_CH_GET_MASTER_ID = 5U, /**< @brief [VALUE] The Master Id Parameter gets the Dma Channel master id. */
  580. #endif
  581. MCL_DMA_CH_GET_MAJOR_INTERRUPT = 6U, /**< @brief [BOOLEAN] The Major Interrupt Parameter gets the Dma Channel major interrupt. */
  582. MCL_DMA_CH_GET_HALF_MAJOR_INTERRUPT = 7U, /**< @brief [BOOLEAN] The Half Major Interrupt Parameter gets the Dma Channel half major interrupt. */
  583. #if (MCL_DMA_CRC_IS_AVAILABLE == STD_ON)
  584. MCL_DMA_CH_GET_FINAL_CRC = 8U,
  585. #endif
  586. }Mcl_DmaChannelInfoParamType;
  587. #endif /* #if (MCL_DMA_IS_AVAILABLE == STD_ON) */
  588. #if (MCL_CACHE_IS_AVAILABLE == STD_ON)
  589. /**
  590. * @brief This type contains the Mcl Cache Type selection.
  591. * @details The Cache Types select specific cache memory types.
  592. *
  593. * @implements Mcl_CacheType_enum
  594. * */
  595. typedef enum{
  596. MCL_CACHE_ALL = 0U, /**< @brief The Cache All Parameter selects all cache types. */
  597. MCL_CACHE_INSTRUCTION = 1U, /**< @brief The Cache Instruction Parameter selects instruction cache type. */
  598. MCL_CACHE_DATA = 2U, /**< @brief The Cache Data Parameter selects data cache type. */
  599. }Mcl_CacheType;
  600. #endif /* #if (MCL_CACHE_IS_AVAILABLE == STD_ON) */
  601. #if (MCL_LCU_IS_AVAILABLE == STD_ON)
  602. /**
  603. * @brief This type contains the LCU Input Param Type.
  604. * @details The Parameters set specific functionalities for Input
  605. *
  606. * @implements Mcl_LcuInputParamType_enum
  607. * */
  608. typedef enum
  609. {
  610. MCL_LCU_IP_INPUT_SET_MUX_SEL = 0U, /**< @brief [MUXSEL] Input MUX Select. */
  611. MCL_LCU_IP_INPUT_SET_SW_SYNC_MODE = 1U, /**< @brief [SW_MODE] Specifies the software sync mode for the inputs to this LC.When Software Override is enabled (SWEN),these bits control whether Software Override Value (SWVALUE) changes occur immediately or on the rising edge of the selected sync pulse */
  612. MCL_LCU_IP_INPUT_SET_SW_OVERRIDE_EN = 2U, /**< @brief [SWEN] Software override input enable */
  613. MCL_LCU_IP_INPUT_SET_SW_VALUE = 3U /**< @brief [SWVALUE] Software override input value */
  614. }Mcl_LcuInputParamType;
  615. /**
  616. * @brief This type contains the LCU Output Param Type.
  617. * @details The Parameters set specific functionalities for Output
  618. *
  619. * @implements Mcl_LcuOutputParamType_enum
  620. * */
  621. typedef enum
  622. {
  623. MCL_LCU_IP_OUTPUT_SET_EN_DEBUG_MODE = 0U, /**< @brief [DBGEN] Enables outputs to continue operation in Debug mode */
  624. MCL_LCU_IP_OUTPUT_SET_OUTPUT_ENABLE = 1U, /**< @brief [OUTEN] Enables LC outputs */
  625. MCL_LCU_IP_OUTPUT_SET_LUT_CONTROL = 2U, /**< @brief [LUTCTRL] LUT control */
  626. MCL_LCU_IP_OUTPUT_SET_LUT_RISE_FILTER = 3U, /**< @brief [LUT_RISE_FILT] LUT Rise Filter */
  627. MCL_LCU_IP_OUTPUT_SET_LUT_FALL_FILTER = 4U, /**< @brief [LUT_FALL_FILT] LUT Fall Filter */
  628. MCL_LCU_IP_OUTPUT_SET_EN_FORCE_DMA = 5U, /**< @brief [LUT_DMA_EN] Enables the generation of a DMA request when an LUT event occurs */
  629. MCL_LCU_IP_OUTPUT_SET_EN_LUT_DMA = 6U, /**< @brief [FORCE_DMA_EN] Enables the generation of a DMA request when a force event occurs */
  630. MCL_LCU_IP_OUTPUT_SET_EN_FORCE_INT = 7U, /**< @brief [LUT_INT_EN] Enables the generation of an interrupt request when an LUT event */
  631. MCL_LCU_IP_OUTPUT_SET_EN_LUT_INT = 8U, /**< @brief [FORCE_INT_EN] Enables the generation of an interrupt request when a force event occurs */
  632. MCL_LCU_IP_OUTPUT_SET_INVERT_OUTPUT = 9U, /**< @brief [OUTPOL] Set Output Polarity: invert or not. */
  633. MCL_LCU_IP_OUTPUT_SET_FORCE_SIGNAL_SEL = 10U, /**< @brief [FORCE_SENSE] Select Force signal */
  634. MCL_LCU_IP_OUTPUT_SET_CLEAR_FORCE_MODE = 11U, /**< @brief [FORCE_MODE] Force Clearing Mode */
  635. MCL_LCU_IP_OUTPUT_SET_FORCE_SYNC_SEL = 12U, /**< @brief [SYNC_SEL] The Force Sync Select Parameter specifies which sync input to use for this output */
  636. MCL_LCU_IP_OUTPUT_CLEAR_FORCE_STS = 13U /**< @brief [FORCESTS] Clear force event in STS */
  637. }Mcl_LcuOutputParamType;
  638. /**
  639. * @brief This type contains the LCU Param Type to get information for input
  640. * @details The Parameters get specific functionalities for Input
  641. *
  642. * @implements Mcl_LcuInputInfoParamType_enum
  643. * */
  644. typedef enum
  645. {
  646. MCL_LCU_IP_INPUT_GET_LOGIC_INPUT_STATE = 0U,
  647. MCL_LCU_IP_INPUT_GET_SW_OVERRIDE_STATE = 1U,
  648. }Mcl_LcuInputInfoParamType;
  649. /**
  650. * @brief This type contains the LCU Param Type to get information for output
  651. * @details The Parameters get specific functionalities for Output
  652. *
  653. * @implements Mcl_LcuOutputInfoParamType_enum
  654. * */
  655. typedef enum
  656. {
  657. MCL_LCU_IP_OUTPUT_GET_LOGIC_OUTPUT_STATE = 0U,
  658. MCL_LCU_IP_OUTPUT_GET_FORCE_OUTPUT = 1U,
  659. MCL_LCU_IP_OUTPUT_GET_FORCE_STATUS = 2U,
  660. MCL_LCU_IP_OUTPUT_GET_LUT_STATUS = 3U,
  661. MCL_LCU_IP_OUTPUT_GET_COMBINE_FORCE_INPUT = 4U,
  662. }Mcl_LcuOutputInfoParamType;
  663. #endif /* #if (MCL_LCU_IS_AVAILABLE == STD_ON) */
  664. /*==================================================================================================
  665. * STRUCTURES AND OTHER TYPEDEFS
  666. ==================================================================================================*/
  667. #if (MCL_DMA_IS_AVAILABLE == STD_ON)
  668. /**
  669. * @brief This type contains the Mcl Dma Channel Global List.
  670. * @details The Mcl Dma Channel Global List contains a pair composed from Dma Channel Global Parameter
  671. * Type and the Value of the parameter.
  672. *
  673. * @implements Mcl_DmaChannelGlobalListType_struct
  674. * */
  675. typedef struct{
  676. Mcl_DmaChannelGlobalParamType Param; /**< @brief The Mcl Dma Channel Global Parameter Type selects a parameter form the Global Parameter enum type. */
  677. uint32 Value; /**< @brief The Value stores the parameter's value. */
  678. }Mcl_DmaChannelGlobalListType;
  679. /**
  680. * @brief This type contains the Mcl Dma Channel Transfer List.
  681. * @details The Mcl Dma Channel Transfer List contains a pair composed from Dma Channel Transfer
  682. * Parameter Type and the Value of the parameter.
  683. *
  684. * @implements Mcl_DmaChannelTransferListType_struct
  685. * */
  686. typedef struct{
  687. Mcl_DmaChannelTransferParamType Param; /**< @brief The Mcl Dma Channel Transfer Parameter Type selects a parameter form the Transfer Parameter enum type. */
  688. uint32 Value; /**< @brief The Value stores the parameter's value. */
  689. }Mcl_DmaChannelTransferListType;
  690. /**
  691. * @brief This type contains the Mcl Dma Channel Scatter/Gather List.
  692. * @details The Mcl Dma Channel Scatter/Gather List contains a pair composed from Dma Channel Scatter/Gather
  693. * Parameter Type and the Value of the parameter.
  694. *
  695. * @implements Mcl_DmaChannelScatterGatherListType_struct
  696. * */
  697. typedef struct{
  698. Mcl_DmaChannelTransferParamType Param; /**< @brief The Mcl Dma Channel Transfer Parameter Type selects a parameter form the Transfer Parameter enum type. */
  699. uint32 Value; /**< @brief The Value stores the parameter's value. */
  700. }Mcl_DmaChannelScatterGatherListType;
  701. #if (MCL_DMA_CRC_IS_AVAILABLE == STD_ON)
  702. /**
  703. * @brief This type contains the Mcl Dma Channel Crc List.
  704. * @details The Mcl Dma Channel Crc List contains a pair composed from Dma Channel Crc
  705. * Parameter Type and the Value of the parameter.
  706. *
  707. * @implements Mcl_DmaChannelCrcListType_struct
  708. * */
  709. typedef struct{
  710. Mcl_DmaChannelCrcParamType Param; /**< @brief The Mcl Dma Channel Crc Parameter Type selects a parameter form the Crc Parameter enum type. */
  711. uint32 Value; /**< @brief The Value stores the parameter's value. */
  712. }Mcl_DmaChannelCrcListType;
  713. #endif
  714. /**
  715. * @brief This type contains the Mcl Dma Instance Status.
  716. * @details The Mcl Dma Instance Status contains the Hardware Errors, Active Id and Active indication for
  717. * the running Dma Channel.
  718. *
  719. * @implements Mcl_DmaInstanceStatusType_struct
  720. * */
  721. typedef struct{
  722. uint32 Errors; /**< @brief [VALUE] The Errors value is read from the DMA Instance Error Register (ES) as it is. */
  723. uint8 ActiveId; /**< @brief [VALUE] The ActiveId value is read from the DMA Instance Control Register (CR) field ACTIVE_ID. */
  724. boolean Active; /**< @brief [BOOLEAN] The Active value is read from the DMA Instance Control Register (CR) field ACTIVE. */
  725. }Mcl_DmaInstanceStatusType;
  726. /**
  727. * @brief This type contains the Mcl Dma Channel Status.
  728. * @details The Mcl Dma Channel Status contains the Hardware Errors, Active status and Done indication for
  729. * the running Dma Channel.
  730. *
  731. * @implements Mcl_DmaChannelStatusType_struct
  732. * */
  733. typedef struct{
  734. Mcl_DmaChannelStateType ChannelState; /**< @brief [VALUE] The ChStateValue value is read from the internal DMA Driver Channel State Machine. Check UM for additional information. */
  735. uint32 Errors; /**< @brief [VALUE] The Errors value is read from the DMA Channel Error Register (CHx_ES) as it is. */
  736. boolean Active; /**< @brief [BOOLEAN] The Active value is read from the DMA Channel Control and Status Register (CHx_CSR) field ACTIVE. */
  737. boolean Done; /**< @brief [BOOLEAN] The Active value is read from the DMA Channel Control and Status Register (CHx_CSR) field DONE. */
  738. }Mcl_DmaChannelStatusType;
  739. #endif /* #if (MCL_DMA_IS_AVAILABLE == STD_ON) */
  740. #if (MCL_LCU_IS_AVAILABLE == STD_ON)
  741. /**
  742. * @brief This type contains the Mcl Lcu Multiple Inputs and Multiple Value.
  743. * @details The Mcl Lcu Multi Input Value contains a pair composed from Logic Input ID and the
  744. * Value of configuration.
  745. * The LogicInputId selects a Logic Input
  746. * The Value stores the configuration's value.
  747. * @implements Mcl_LcuSyncInputValueType_struct
  748. * */
  749. typedef struct{
  750. uint8 LogicInputId;
  751. uint8 Value;
  752. }Mcl_LcuSyncInputValueType;
  753. /**
  754. * @brief This type contains the Mcl Lcu Multiple Outputs and Multiple Value.
  755. * @details The Mcl Lcu Multi Output Value contains a pair composed from Logic Output ID and the
  756. * Value of configuration.
  757. * The LogicOutputId selects a Logic Output
  758. * The Value stores the configuration's value.
  759. * @implements Mcl_LcuSyncOutputValueType_struct
  760. * */
  761. typedef struct{
  762. uint8 LogicOutputId;
  763. uint16 Value;
  764. }Mcl_LcuSyncOutputValueType;
  765. /**
  766. * @brief This type contains the Mcl Lcu Input with multiple value
  767. * @details The Mcl Lcu Input with Multiple Value contains a pair composed from Input Parameter and
  768. * Value of the Parameter.
  769. * The Mcl Lcu Input Param Type selects a parameter from the Lcu_Ip_InputParamType enum
  770. * The Value stores the configuration's value.
  771. * @implements Mcl_LcuAsyncInputValueType_struct
  772. * */
  773. typedef struct{
  774. Mcl_LcuInputParamType Param;
  775. uint8 Value;
  776. }Mcl_LcuAsyncInputValueType;
  777. /**
  778. * @brief This type contains the Mcl Lcu Output with multiple value
  779. * @details The Mcl Lcu Output with Multiple Value contains a pair composed from Output Parameter
  780. * and Value of the Parameter.
  781. * The Mcl Lcu Output Param Type selects a parameter from the Lcu_Ip_OutputParamType enum
  782. * The Value stores the configuration's value.
  783. * @implements Mcl_LcuAsyncOutputValueType_struct
  784. * */
  785. typedef struct{
  786. Mcl_LcuOutputParamType Param;
  787. uint16 Value;
  788. }Mcl_LcuAsyncOutputValueType;
  789. #endif /* #if (MCL_LCU_IS_AVAILABLE == STD_ON) */
  790. /*==================================================================================================
  791. * GLOBAL VARIABLE DECLARATIONS
  792. ==================================================================================================*/
  793. /*==================================================================================================
  794. * FUNCTION PROTOTYPES
  795. ==================================================================================================*/
  796. #define MCL_START_SEC_CODE
  797. /* @violates @ref Mcl_Dma_h_REF_1 MISRA 2012 Required Directive 4.10, Precautions shall be taken in order to prevent the contents of a header file being included more than once. */
  798. #include "Mcl_MemMap.h"
  799. /**
  800. * @brief This function initializes the Mcl Driver.
  801. * @details This service is a non reentrant function that shall initialize the Mcl driver.
  802. * The initialization is applied for the enabled IPs, configured statically.
  803. *
  804. * @param[in] ConfigPtr Pointer to the configuration structure.
  805. *
  806. * @return void
  807. *
  808. * @implements Mcl_Init_Activity
  809. * */
  810. void Mcl_Init(const Mcl_ConfigType * const ConfigPtr);
  811. /**
  812. * @brief This function deinitializes the Mcl Driver.
  813. * @details This service is a non reentrant function that shall deinitialize the Mcl driver.
  814. * The deinitialization is applied for the enabled IPs, configured statically.
  815. *
  816. * @return void
  817. *
  818. * @implements Mcl_DeInit_Activity
  819. * */
  820. void Mcl_DeInit(void);
  821. #if (MCL_DMA_IS_AVAILABLE == STD_ON)
  822. /**
  823. * @brief This function sets Dma Instance Command.
  824. * @details This service is a reentrant function that shall command the Dma Instance.
  825. * The command shall trigger specific functionalities of the Dma Instance.
  826. *
  827. * @param[in] Instance Selection value of the Logic Instance.
  828. * @param[in] Command The command for the Logic Instance.
  829. *
  830. * @return void
  831. *
  832. * @implements Mcl_SetDmaInstanceCommand_Activity
  833. * */
  834. void Mcl_SetDmaInstanceCommand(const uint32 Instance, const Mcl_DmaInstanceCmdType Command);
  835. /**
  836. * @brief This function gets Dma Instance Status.
  837. * @details This service is a reentrant function that shall get the Dma Instance status.
  838. * The command shall read specific functionalities of the Dma Instance.
  839. *
  840. * @param[in] Instance Selection value of the Logic Instance.
  841. * @param[out] Status Pointer to the Dma Instance status.
  842. *
  843. * @return void
  844. *
  845. * @implements Mcl_GetDmaInstanceStatus_Activity
  846. * */
  847. void Mcl_GetDmaInstanceStatus(const uint32 Instance, Mcl_DmaInstanceStatusType * const Status);
  848. /**
  849. * @brief This function sets Dma Channel Command.
  850. * @details This service is a reentrant function that shall command the Dma Channel.
  851. * The command shall trigger specific functionalities of the Dma Channel.
  852. *
  853. * @param[in] Channel Specifies the Logic Channel Tag defined by the user.
  854. * @param[in] Command The command for the Logic Channel.
  855. *
  856. * @return void
  857. *
  858. * @implements Mcl_SetDmaChannelCommand_Activity
  859. * */
  860. void Mcl_SetDmaChannelCommand(const uint32 Channel, const Mcl_DmaChannelCmdType Command);
  861. /**
  862. * @brief This function gets Dma Channel Status.
  863. * @details This service is a reentrant function that shall get the Dma Channel status.
  864. * The command shall read specific functionalities of the Dma Channel.
  865. *
  866. * @param[in] Channel Specifies the Logic Channel Tag defined by the user.
  867. * @param[out] Status Pointer to the Dma Channel status.
  868. *
  869. * @return void
  870. *
  871. * @implements Mcl_GetDmaChannelStatus_Activity
  872. * */
  873. void Mcl_GetDmaChannelStatus(const uint32 Channel, Mcl_DmaChannelStatusType * const Status);
  874. /**
  875. * @brief This function sets Dma Channel Global List settings.
  876. * @details This service is a reentrant function that shall set the Dma Channel
  877. * global parameters list.
  878. * The list is composed of an array of Dma Channel global parameters settings.
  879. * The settings list(array) is defined by the user needs: it contains the
  880. * desired parameters to be configured, in any desired order.
  881. *
  882. * How to use this interface:
  883. * 1. Use the "Mcl_DmaChannelGlobalListType" to create a list(array) with the desired
  884. * paramaters to configure (see parameters: "Mcl_DmaChannelGlobalParamType")
  885. * The list can declared globally or locally:
  886. * Global example:
  887. * Mcl_DmaChannelGlobalListType global_Mcl_DmaChannelGlobalList0[NUMBER_OF_PARAMETERS] = {...};
  888. * Local example:
  889. * Mcl_DmaChannelGlobalListType Mcl_DmaChannelGlobalList[NUMBER_OF_PARAMETERS];
  890. * Mcl_DmaChannelGlobalList[PARAMETER0].Param = MCL_DMA_CH_SET_EN_BUFFERED_WRITES;
  891. * Mcl_DmaChannelGlobalList[PARAMETER0].Value = TRUE;
  892. * Mcl_DmaChannelGlobalList[PARAMETER1].Param = ...;
  893. * Mcl_DmaChannelGlobalList[PARAMETER1].Value = ...;
  894. * 2. Call the "Mcl_SetDmaChannelGlobalList()" interface:
  895. * Mcl_SetDmaChannelGlobalList(LOGIC_CHANNELx, Mcl_DmaChannelGlobalList, NUMBER_OF_PARAMETERS);
  896. *
  897. * @param[in] Channel Specifies the Logic Channel Tag defined by the user.
  898. * @param[in] List Pointer to the Global List Array.
  899. * @param[in] ListDimension Number of entries in the List.
  900. *
  901. * @return void
  902. *
  903. * @implements Mcl_SetDmaChannelGlobalList_Activity
  904. * */
  905. void Mcl_SetDmaChannelGlobalList(const uint32 Channel, const Mcl_DmaChannelGlobalListType List[], const uint32 ListDimension);
  906. /**
  907. * @brief This function sets Dma Channel Transfer List settings.
  908. * @details This service is a reentrant function that shall set the Dma Channel
  909. * transfer parameters list.
  910. * The list is composed of an array of Dma Channel transfer parameters settings.
  911. * The settings array is defined by the user needs: it contains entries for each desired
  912. * parameter to be configured, in any suitable order.
  913. *
  914. * How to use this interface:
  915. * 1. Use the "Mcl_DmaChannelTransferListType" to create a list(array) with the desired
  916. * paramaters to configure (see parameters: "Mcl_DmaChannelTransferParamType")
  917. * The list can declared globally or locally:
  918. * Global example:
  919. * Mcl_DmaChannelTransferListType global_Mcl_DmaChannelTransferList0[NUMBER_OF_PARAMETERS] = {...};
  920. * Local example:
  921. * Mcl_DmaChannelTransferListType Mcl_DmaChannelTransferList[NUMBER_OF_PARAMETERS];
  922. * Mcl_DmaChannelTransferList[PARAMETER0].Param = MCL_DMA_CH_SET_SOURCE_ADDRESS;
  923. * Mcl_DmaChannelTransferList[PARAMETER0].Value = &SourceBuffer;
  924. * Mcl_DmaChannelTransferList[PARAMETER1].Param = MCL_DMA_CH_SET_DESTINATION_ADDRESS;
  925. * Mcl_DmaChannelTransferList[PARAMETER1].Value = &DestinationBuffer;
  926. * 2. Call the "Mcl_SetDmaChannelTransferList()" interface:
  927. * Mcl_SetDmaChannelTransferList(LOGIC_CHANNELx, Mcl_DmaChannelTransferList, NUMBER_OF_PARAMETERS);
  928. *
  929. * @param[in] Channel Specifies the Logic Channel Tag defined by the user.
  930. * @param[in] List Pointer to the Transfer List Array.
  931. * @param[in] ListDimension Number of entries in the List.
  932. *
  933. * @return void
  934. *
  935. * @implements Mcl_SetDmaChannelTransferList_Activity
  936. * */
  937. void Mcl_SetDmaChannelTransferList(const uint32 Channel, const Mcl_DmaChannelTransferListType List[], const uint32 ListDimension);
  938. /**
  939. * @brief This function sets Dma Channel Scatter/Gather List settings.
  940. * @details This service is a reentrant function that shall set the Dma Channel
  941. * scatter/gather parameters list.
  942. * The Scatter/Gather List configures Logic Elements belonging to the same
  943. * Dma Logic Channel.
  944. * The settings array is defined by the user needs: it contains entries for
  945. * each desired parameter to be configured, in any suitable order.
  946. *
  947. * How to use this interface:
  948. * 1. Use the "Mcl_DmaChannelScatterGatherListType" to create a list(array) with the desired
  949. * paramaters to configure (see parameters: "Mcl_DmaChannelTransferParamType")
  950. * The list can declared globally or locally:
  951. * Global example:
  952. * Mcl_DmaChannelScatterGatherListType global_Mcl_DmaChannelScatterGatherList0[NUMBER_OF_PARAMETERS] = {...};
  953. * Local example:
  954. * Mcl_DmaChannelScatterGatherListType Mcl_DmaChannelScatterGatherList[NUMBER_OF_PARAMETERS];
  955. * Mcl_DmaChannelScatterGatherList[PARAMETER0].Param = MCL_DMA_CH_SET_SOURCE_ADDRESS;
  956. * Mcl_DmaChannelScatterGatherList[PARAMETER0].Value = &SourceBuffer;
  957. * Mcl_DmaChannelScatterGatherList[PARAMETER1].Param = MCL_DMA_CH_SET_DESTINATION_ADDRESS;
  958. * Mcl_DmaChannelScatterGatherList[PARAMETER1].Value = &DestinationBuffer;
  959. * 2. Call the "Mcl_SetDmaChannelScatterGatherList()" interface:
  960. * Mcl_SetDmaChannelScatterGatherList(LOGIC_CHANNELx, LOGIC_ELEMENTy, Mcl_DmaChannelScatterGatherList, NUMBER_OF_PARAMETERS);
  961. *
  962. * @param[in] Channel Specifies the Logic Channel Tag defined by the user.
  963. * @param[in] Element Specifies the Logic Element Id.
  964. * @param[in] List Pointer to the Scatter/Gather List Array.
  965. * @param[in] ListDimension Number of entries in the List.
  966. *
  967. * @return void
  968. *
  969. * @implements Mcl_SetDmaChannelScatterGatherList_Activity
  970. * */
  971. void Mcl_SetDmaChannelScatterGatherList(const uint32 Channel, const uint32 Element, const Mcl_DmaChannelScatterGatherListType List[],const uint32 ListDimension);
  972. #if (MCL_DMA_CRC_IS_AVAILABLE == STD_ON)
  973. /**
  974. * @brief This function sets Dma Channel Crc List settings.
  975. * @details This service is a reentrant function that shall set the Dma Channel
  976. * Crc parameters list.
  977. * The list is composed of an array of Dma Channel Crc parameters settings.
  978. * The settings array is defined by the user needs: it contains entries for each desired
  979. * parameter to be configured, in any suitable order.
  980. *
  981. * How to use this interface:
  982. * 1. Use the "Mcl_DmaChannelCrcListType" to create a list(array) with the desired
  983. * paramaters to configure (see parameters: "Mcl_DmaChannelCrcParamType")
  984. * The list can declared globally or locally:
  985. * Global example:
  986. * Mcl_DmaChannelCrcListType global_Mcl_DmaChannelCrcList0[NUMBER_OF_PARAMETERS] = {...};
  987. * Local example:
  988. * Mcl_DmaChannelCrcListType Mcl_DmaChannelCrcList[NUMBER_OF_PARAMETERS];
  989. * Mcl_DmaChannelCrcList[PARAMETER0].Param = MCL_DMA_CH_SET_CRC_POLYNOMIAL;
  990. * Mcl_DmaChannelCrcList[PARAMETER0].Value = ISCSICRC;
  991. * Mcl_DmaChannelCrcList[PARAMETER1].Param = MCL_DMA_CH_SET_CRC_EN_LOGIC;
  992. * Mcl_DmaChannelCrcList[PARAMETER1].Value = TRUE;
  993. * 2. Call the "Mcl_SetDmaChannelCrcList()" interface:
  994. * Mcl_SetDmaChannelCrcList(LOGIC_CHANNELx, Mcl_DmaChannelCrcList, NUMBER_OF_PARAMETERS);
  995. *
  996. * @param[in] Channel Specifies the Logic Channel Tag defined by the user.
  997. * @param[in] List Pointer to the Crc List Array.
  998. * @param[in] ListDimension Number of entries in the List.
  999. *
  1000. * @return void
  1001. *
  1002. * @implements Mcl_SetDmaChannelCrcList_Activity
  1003. * */
  1004. void Mcl_SetDmaChannelCrcList(const uint32 Channel, const Mcl_DmaChannelCrcListType List[], const uint32 ListDimension);
  1005. #endif
  1006. /**
  1007. * @brief This function gets the Dma Channel Parameter value.
  1008. * @details This service is a reentrant function that shall get the Dma Channel
  1009. * parameters value.
  1010. *
  1011. * @param[in] Channel Specifies the Logic Channel Tag defined by the user.
  1012. * @param[in] Param Selection parameter.
  1013. * @param[out] Value Pointer to the parameter value.
  1014. *
  1015. * @return void
  1016. *
  1017. * @implements Mcl_GetDmaChannelParam_Activity
  1018. * */
  1019. void Mcl_GetDmaChannelParam(const uint32 Channel, const Mcl_DmaChannelInfoParamType Param, uint32 * const Value);
  1020. /**
  1021. * @brief This function configures the Dma Channel Scatter/Gather.
  1022. * @details This service is a reentrant function that shall configure the Dma Channel
  1023. * scatter/gather functionality.
  1024. * The Scatter/Gather settings, for the specified Dma Logic Channel, are loaded
  1025. * into the Software TCDs. Each software TCD corresponds to a Logic Element.
  1026. * The specified Logic Element shall be loaded into the Dma Logic Channel's
  1027. * Hardware TCD.
  1028. * The Logic Elements (describing the Software TCDs) form a simple chained list,
  1029. * the "Element" function parameter representing the lists's head.
  1030. *
  1031. * @param[in] Channel Specifies the Logic Channel Tag defined by the user.
  1032. * @param[in] Element Specifies the Logic Element Id representing the
  1033. * list's head.
  1034. *
  1035. * @return void
  1036. *
  1037. * @implements Mcl_SetDmaChannelScatterGatherConfig_Activity
  1038. * */
  1039. void Mcl_SetDmaChannelScatterGatherConfig(const uint32 Channel, const uint32 Element);
  1040. #endif /* #if (MCL_DMA_IS_AVAILABLE == STD_ON) */
  1041. #if (MCL_TRGMUX_IS_AVAILABLE == STD_ON)
  1042. /**
  1043. * @brief This function sets the Trgmux Trigger Input selection.
  1044. * @details This service is a reentrant function that shall configure the Trgmux Trigger
  1045. * functionality.
  1046. *
  1047. * @param[in] Trigger Selection value of the Logic Trigger.
  1048. * @param[in] Input Selection value for the Logic Trigger's Input.
  1049. *
  1050. * @return void
  1051. *
  1052. * @implements Mcl_SetTrgMuxInput_Activity
  1053. * */
  1054. void Mcl_SetTrgMuxInput(const uint32 Trigger, const uint32 Input);
  1055. /**
  1056. * @brief This function sets the Trgmux Trigger Lock.
  1057. * @details This service is a reentrant function that shall configure the Trgmux Trigger
  1058. * Lock functionality.
  1059. *
  1060. * @param[in] Trigger Selection value of the Logic Trigger.
  1061. *
  1062. * @return void
  1063. *
  1064. * @implements Mcl_SetTrgMuxLock_Activity
  1065. * */
  1066. void Mcl_SetTrgMuxLock(const uint32 Trigger);
  1067. #endif /* MCL_TRGMUX_IS_AVAILABLE */
  1068. #if (MCL_CACHE_IS_AVAILABLE == STD_ON)
  1069. /**
  1070. * @brief This function enables the Cache.
  1071. * @details This service is a reentrant function that shall enable the Cache functionality.
  1072. *
  1073. * @param[in] CacheType Selection value of the Cache Type.
  1074. *
  1075. * @return void
  1076. *
  1077. * @implements Mcl_CacheEnable_Activity
  1078. * */
  1079. void Mcl_CacheEnable(Mcl_CacheType CacheType);
  1080. /**
  1081. * @brief This function disables the Cache.
  1082. * @details This service is a reentrant function that shall disable the Cache functionality.
  1083. *
  1084. * @param[in] CacheType Selection value of the Cache Type.
  1085. *
  1086. * @return void
  1087. *
  1088. * @implements Mcl_CacheDisable_Activity
  1089. * */
  1090. void Mcl_CacheDisable(Mcl_CacheType CacheType);
  1091. /**
  1092. * @brief This function Invalidates the Cache.
  1093. * @details This service is a reentrant function that shall Invalidate the Cache functionality.
  1094. * The Invalidation applies to the entire Cache.
  1095. *
  1096. * @param[in] CacheType Selection value of the Cache Type.
  1097. *
  1098. * @return void
  1099. *
  1100. * @implements Mcl_CacheInvalidate_Activity
  1101. * */
  1102. void Mcl_CacheInvalidate(Mcl_CacheType CacheType);
  1103. /**
  1104. * @brief This function Cleans the Cache.
  1105. * @details This service is a reentrant function that shall Clean the Cache functionality.
  1106. * The Clean applies to the entire Cache.
  1107. * By enabling the Invalidation, the function shall execute specific Cache
  1108. * Clean&Invalidate function.
  1109. *
  1110. * @param[in] CacheType Selection value of the Cache Type.
  1111. * @param[in] EnInvalidate Enable the Invalidation specific functionality.
  1112. *
  1113. * @return void
  1114. *
  1115. * @implements Mcl_CacheClean_Activity
  1116. * */
  1117. void Mcl_CacheClean(Mcl_CacheType CacheType, boolean EnInvalidate);
  1118. /**
  1119. * @brief This function Invalidates the Cache by address.
  1120. * @details This service is a reentrant function that shall Invalidate the Cache
  1121. * by address.
  1122. * The Invalidation applies to the area in Cache specified by the address and length.
  1123. * The buffer shall be aligned to the Cache Line size.
  1124. *
  1125. * @param[in] CacheType Selection value of the Cache Type.
  1126. * @param[in] Addr Address value of the buffer.
  1127. * @param[in] Length Length value of the buffer.
  1128. *
  1129. * @return void
  1130. *
  1131. * @implements Mcl_CacheInvalidateByAddr_Activity
  1132. * */
  1133. void Mcl_CacheInvalidateByAddr(Mcl_CacheType CacheType, uint32 Addr, uint32 Length);
  1134. /**
  1135. * @brief This function Cleans the Cache by address.
  1136. * @details This service is a reentrant function that shall Clean the Cache by address.
  1137. * The Clean applies to the area in Cache specified by the address and length.
  1138. * By enabling the Invalidation, the function shall execute specific Cache
  1139. * Clean&Invalidate function.
  1140. *
  1141. * @param[in] CacheType Selection value of the Cache Type.
  1142. * @param[in] EnInvalidate Enable the Invalidation specific functionality.
  1143. * @param[in] Addr Address value of the buffer.
  1144. * @param[in] Length Length value of the buffer.
  1145. *
  1146. * @return void
  1147. *
  1148. * @implements Mcl_CacheCleanByAddr_Activity
  1149. * */
  1150. void Mcl_CacheCleanByAddr(Mcl_CacheType CacheType, boolean EnInvalidate, uint32 Addr, uint32 Length);
  1151. #endif /* #if (MCL_CACHE_IS_AVAILABLE == STD_ON) */
  1152. #if (MCL_EMIOS_IS_AVAILABLE == STD_ON)
  1153. /**
  1154. * @brief Allow the user to specify the number of bus reload events skipped. Reload Signal Output Delay Interval.
  1155. *
  1156. * @param logicChannel Should be used the generated define MCL_EMIOS_LOGIC_CH[number]
  1157. * - [number] can be indentied by (uint16)((0U << hwNumber) + hwChannel) from define
  1158. * A list with this generated defines can be found on Emios_Mcl_Ip_Cfg_Defines.h
  1159. * @param interval 00000b - Every event
  1160. * 00001b - Every 2nd event
  1161. * 00010b - Every 3rd event
  1162. * . . .
  1163. * 11111b - Every 32nd event
  1164. */
  1165. void Mcl_Emios_SetReloadInterval(uint16 logicChannel, uint8 interval);
  1166. /**
  1167. * @brief Change the period on active/intialized EMIOS counter(master) bus.
  1168. *
  1169. * @param logicChannel Should be used the generated define MCL_EMIOS_LOGIC_CH[number]
  1170. * - [number] can be indentied by (uint16)((0U << hwNumber) + hwChannel) from define
  1171. * A list with this generated defines can be found on Emios_Mcl_Ip_Cfg_Defines.h
  1172. * @param period New period value.
  1173. * @param syncUpdate Stop the channel output if syncronus start is chose.
  1174. * FALSE - the function will update the period and the transfer compartor will be enable
  1175. * TRUE - the function will disable the comparator transfer and after that update the period
  1176. * After the function is called with syncUpdate=TRUE, it will be needed to call a function
  1177. * which will enable the transfer comparator.
  1178. *
  1179. * !!! Running the following code will NOT DISABLE AND after ENABLE compartor transfer.
  1180. * Mcl_Emios_SetCounterBusPeriod(logicChannel, period, syncUpdate=TRUE);
  1181. * Mcl_Emios_SetCounterBusPeriod(logicChannel, period, syncUpdate=FALSE);
  1182. */
  1183. void Mcl_Emios_SetCounterBusPeriod(uint16 logicChannel, uint16 period, boolean syncUpdate);
  1184. #endif /* MCL_EMIOS_IS_AVAILABLE == STD_ON */
  1185. #if (MCL_COMMON_TIMEBASE_IS_AVAILABLE == STD_ON)
  1186. /**
  1187. * @brief Implementation specific function to updates the Global Timebase bits of configured modules.
  1188. * @details This function is used to set the global timebase bits for modules that support
  1189. * the global timebase feature. The function selects the module that gives the common timebase
  1190. * and the modules that are use this timebase (as bits in elementSyncList).
  1191. * Then it synchronizes the modules.
  1192. * example:
  1193. * elementSyncList is 0x0003 - modules 0 and 1 use the timebase given by instance
  1194. * elementSyncList is 0x0005 - modules 0 and 2 use the timebase given by instance
  1195. *
  1196. * @param[in] instance FTM module id
  1197. * @param[in] elementSyncList FTM module mask value
  1198. * @return void
  1199. */
  1200. void Mcl_SelectCommonTimebase(uint8 instance, uint16 elementSyncList);
  1201. #endif /* MCL_COMMON_TIMEBASE_IS_AVAILABLE */
  1202. #if (MCL_LCU_IS_AVAILABLE == STD_ON)
  1203. /* Instance configuration */
  1204. /**
  1205. * @brief [WP]This function Enable Write Protect feature for the Logic Instance.
  1206. * @details This service is a reentrant function that shall turns on write protection for all LCU
  1207. * registers except SWVALUE, LCn_STS, and FORCEST.
  1208. *
  1209. * @param[in] LogicInstance Specifies the Logic Instance.Using define generated by the
  1210. * configurator (Example : LCU_LOGIC_INSTANCE_0)
  1211. *
  1212. * @return void
  1213. *
  1214. * @implements Mcl_SetLcuWriteProtect_Activity
  1215. * */
  1216. void Mcl_SetLcuWriteProtect(const uint8 LogicInstance);
  1217. #if (MCL_LCU_SYNC_FUNC_IS_AVAILABLE == STD_ON)
  1218. /* Input configuration */
  1219. /**
  1220. * @brief [SWEN] This function Enable/Disable software override of LC input.
  1221. * @details This service is a reentrant function that shall Enable/Disable software override of LC
  1222. * input. When enable multi cores, the API shall write the values into the register only
  1223. * if the list contains all the Inputs related to the same partition
  1224. *
  1225. * How to use this interface:
  1226. * List[x].LogicInputId -> The Logic Input Id generated by the configurator
  1227. * List[x].Value -> Using define generated by the configurator :
  1228. * LCU_IP_SW_OVERRIDE_DISABLE/LCU_IP_SW_OVERRIDE_ENABLE
  1229. *
  1230. * @param[in] List Specifies the input configuration.
  1231. * @param[in] Dimension Number of entries in the List
  1232. *
  1233. * @return void
  1234. *
  1235. * @implements Mcl_SetLcuSyncInputSwOverrideEnable_Activity
  1236. * */
  1237. void Mcl_SetLcuSyncInputSwOverrideEnable(const Mcl_LcuSyncInputValueType List[], const uint8 Dimension);
  1238. /**
  1239. * @brief [SWVALUE] This function specifies the software override value for each LC input.
  1240. * @details This service is a reentrant function that shall specifies the software override value
  1241. * for each LC input. When enable multi cores, the API shall write the values into the
  1242. * register only if the list contains all the Inputs related to the same partition
  1243. *
  1244. * How to use this interface:
  1245. * List[x].LogicInputId -> The Logic Input Id generated by the configurator
  1246. * List[x].Value -> Using define generated by the configurator :
  1247. * LCU_IP_SW_OVERRIDE_LOGIC_LOW/LCU_IP_SW_OVERRIDE_LOGIC_HIGH
  1248. *
  1249. * @param[in] List Specifies the input configuration.
  1250. * @param[in] Dimension Number of entries in the List
  1251. *
  1252. * @return void
  1253. *
  1254. * @implements Mcl_SetLcuSyncInputSwOverrideValue_Activity
  1255. * */
  1256. void Mcl_SetLcuSyncInputSwOverrideValue(const Mcl_LcuSyncInputValueType List[], const uint8 Dimension);
  1257. /**
  1258. * @brief [MUXSEL] This function selects the source of the LC input.
  1259. * @details This service is a reentrant function that shall selects the source of the LC input.
  1260. * When enable multi cores, the API shall write the values into the register only if the
  1261. * list contains all the Inputs related to the same partition
  1262. *
  1263. * How to use this interface:
  1264. * List[x].LogicInputId -> The Logic Input Id generated by the configurator
  1265. * List[x].Value -> Unsigned Integer: [0, 255]
  1266. *
  1267. * @param[in] List Specifies the input configuration.
  1268. * @param[in] Dimension Number of entries in the List
  1269. *
  1270. * @return void
  1271. *
  1272. * @implements Mcl_SetLcuSyncInputMuxSelect_Activity
  1273. * */
  1274. void Mcl_SetLcuSyncInputMuxSelect(const Mcl_LcuSyncInputValueType List[], const uint8 Dimension);
  1275. /**
  1276. * @brief [SW_MODE] specifies the software sync mode for the inputs to this LC.
  1277. * @details This service is a reentrant function that shall specifies the software sync mode for
  1278. * the inputs to this LC.When Software Override is enabled (SWEN), these bits control
  1279. * whether Software Override Value (SWVALUE) changes occur immediately or on the rising
  1280. * edge of the selected sync pulse. When enable multi cores, the API shall write the
  1281. * values into the register only if the list contains all the Inputs related to the same
  1282. * partition
  1283. *
  1284. * How to use this interface:
  1285. * List[x].LogicInputId -> The Logic Input Id generated by the configurator
  1286. * List[x].Value -> Using define generated by the configurator :
  1287. * LCU_IP_SW_SYNC_IMMEDIATE/LCU_IP_SW_SYNC_ON_RISING_EDGE
  1288. *
  1289. * @param[in] List Specifies the input configuration.
  1290. * @param[in] Dimension Number of entries in the List
  1291. *
  1292. * @return void
  1293. *
  1294. * @implements Mcl_SetLcuSyncInputSwSyncMode_Activity
  1295. * */
  1296. void Mcl_SetLcuSyncInputSwSyncMode(const Mcl_LcuSyncInputValueType List[], const uint8 Dimension);
  1297. /* Output configuration */
  1298. /**
  1299. * @brief [DBGEN] This function Enables/Disables outputs to continue operation in Debug mode.
  1300. * @details This service is a reentrant function that shall Enables/Disables outputs to continue
  1301. * operation in Debug mode. When enable multi cores, the API shall write the values into
  1302. * the register only if the list contains all the Outputs related to the same partition
  1303. *
  1304. * How to use this interface:
  1305. * List[x].LogicOutputId -> The Logic Output Id generated by the configurator
  1306. * List[x].Value -> Using define generated by the configurator :
  1307. * LCU_IP_DEBUG_DISABLE/LCU_IP_DEBUG_ENABLE
  1308. *
  1309. * @param[in] List Specifies the Output configuration.
  1310. * @param[in] Dimension Number of entries in the List
  1311. *
  1312. * @return void
  1313. *
  1314. * @implements Mcl_SetLcuSyncOutputDebugMode_Activity
  1315. * */
  1316. void Mcl_SetLcuSyncOutputDebugMode(const Mcl_LcuSyncOutputValueType List[], const uint8 Dimension);
  1317. /**
  1318. * @brief [OUTEN] This function Enables/Disables LC outputs.
  1319. * @details This service is a reentrant function that shall Enables/Disables LC outputs. When
  1320. * enable multi cores, the API shall write the values into the register only if the list
  1321. * contains all the Outputs related to the same partition
  1322. *
  1323. * How to use this interface:
  1324. * List[x].LogicOutputId -> The Logic Output Id generated by the configurator
  1325. * List[x].Value -> Using define generated by the configurator :
  1326. * LCU_IP_OUTPUT_DISABLE/LCU_IP_OUTPUT_ENABLE
  1327. *
  1328. * @param[in] List Specifies the Output configuration.
  1329. * @param[in] Dimension Number of entries in the List
  1330. *
  1331. * @return void
  1332. *
  1333. * @implements Mcl_SetLcuSyncOutputEnable_Activity
  1334. * */
  1335. void Mcl_SetLcuSyncOutputEnable(const Mcl_LcuSyncOutputValueType List[], const uint8 Dimension);
  1336. /**
  1337. * @brief [FORCE_SENSE] This function specifies which force inputs affect output.
  1338. * @details This service is a reentrant function that shall specifies which force inputs affect
  1339. * output. When enable multi cores, the API shall write the values into the register only
  1340. * if the list contains all the Outputs related to the same partition
  1341. *
  1342. * How to use this interface:
  1343. * List[x].LogicOutputId -> The Logic Output Id generated by the configurator
  1344. * List[x].Value -> Unsigned Integer: [0, 255]
  1345. * For each bit:
  1346. * 0b - Does not affect
  1347. * 1b - Affects
  1348. .* Example: 011b specifies: force inputs 0 and 1 will affect for this logic output,
  1349. .* but force inputs 2 will not affect
  1350. *
  1351. * @param[in] List Specifies the Output configuration.
  1352. * @param[in] Dimension Number of entries in the List
  1353. *
  1354. * @return void
  1355. *
  1356. * @implements Mcl_SetLcuSyncOutputForceInputSensitivity_Activity
  1357. * */
  1358. void Mcl_SetLcuSyncOutputForceInputSensitivity(const Mcl_LcuSyncOutputValueType List[], const uint8 Dimension);
  1359. /* [FORCE_MODE] Specifies the timing for clearing force events for output */
  1360. /**
  1361. * @brief [FORCE_MODE] This function specifies the timing for clearing force events for output.
  1362. * @details This service is a reentrant function that shall specifies the timing for clearing
  1363. * force events for output. When enable multi cores, the API shall write the values into
  1364. * the register only if the list contains all the Outputs related to the same partition
  1365. *
  1366. * How to use this interface:
  1367. * List[x].LogicOutputId -> The Logic Output Id generated by the configurator
  1368. * List[x].Value -> Using define generated by the configurator :
  1369. * LCU_IP_CLEAR_FORCE_SIGNAL_IMMEDIATE/
  1370. * LCU_IP_CLEAR_FORCE_SIGNAL_ON_RISING_EDGE/
  1371. * LCU_IP_CLEAR_FORCE_SIGNAL_AFTER_CLEAR_STATUS/
  1372. * LCU_IP_CLEAR_FORCE_SIGNAL_ON_RISING_EDGE_AFTER_CLEAR_STATUS
  1373. *
  1374. * @param[in] List Specifies the Output configuration.
  1375. * @param[in] Dimension Number of entries in the List
  1376. *
  1377. * @return void
  1378. *
  1379. * @implements Mcl_SetLcuSyncOutputForceClearingMode_Activity
  1380. * */
  1381. void Mcl_SetLcuSyncOutputForceClearingMode(const Mcl_LcuSyncOutputValueType List[], const uint8 Dimension);
  1382. /**
  1383. * @brief [SYNC_SEL] This function specifies which sync input to use for Force signal.
  1384. * @details This service is a reentrant function that shall specifies which sync input to use for
  1385. * Force signal. When enable multi cores, the API shall write the values into the
  1386. * register only if the list contains all the Outputs related to the same partition
  1387. *
  1388. * How to use this interface:
  1389. * List[x].LogicOutputId -> The Logic Output Id generated by the configurator
  1390. * List[x].Value -> Unsigned Integer: [0, 255]
  1391. * 00b - Sync input 0
  1392. * 01b - Sync input 1
  1393. *
  1394. * @param[in] List Specifies the Output configuration.
  1395. * @param[in] Dimension Number of entries in the List
  1396. *
  1397. * @return void
  1398. *
  1399. * @implements Mcl_SetLcuSyncOutputForceSyncSelect_Activity
  1400. * */
  1401. void Mcl_SetLcuSyncOutputForceSyncSelect(const Mcl_LcuSyncOutputValueType List[], const uint8 Dimension);
  1402. /**
  1403. * @brief [OUTPOL] This function specifies the polarity of the outputs.
  1404. * @details This service is a reentrant function that shall specifies the polarity of the outputs
  1405. * When enable multi cores, the API shall write the values into the register only if the
  1406. * list contains all the Outputs related to the same partition
  1407. *
  1408. * How to use this interface:
  1409. * List[x].LogicOutputId -> The Logic Output Id generated by the configurator
  1410. * List[x].Value -> Using define generated by the configurator :
  1411. * LCU_IP_FORCE_POL_NOT_INVERTED/LCU_IP_FORCE_POL_INVERTED
  1412. *
  1413. * @param[in] List Specifies the Output configuration.
  1414. * @param[in] Dimension Number of entries in the List
  1415. *
  1416. * @return void
  1417. *
  1418. * @implements Mcl_SetLcuSyncOutputPolarity_Activity
  1419. * */
  1420. void Mcl_SetLcuSyncOutputPolarity(const Mcl_LcuSyncOutputValueType List[], const uint8 Dimension);
  1421. /**
  1422. * @brief [FORCE_DMA_EN] This function Enables/Disable the generation of a DMA request when a
  1423. * force event occurs.
  1424. * @details This service is a reentrant function that shall Enables/Disable the generation of a
  1425. * DMA request when a force event occurs. When enable multi cores, the API shall write
  1426. * the values into the register only if the list contains all the Outputs related to the
  1427. * same partition
  1428. *
  1429. * How to use this interface:
  1430. * List[x].LogicOutputId -> The Logic Output Id generated by the configurator
  1431. * List[x].Value -> Using define generated by the configurator :
  1432. * LCU_IP_DMA_DISABLE/LCU_IP_DMA_ENABLE
  1433. *
  1434. * @param[in] List Specifies the Output configuration.
  1435. * @param[in] Dimension Number of entries in the List
  1436. *
  1437. * @return void
  1438. *
  1439. * @implements Mcl_SetLcuSyncOutputForceDma_Activity
  1440. * */
  1441. void Mcl_SetLcuSyncOutputForceDma(const Mcl_LcuSyncOutputValueType List[], const uint8 Dimension);
  1442. /**
  1443. * @brief [FORCE_INT_EN] This function Enables/Disable the generation of an interrupt request when
  1444. * force event occurs.
  1445. * @details This service is a reentrant function that shall Enables/Disable the generation of an
  1446. * interrupt request when force event occurs. When enable multi cores, the API shall
  1447. * write the values into the register only if the list contains all the Outputs related
  1448. * to the same partition
  1449. *
  1450. * How to use this interface:
  1451. * List[x].LogicOutputId -> The Logic Output Id generated by the configurator
  1452. * List[x].Value -> Using define generated by the configurator :
  1453. * LCU_IP_INT_DISABLE/LCU_IP_INT_ENABLE
  1454. *
  1455. * @param[in] List Specifies the Output configuration.
  1456. * @param[in] Dimension Number of entries in the List
  1457. *
  1458. * @return void
  1459. *
  1460. * @implements Mcl_SetLcuSyncOutputForceInt_Activity
  1461. * */
  1462. void Mcl_SetLcuSyncOutputForceInt(const Mcl_LcuSyncOutputValueType List[], const uint8 Dimension);
  1463. /**
  1464. * @brief [LUT_DMA_EN] This function Enables/Disable the generation of a DMA request when a
  1465. * LUT event occurs.
  1466. * @details This service is a reentrant function that shall Enables/Disable the generation of a
  1467. * DMA request when a LUT event occurs. When enable multi cores, the API shall write the
  1468. * values into the register only if the list contains all the Outputs related to the same
  1469. * partition
  1470. *
  1471. * How to use this interface:
  1472. * List[x].LogicOutputId -> The Logic Output Id generated by the configurator
  1473. * List[x].Value -> Using define generated by the configurator :
  1474. * LCU_IP_DMA_DISABLE/LCU_IP_DMA_ENABLE
  1475. *
  1476. * @param[in] List Specifies the Output configuration.
  1477. * @param[in] Dimension Number of entries in the List
  1478. *
  1479. * @return void
  1480. *
  1481. * @implements Mcl_SetLcuSyncOutputLutDma_Activity
  1482. * */
  1483. void Mcl_SetLcuSyncOutputLutDma(const Mcl_LcuSyncOutputValueType List[], const uint8 Dimension);
  1484. /**
  1485. * @brief [LUT_INT_EN] This function Enables/Disable the generation of an interrupt request when
  1486. * LUT event occurs.
  1487. * @details This service is a reentrant function that shall Enables/Disable the generation of an
  1488. * interrupt request when LUT event occurs. When enable multi cores, the API shall write
  1489. * the values into the register only if the list contains all the Outputs related to the
  1490. * same partition
  1491. *
  1492. * How to use this interface:
  1493. * List[x].LogicOutputId -> The Logic Output Id generated by the configurator
  1494. * List[x].Value -> Using define generated by the configurator :
  1495. * LCU_IP_INT_DISABLE/LCU_IP_INT_ENABLE
  1496. *
  1497. * @param[in] List Specifies the Output configuration.
  1498. * @param[in] Dimension Number of entries in the List
  1499. *
  1500. * @return void
  1501. *
  1502. * @implements Mcl_SetLcuSyncOutputLutInt_Activity
  1503. * */
  1504. void Mcl_SetLcuSyncOutputLutInt(const Mcl_LcuSyncOutputValueType List[], const uint8 Dimension);
  1505. /**
  1506. * @brief [LUT_FALL_FILT] This function specifies the number of consecutive clock cycles the
  1507. * filter output must be logic 0 before the output signal goes low
  1508. * @details This service is a reentrant function that shall specifies the number of consecutive
  1509. * clock cycles the filter output must be logic 0 before the output signal goes low
  1510. * When enable multi cores, the API shall write the values into the register only if the
  1511. * list contains all the Outputs related to the same partition
  1512. *
  1513. * How to use this interface:
  1514. * List[x].LogicOutputId -> The Logic Output Id generated by the configurator
  1515. * List[x].Value -> Unsigned Integer: [0, 65535]
  1516. *
  1517. * @param[in] List Specifies the Output configuration.
  1518. * @param[in] Dimension Number of entries in the List
  1519. *
  1520. * @return void
  1521. *
  1522. * @implements Mcl_SetLcuSyncOutputFallFilter_Activity
  1523. * */
  1524. void Mcl_SetLcuSyncOutputFallFilter(const Mcl_LcuSyncOutputValueType List[], const uint8 Dimension);
  1525. /**
  1526. * @brief [LUT_RISE_FILT] This function specifies the number of consecutive clock cycles the
  1527. * filter output must be logic 1 before the output signal goes high
  1528. * @details This service is a reentrant function that shall Specifies the number of consecutive
  1529. * clock cycles the filter output must be logic 1 before the output signal goes high
  1530. * When enable multi cores, the API shall write the values into the register only if the
  1531. * list contains all the Outputs related to the same partition
  1532. *
  1533. * How to use this interface:
  1534. * List[x].LogicOutputId -> The Logic Output Id generated by the configurator
  1535. * List[x].Value -> Unsigned Integer: [0, 65535]
  1536. *
  1537. * @param[in] List Specifies the Output configuration.
  1538. * @param[in] Dimension Number of entries in the List
  1539. *
  1540. * @return void
  1541. *
  1542. * @implements Mcl_SetLcuSyncOutputRiseFilter_Activity
  1543. * */
  1544. void Mcl_SetLcuSyncOutputRiseFilter(const Mcl_LcuSyncOutputValueType List[], const uint8 Dimension);
  1545. /**
  1546. * @brief [LUTCTRL] This function specifies the LUT positions, based on the combined LC input value
  1547. * @details This service is a reentrant function that shall Specifies the LUT positions, based on
  1548. * the combined LC input value
  1549. * When enable multi cores, the API shall write the values into the register only if the
  1550. * list contains all the Outputs related to the same partition
  1551. *
  1552. * How to use this interface:
  1553. * List[x].LogicOutputId -> The Logic Output Id generated by the configurator
  1554. * List[x].Value -> Unsigned Integer: [0, 65535]
  1555. *
  1556. * @param[in] List Specifies the Output configuration.
  1557. * @param[in] Dimension Number of entries in the List
  1558. *
  1559. * @return void
  1560. *
  1561. * @implements Mcl_SetLcuSyncOutputLutControl_Activity
  1562. * */
  1563. void Mcl_SetLcuSyncOutputLutControl(const Mcl_LcuSyncOutputValueType List[], const uint8 Dimension);
  1564. /**
  1565. * @brief [FORCESTS] This function Clear Force Event
  1566. * @details This service is a reentrant function that shall Clear Force Event
  1567. * When enable multi cores, the API shall write the values into the register only if the
  1568. * list contains all the Outputs related to the same partition
  1569. *
  1570. * How to use this interface:
  1571. * List[x].LogicOutputId -> The Logic Output Id generated by the configurator
  1572. *
  1573. * @param[in] List Specifies the Output configuration.
  1574. * @param[in] Dimension Number of entries in the List
  1575. *
  1576. * @return void
  1577. *
  1578. * @implements Mcl_ClearLcuSyncOutputForceEvent_Activity
  1579. * */
  1580. void Mcl_ClearLcuSyncOutputForceEvent(const Mcl_LcuSyncOutputValueType List[], const uint8 Dimension);
  1581. /**
  1582. * @brief [LC_INPUTS] This function Indicates states of LC inputs
  1583. * @details This service is a reentrant function that shall Indicates states of LC inputs
  1584. * When enable multi cores, the API shall get the values from the register only if the
  1585. * list contains all the Inputs related to the same partition
  1586. *
  1587. * How to use this interface:
  1588. * [in] List[x].LogicInputId -> The Logic Input Id generated by the
  1589. * configurator
  1590. * [out] List[x].Value -> Store the states of LC inputs
  1591. *
  1592. * @param[in/out] List Pointer to the configuration structure
  1593. * @param[in] Dimension Number of entries in the List
  1594. *
  1595. * @return void
  1596. *
  1597. * @implements Mcl_GetLcuSyncLogicInput_Activity
  1598. * */
  1599. void Mcl_GetLcuSyncLogicInput(Mcl_LcuSyncInputValueType List[], const uint8 Dimension);
  1600. /**
  1601. * @brief [SWOUT] This function Indicates states of LC inputs or software-overridden inputs
  1602. * @details This service is a reentrant function that shall Indicates states of LC inputs or
  1603. * software-overridden inputs
  1604. * When enable multi cores, the API shall get the values from the register only if the
  1605. * list contains all the Inputs related to the same partition
  1606. *
  1607. * How to use this interface:
  1608. * [in] List[x].LogicInputId -> The Logic Input Id generated by the
  1609. * configurator
  1610. * [out] List[x].Value -> Store the states of LC inputs or
  1611. * software-overridden inputs
  1612. *
  1613. * @param[in/out] List Pointer to the configuration structure
  1614. * @param[in] Dimension Number of entries in the List
  1615. *
  1616. * @return void
  1617. *
  1618. * @implements Mcl_GetLcuSyncSwOverrideInput_Activity
  1619. * */
  1620. void Mcl_GetLcuSyncSwOverrideInput(Mcl_LcuSyncInputValueType List[], const uint8 Dimension);
  1621. /**
  1622. * @brief [LCOUT] This function Indicates states of LC outputs
  1623. * @details This service is a reentrant function that shall Indicates states of LC outputs
  1624. * When enable multi cores, the API shall get the values from the register only if the
  1625. * list contains all the Outputs related to the same partition
  1626. *
  1627. * How to use this interface:
  1628. * [in] List[x].LogicOutputId -> The Logic Output Id generated by the
  1629. * configurator
  1630. * [out] List[x].Value -> Store the states of LC outputs
  1631. *
  1632. * @param[in/out] List Pointer to the configuration structure
  1633. * @param[in] Dimension Number of entries in the List
  1634. *
  1635. * @return void
  1636. *
  1637. * @implements Mcl_GetLcuSyncLogicOutput_Activity
  1638. * */
  1639. void Mcl_GetLcuSyncLogicOutput(Mcl_LcuSyncOutputValueType List[], const uint8 Dimension);
  1640. /**
  1641. * @brief [FORCEOUT] This function Indicates the current state of force outputs for the logic
  1642. * outputs
  1643. * @details This service is a reentrant function that shall the current state of force outputs for
  1644. * the logic outputs
  1645. * When enable multi cores, the API shall get the values from the register only if the
  1646. * list contains all the Outputs related to the same partition
  1647. *
  1648. * How to use this interface:
  1649. * [in] List[x].LogicOutputId -> The Logic Output Id generated by the
  1650. * configurator
  1651. * [out] List[x].Value -> Store the current state of force outputs for the
  1652. * logic outputs
  1653. *
  1654. * @param[in/out] List Pointer to the configuration structure
  1655. * @param[in] Dimension Number of entries in the List
  1656. *
  1657. * @return void
  1658. *
  1659. * @implements Mcl_GetLcuSyncForceOutput_Activity
  1660. * */
  1661. void Mcl_GetLcuSyncForceOutput(Mcl_LcuSyncOutputValueType List[], const uint8 Dimension);
  1662. /**
  1663. * @brief [FORCESTS] This function Indicates that a force event has occurred on the associated
  1664. output
  1665. * @details This service is a reentrant function that shall Indicates that a force event has
  1666. * occurred on the associated output
  1667. * When enable multi cores, the API shall get the values from the register only if the
  1668. * list contains all the Outputs related to the same partition
  1669. *
  1670. * How to use this interface:
  1671. * [in] List[x].LogicOutputId -> The Logic Output Id generated by the
  1672. * configurator
  1673. * [out] List[x].Value -> Store the force event value.
  1674. * Value = 0: force event not occurs
  1675. * Value = 1: force event occurs
  1676. *
  1677. * @param[in/out] List Pointer to the configuration structure
  1678. * @param[in] Dimension Number of entries in the List
  1679. *
  1680. * @return void
  1681. *
  1682. * @implements Mcl_GetLcuSyncForceStatus_Activity
  1683. * */
  1684. void Mcl_GetLcuSyncForceStatus(Mcl_LcuSyncOutputValueType List[], const uint8 Dimension);
  1685. /**
  1686. * @brief [COMB_FORCE] This function Indicates the combined value of force inputs to each output
  1687. * @details This service is a reentrant function that shall Indicates the combined value of force
  1688. * inputs to each output
  1689. * When enable multi cores, the API shall get the values from the register only if the
  1690. * list contains all the Outputs related to the same partition
  1691. *
  1692. * How to use this interface:
  1693. * [in] List[x].LogicOutputId -> The Logic Output Id generated by the
  1694. * configurator
  1695. * [out] List[x].Value -> Store the combined value of force inputs to each
  1696. * output
  1697. *
  1698. * @param[in/out] List Pointer to the configuration structure
  1699. * @param[in] Dimension Number of entries in the List
  1700. *
  1701. * @return void
  1702. *
  1703. * @implements Mcl_GetLcuSyncCombineForceInput_Activity
  1704. * */
  1705. void Mcl_GetLcuSyncCombineForceInput(Mcl_LcuSyncOutputValueType List[], const uint8 Dimension);
  1706. #endif /* #if (MCL_LCU_SYNC_FUNC_IS_AVAILABLE == STD_ON) */
  1707. #if (MCL_LCU_ASYNC_FUNC_IS_AVAILABLE == STD_ON)
  1708. /**
  1709. * @brief This function configure multiple configuration for one logic input
  1710. * @details This service is a reentrant function that shall configure multiple configuration for
  1711. * one logic input
  1712. *
  1713. * How to use this interface:
  1714. * List[x].Param -> Select member of Mcl_LcuInputParamType
  1715. * List[x].Value -> Unsigned Integer: [0, 255] or some defines generated by configurator
  1716. * base on Param
  1717. *
  1718. * @param[in] LogicInput Logic input Id
  1719. * @param[in] List List of param and value
  1720. * @param[in] Dimension Number of entries in the List
  1721. *
  1722. * @return void
  1723. *
  1724. * @implements Mcl_SetLcuAsyncInputList_Activity
  1725. * */
  1726. void Mcl_SetLcuAsyncInputList(const uint8 LogicInput, const Mcl_LcuAsyncInputValueType List[], const uint8 Dimension);
  1727. /**
  1728. * @brief This function configure multiple configuration for one logic output
  1729. * @details This service is a reentrant function that shall configure multiple configuration for
  1730. * one logic output
  1731. *
  1732. * How to use this interface:
  1733. * List[x].Param -> Select member of Mcl_LcuOutputParamType
  1734. * List[x].Value -> Unsigned Integer: [0, 255] or some defines generated by configurator
  1735. * base on Param
  1736. *
  1737. * @param[in] LogicOutput Logic output Id
  1738. * @param[in] List List of param and value
  1739. * @param[in] Dimension Number of entries in the List
  1740. *
  1741. * @return void
  1742. *
  1743. * @implements Mcl_SetLcuAsyncOutputList_Activity
  1744. * */
  1745. void Mcl_SetLcuAsyncOutputList(const uint8 LogicOutput, const Mcl_LcuAsyncOutputValueType List[], const uint8 Dimension);
  1746. /**
  1747. * @brief This function get information of Logic Input
  1748. * @details This service is a reentrant function that shall get states of Logic Inputs
  1749. * How to use this interface:
  1750. * [in] LogicInput -> The Logic Input Name generated by the configurator.
  1751. * By default: LCU_LOGIC_INPUT_0, LCU_LOGIC_INPUT_1,...
  1752. * [in] Param -> Select parameter. Example: MCL_LCU_IP_INPUT_GET_LOGIC_INPUT_STATE
  1753. * [out] Value -> Store the states of LC inputs
  1754. *
  1755. * @param[in] LogicInput The Logic Input Name
  1756. * @param[in] Param Selection parameter
  1757. * @param[out] Value Output value
  1758. *
  1759. * @return void
  1760. *
  1761. *
  1762. * @implements Mcl_GetLcuAsyncLogicInputInfo_Activity
  1763. * */
  1764. void Mcl_GetLcuAsyncLogicInputInfo(const uint8 LogicInput, const Mcl_LcuInputInfoParamType Param, uint8 * const Value);
  1765. /**
  1766. * @brief This function get information of Logic Output
  1767. * @details This service is a reentrant function that shall get states of Logic Outputs
  1768. * How to use this interface:
  1769. * [in] LogicOutput -> The Logic Output Name generated by the configurator.
  1770. * By default: LCU_LOGIC_OUTPUT_0, LCU_LOGIC_OUTPUT_1,...
  1771. * [in] Param -> Select parameter. Example: MCL_LCU_IP_OUTPUT_GET_LOGIC_OUTPUT_STATE
  1772. * [out] Value -> Store the states of LC inputs
  1773. *
  1774. * @param[in] LogicOutput The Logic Output Name
  1775. * @param[in] Param Selection parameter
  1776. * @param[out] Value Output value
  1777. *
  1778. * @return void
  1779. *
  1780. *
  1781. * @implements Mcl_GetLcuAsyncLogicOutputInfo_Activity
  1782. * */
  1783. void Mcl_GetLcuAsyncLogicOutputInfo(const uint8 LogicOutput, const Mcl_LcuOutputInfoParamType Param, uint8 * const Value);
  1784. #endif /* #if (MCL_LCU_ASYNC_FUNC_IS_AVAILABLE == STD_ON) */
  1785. #endif /* #if (MCL_LCU_IS_AVAILABLE == STD_ON) */
  1786. #if (MCL_VERSION_INFO_API_IS_AVAILABLE == STD_ON)
  1787. /**
  1788. * @brief Returns the version information of this module.
  1789. * @details Returns the version information of MCL module.
  1790. *
  1791. * @param[out] VersionInfo A pointer to a structure used to get version information.
  1792. *
  1793. * @return void
  1794. *
  1795. * @implements Mcl_GetVersionInfo_Activity
  1796. * */
  1797. void Mcl_GetVersionInfo(Std_VersionInfoType * const VersionInfo);
  1798. #endif /* MCL_VERSION_INFO_API_IS_AVAILABLE == STD_ON */
  1799. #define MCL_STOP_SEC_CODE
  1800. /* @violates @ref Mcl_Dma_h_REF_1 MISRA 2012 Required Directive 4.10, Precautions shall be taken in order to prevent the contents of a header file being included more than once. */
  1801. #include "Mcl_MemMap.h"
  1802. #ifdef __cplusplus
  1803. }
  1804. #endif
  1805. /** @} */
  1806. #endif /* CDD_MCL_H_ */
  1807. /*==================================================================================================
  1808. * END OF FILE
  1809. ==================================================================================================*/