Adc_Types.h 21 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475
  1. /*==================================================================================================
  2. * Project : RTD AUTOSAR 4.4
  3. * Platform : CORTEXM
  4. * Peripheral : ADC
  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 ADC_TYPES_H
  25. #define ADC_TYPES_H
  26. /**
  27. * @file
  28. *
  29. * @addtogroup adc_driver
  30. * @{
  31. */
  32. #ifdef __cplusplus
  33. extern "C"{
  34. #endif
  35. /*==================================================================================================
  36. * INCLUDE FILES
  37. * 1) system and project includes
  38. * 2) needed interfaces from external units
  39. * 3) internal and external interfaces from this unit
  40. ==================================================================================================*/
  41. #include "Adc_Ipw_Types.h"
  42. #include "Adc_CfgDefines.h"
  43. /*==================================================================================================
  44. * SOURCE FILE VERSION INFORMATION
  45. ==================================================================================================*/
  46. #define ADC_VENDOR_ID_TYPES_H 43
  47. #define ADC_AR_RELEASE_MAJOR_VERSION_TYPES_H 4
  48. #define ADC_AR_RELEASE_MINOR_VERSION_TYPES_H 4
  49. #define ADC_AR_RELEASE_REVISION_VERSION_TYPES_H 0
  50. #define ADC_SW_MAJOR_VERSION_TYPES_H 1
  51. #define ADC_SW_MINOR_VERSION_TYPES_H 0
  52. #define ADC_SW_PATCH_VERSION_TYPES_H 0
  53. /*==================================================================================================
  54. * FILE VERSION CHECKS
  55. ==================================================================================================*/
  56. /* Check if Adc_Types.h file and Adc_Ipw_Types.h file are of the same vendor */
  57. #if (ADC_VENDOR_ID_TYPES_H != ADC_VENDOR_ID_IPW_TYPES_H)
  58. #error "Adc_Types.h and Adc_Ipw_Types.h have different vendor ids"
  59. #endif
  60. /* Check if Adc_Types.h file and Adc_Ipw_Types.h file are of the same Autosar version */
  61. #if ((ADC_AR_RELEASE_MAJOR_VERSION_TYPES_H != ADC_AR_RELEASE_MAJOR_VERSION_IPW_TYPES_H) || \
  62. (ADC_AR_RELEASE_MINOR_VERSION_TYPES_H != ADC_AR_RELEASE_MINOR_VERSION_IPW_TYPES_H) || \
  63. (ADC_AR_RELEASE_REVISION_VERSION_TYPES_H != ADC_AR_RELEASE_REVISION_VERSION_IPW_TYPES_H) \
  64. )
  65. #error "AutoSar Version Numbers of Adc_Types.h and Adc_Ipw_Types.h are different"
  66. #endif
  67. /* Check if Adc_Types.h file and Adc_Ipw_Types.h file are of the same Software version */
  68. #if ((ADC_SW_MAJOR_VERSION_TYPES_H != ADC_SW_MAJOR_VERSION_IPW_TYPES_H) || \
  69. (ADC_SW_MINOR_VERSION_TYPES_H != ADC_SW_MINOR_VERSION_IPW_TYPES_H) || \
  70. (ADC_SW_PATCH_VERSION_TYPES_H != ADC_SW_PATCH_VERSION_IPW_TYPES_H) \
  71. )
  72. #error "Software Version Numbers of Adc_Types.h and Adc_Ipw_Types.h are different"
  73. #endif
  74. /* Check if Adc_Types.h file and Adc_CfgDefines.h file are of the same vendor */
  75. #if (ADC_VENDOR_ID_TYPES_H != ADC_VENDOR_ID_CFGDEFINES_H)
  76. #error "Adc_Types.h and Adc_CfgDefines.h have different vendor ids"
  77. #endif
  78. /* Check if Adc_Types.h file and Adc_CfgDefines.h file are of the same Autosar version */
  79. #if ((ADC_AR_RELEASE_MAJOR_VERSION_TYPES_H != ADC_AR_RELEASE_MAJOR_VERSION_CFGDEFINES_H) || \
  80. (ADC_AR_RELEASE_MINOR_VERSION_TYPES_H != ADC_AR_RELEASE_MINOR_VERSION_CFGDEFINES_H) || \
  81. (ADC_AR_RELEASE_REVISION_VERSION_TYPES_H != ADC_AR_RELEASE_REVISION_VERSION_CFGDEFINES_H) \
  82. )
  83. #error "AutoSar Version Numbers of Adc_Types.h and Adc_CfgDefines.h are different"
  84. #endif
  85. /* Check if Adc_Types.h file and Adc_CfgDefines.h file are of the same Software version */
  86. #if ((ADC_SW_MAJOR_VERSION_TYPES_H != ADC_SW_MAJOR_VERSION_CFGDEFINES_H) || \
  87. (ADC_SW_MINOR_VERSION_TYPES_H != ADC_SW_MINOR_VERSION_CFGDEFINES_H) || \
  88. (ADC_SW_PATCH_VERSION_TYPES_H != ADC_SW_PATCH_VERSION_CFGDEFINES_H) \
  89. )
  90. #error "Software Version Numbers of Adc_Types.h and Adc_CfgDefines.h are different"
  91. #endif
  92. /*==================================================================================================
  93. * CONSTANTS
  94. ==================================================================================================*/
  95. /*==================================================================================================
  96. * DEFINES AND MACROS
  97. ==================================================================================================*/
  98. /*==================================================================================================
  99. * ENUMS
  100. ==================================================================================================*/
  101. /**
  102. * @brief ADC driver status
  103. * @details Used to differentiate if ADC driver is already uninit, during init or already
  104. * initialized or not.
  105. *
  106. */
  107. typedef enum
  108. {
  109. ADC_STATE_UNINIT = 0U, /**< @brief Adc driver uninitialized */
  110. ADC_STATE_BUSY, /**< @brief Adc driver busy */
  111. ADC_STATE_IDLE /**< @brief Adc driver idle */
  112. } Adc_GlobalStateType;
  113. /**
  114. * @brief ADC group already converted type.
  115. * @details Used to differentiate if group is already converted or not.
  116. *
  117. */
  118. typedef enum
  119. {
  120. ADC_NOT_YET_CONVERTED = 0U, /**< @brief Group not yet converted */
  121. ADC_ALREADY_CONVERTED /**< @brief Group is already converted */
  122. } Adc_GroupConversionStateType;
  123. /**
  124. * @brief Adc group access Mode.
  125. * @details Used for value received by Tressos interface configuration.
  126. *
  127. * @implements Adc_GroupAccessModeType_enum
  128. * SWS_Adc_00528
  129. */
  130. typedef enum
  131. {
  132. ADC_ACCESS_MODE_SINGLE = 0U, /**< @brief Single access mode */
  133. ADC_ACCESS_MODE_STREAMING /**< @brief Streaming access mode */
  134. } Adc_GroupAccessModeType;
  135. /**
  136. * @brief Adc group replacement.
  137. * @details Used for value received by Tressos interface configuration.
  138. *
  139. * @implements Adc_GroupReplacementType_enum
  140. * SWS_Adc_00523
  141. */
  142. typedef enum
  143. {
  144. ADC_GROUP_REPL_ABORT_RESTART, /**< @brief Abort and restart of group*/
  145. ADC_GROUP_REPL_SUSPEND_RESUME /**< @brief Suspend and resuming of group*/
  146. }Adc_GroupReplacementType;
  147. /**
  148. * @brief Adc group streaming buffer mode.
  149. * @details Used for value received by Tressos interface configuration.
  150. *
  151. * @implements Adc_StreamBufferModeType_enum
  152. * SWS_Adc_00519
  153. */
  154. typedef enum
  155. {
  156. ADC_STREAM_BUFFER_LINEAR = 0U, /**< @brief Linear streaming*/
  157. ADC_STREAM_BUFFER_CIRCULAR /**< @brief Circular streaming*/
  158. } Adc_StreamBufferModeType;
  159. /**
  160. * @brief ADC group status.
  161. * @details ADC group enumeration type.
  162. *
  163. * @implements Adc_StatusType_enum
  164. * SWS_Adc_00513
  165. */
  166. typedef enum
  167. {
  168. ADC_IDLE = 0U, /**< @brief Group is in IDLE state*/
  169. ADC_BUSY, /**< @brief Group is in BUSY state */
  170. ADC_COMPLETED, /**< @brief Group is in COMPLETED state*/
  171. ADC_STREAM_COMPLETED /**< @brief Group is in STREAM_COMPLETED state*/
  172. } Adc_StatusType;
  173. /**
  174. * @brief ADC group notification.
  175. * @details Indicates if notification is enabled for the group.
  176. *
  177. */
  178. typedef enum
  179. {
  180. ADC_NOTIFICATION_DISABLED = 0U, /**< @brief Notification is disabled */
  181. ADC_NOTIFICATION_ENABLED /**< @brief Notification is enabled */
  182. } Adc_NotificationType;
  183. /**
  184. * @brief Adc hardware trigger edge.
  185. * @details Used for value received by Tressos interface configuration.
  186. *
  187. * @implements Adc_HwTriggerSignalType_enum
  188. * SWS_Adc_00520
  189. */
  190. typedef enum
  191. {
  192. ADC_HW_TRIG_RISING_EDGE = 0U, /**< @brief Rising edge */
  193. ADC_HW_TRIG_FALLING_EDGE, /**< @brief Falling edge */
  194. ADC_HW_TRIG_BOTH_EDGES /**< @brief falling and rising edge */
  195. } Adc_HwTriggerSignalType;
  196. /**
  197. * @brief Adc hardware trigger source.
  198. * @details Used for value received by Tressos interface configuration.
  199. *
  200. * @implements Adc_TriggerSourceType_enum
  201. * SWS_Adc_00514
  202. */
  203. typedef enum
  204. {
  205. ADC_TRIGG_SRC_SW = 0U /**< @brief Software triggered */
  206. #if (ADC_HW_TRIGGER_API == STD_ON)
  207. ,
  208. ADC_TRIGG_SRC_HW /**< @brief Hardware triggered */
  209. #endif /* (ADC_HW_TRIGGER_API == STD_ON) */
  210. } Adc_TriggerSourceType;
  211. #if (STD_ON == ADC_HW_TRIGGER_API)
  212. /**
  213. * @brief Adc Hardware trigger.
  214. * @details Indicates if hardware trigger is enabled for group.
  215. *
  216. */
  217. typedef enum
  218. {
  219. ADC_HWTRIGGER_DISABLED = 0U, /**< @brief Hardware trigger is disabled */
  220. ADC_HWTRIGGER_ENABLED /**< @brief Hardware trigger is enabled */
  221. } Adc_HwTriggeringType;
  222. #endif /* (STD_ON==ADC_HW_TRIGGER_API) */
  223. /*==================================================================================================
  224. STRUCTURES AND OTHER TYPEDEFS
  225. ==================================================================================================*/
  226. typedef void (*Adc_NotifyType)(void); /**< @brief Notification function pointer definition */
  227. /* SWS_Adc_00512 */
  228. /** @implements Adc_ResolutionType_uint */
  229. typedef uint8 Adc_ResolutionType; /**< @brief channel resolution in number of bits */
  230. #if (ADC_PRIORITY_IMPLEMENTATION != ADC_PRIORITY_NONE)
  231. /* SWS_Adc_00516 */
  232. /** @implements Adc_GroupPriorityType_uint */
  233. typedef uint8 Adc_GroupPriorityType; /**< @brief ADC Channel group priority */
  234. #endif /* (ADC_PRIORITY_IMPLEMENTATION != ADC_PRIORITY_NONE) */
  235. /* SWS_Adc_00517 */
  236. /** @implements Adc_GroupDefType_uint */
  237. typedef Adc_ChannelType Adc_GroupDefType; /**< @brief definition of channels in a group */
  238. /* SWS_Adc_00509 */
  239. /** @implements Adc_PrescaleType_uint */
  240. typedef uint8 Adc_PrescaleType; /**< @brief clock prescaler factor */
  241. /* SWS_Adc_00511 */
  242. /** @implements Adc_SamplingTimeType_uint */
  243. typedef uint8 Adc_SamplingTimeType; /**< @brief sampling time */
  244. /* SWS_Adc_00518 */
  245. /** @implements Adc_StreamNumSampleType_uint */
  246. typedef uint16 Adc_StreamNumSampleType; /**< @brief Number of samples of a streaming conversion buffer */
  247. /**
  248. * @brief Structure for validation results
  249. * @details This structure contains the validation information
  250. *
  251. */
  252. typedef struct
  253. {
  254. boolean bEndValidations; /**< @brief Signal if validation ended */
  255. Std_ReturnType ValidParams; /**< @brief Return status */
  256. } Adc_ValidationResultType;
  257. /**
  258. * @brief Structure for group status.
  259. * @details This structure contains the group status information.
  260. *
  261. */
  262. typedef struct
  263. {
  264. volatile Adc_StatusType eConversion; /**< @brief Group status */
  265. volatile Adc_GroupConversionStateType eAlreadyConverted; /**< @brief Group was previously converted or not */
  266. #if (ADC_HW_TRIGGER_API == STD_ON)
  267. Adc_HwTriggeringType eHwTriggering; /**< @brief hw trigger enabled/disabled */
  268. #endif /* ADC_HW_TRIGGER_API == STD_ON */
  269. #if (ADC_GRP_NOTIF_CAPABILITY == STD_ON)
  270. Adc_NotificationType eNotification; /**< @brief notification enabled/disabled */
  271. #endif /* ADC_GRP_NOTIF_CAPABILITY == STD_ON */
  272. volatile Adc_StreamNumSampleType ResultIndex; /**< @brief index into streaming buffer that is currently being filled */
  273. #ifdef ADC_CURRENT_CHANNEL_USED
  274. Adc_ChannelIndexType CurrentChannel; /**< @brief Current channel in use */
  275. #endif /* ADC_CURRENT_CHANNEL_USED */
  276. #if (ADC_ENABLE_LIMIT_CHECK == STD_ON)
  277. volatile boolean bLimitCheckFailed; /**< @brief check limit check fail */
  278. #endif /* ADC_ENABLE_LIMIT_CHECK == STD_ON */
  279. } Adc_GroupStatusType;
  280. /**
  281. * @brief Structure for hardware unit status.
  282. * @details This structure contains the HW unit status information.
  283. *
  284. */
  285. typedef struct
  286. {
  287. /** @brief Filled slots in the queue */
  288. volatile Adc_QueueIndexType SwNormalQueueIndex;
  289. /** @brief Queued groups indexes, always executing Queue[0] */
  290. volatile Adc_GroupType SwNormalQueue[ADC_QUEUE_MAX_DEPTH_MAX];
  291. #if (ADC_HW_TRIGGER_API == STD_ON)
  292. /** @brief Ongoing hardware group ID */
  293. volatile Adc_GroupType OngoingHwGroup;
  294. #endif /* ADC_HW_TRIGGER_API == STD_ON */
  295. #if (ADC_SOFTWARE_INJECTED_CONVERSIONS_USED == STD_ON)
  296. /** @brief The depth of the software injected queue */
  297. volatile Adc_GroupType SwInjectedQueue[1U];
  298. /** @brief Filled slots in the Sw injected queue */
  299. volatile Adc_QueueIndexType SwInjectedQueueIndex;
  300. #endif /* (ADC_SOFTWARE_INJECTED_CONVERSIONS_USED == STD_ON) */
  301. #if (ADC_ENABLE_CTU_CONTROL_MODE_API == STD_ON)
  302. /** @brief Indicates Ctu control mode is ongoing */
  303. boolean bCtuControlOngoing;
  304. #endif /* ADC_ENABLE_CTU_CONTROL_MODE_API == STD_ON */
  305. #if (ADC_PDB_AVAILABLE == STD_ON)
  306. uint8 u8Sc1Used;
  307. #endif /* (ADC_PDB_AVAILABLE == STD_ON) */
  308. } Adc_UnitStatusType;
  309. #if (ADC_SETCHANNEL_API == STD_ON)
  310. typedef struct
  311. {
  312. /** @brief Run time assigned channels to group */
  313. const Adc_GroupDefType * pChannel;
  314. /** @brief Run time number of channels */
  315. Adc_ChannelIndexType ChannelCount;
  316. /** @brief Indicates whether the configuration has been updated or not */
  317. boolean bRuntimeUpdated;
  318. #if (ADC_ENABLE_LIMIT_CHECK == STD_ON)
  319. /* @brief Indicates whether pChannel has channel with limit checking enabled */
  320. boolean bAdcRuntimeGroupLimitcheck;
  321. #endif /* (ADC_ENABLE_LIMIT_CHECK == STD_ON) */
  322. #if (ADC_PDB_AVAILABLE == STD_ON)
  323. /** @brief Run time assigned delay of channels group */
  324. const uint16 * pu16Delays;
  325. /** @brief Mask per channel - to be updated or not */
  326. uint32 u32Mask;
  327. #endif /* (ADC_PDB_AVAILABLE == STD_ON) */
  328. } Adc_RuntimeGroupChannelType;
  329. #endif /* (ADC_SETCHANNEL_API == STD_ON) */
  330. typedef struct
  331. {
  332. const Adc_GroupType GroupId; /**< @brief Index of group */
  333. const Adc_HwUnitType AdcLogicalUnitId; /**< @brief The ADC Logical Unit Id that the group belongs to */
  334. const Adc_GroupAccessModeType eAccessMode; /**< @brief Access Mode */
  335. const Adc_GroupConvModeType eMode; /**< @brief Conversion Mode (OneShot/Continuous) */
  336. const Adc_GroupConvType eType; /**< @brief Conversion type (Normal/Injected) */
  337. #if (ADC_PRIORITY_IMPLEMENTATION != ADC_PRIORITY_NONE)
  338. const Adc_GroupPriorityType Priority; /**< @brief Priority of group */
  339. #endif /* (ADC_PRIORITY_IMPLEMENTATION != ADC_PRIORITY_NONE) */
  340. const Adc_GroupReplacementType eReplacementMode; /**< @brief Replacement Mode */
  341. const Adc_TriggerSourceType eTriggerSource; /**< @brief Hw/Sw trigger */
  342. #if (STD_ON == ADC_HW_TRIGGER_API)
  343. const Adc_HwTriggerTimerType HwTriggerSource; /**< @brief Hardware trigger source for the group */
  344. const Adc_HwTriggerSignalType eTriggerEdge; /**< @brief Hardware trigger edge */
  345. #if (ADC_CTU_AVAILABLE == STD_ON)
  346. const Adc_HwTriggerTimerType HwTriggerCompareValue; /**< @brief Counter Compare Value to reload CTU Trigger */
  347. #endif /* (ADC_CTU_AVAILABLE == STD_ON) */
  348. #endif /* (STD_ON == ADC_HW_TRIGGER_API) */
  349. #if (STD_ON == ADC_GRP_NOTIF_CAPABILITY)
  350. /* SWS_Adc_00104 */
  351. const Adc_NotifyType Notification; /**< @brief Pointer to notification function */
  352. #endif /* (STD_ON==ADC_GRP_NOTIF_CAPABILITY) */
  353. #if (ADC_ENABLE_INITIAL_NOTIFICATION == STD_ON)
  354. /* CPR-MCAL-797.adc */
  355. const Adc_NotifyType ExtraNotification; /**< @brief Pointer to extra notification function */
  356. #endif /* (ADC_ENABLE_INITIAL_NOTIFICATION == STD_ON) */
  357. /* SWS_Adc_00319, SWS_Adc_00318 */
  358. Adc_ValueGroupType ** pResultsBufferPtr; /**< @brief pointer to user result buffer array */
  359. const Adc_StreamBufferModeType eBufferMode; /**< @brief Buffer Mode */
  360. #if (ADC_ENABLE_CH_DISABLE_CH_NONAUTO_API == STD_ON)
  361. const Adc_GroupType EnableChDisableChGroupIndex; /**< @brief Group's index if it has the support to enable/disable channel */
  362. #endif /* (ADC_ENABLE_CH_DISABLE_CH_NONAUTO_API == STD_ON) */
  363. const Adc_StreamNumSampleType NumSamples; /**< @brief Number of samples */
  364. #if (ADC_ENABLE_GROUP_STREAMING_RESULTS_REORDER == STD_ON)
  365. const boolean bStreamResultGroupMultiSets; /**< @brief Arrange the results as multiple sets of group result buffer */
  366. #endif /* (ADC_ENABLE_GROUP_STREAMING_RESULTS_REORDER == STD_ON) */
  367. const Adc_GroupDefType * pAssignment; /**< @brief Assigned channels to group */
  368. const Adc_ChannelIndexType AssignedChannelCount; /**< @brief Number of channels */
  369. const Adc_ChannelType LastCh; /**< @brief Last channel configured */
  370. const Adc_ChannelType FirstCh; /**< @brief First channel configured */
  371. /* PR-MCAL-3229.adc */
  372. const uint8 u8AdcWithoutInterrupt; /**< @brief Enables or Disables the ADC and DMA interrupts */
  373. const uint8 u8AdcExtDMAChanEnable; /**< @brief Enables or Disables configuring external DMA channel in the group */
  374. const boolean u8AdcWithoutDma; /**< @brief When true, disables completely DMA configuration done by ADC driver for the group */
  375. #if (STD_ON == ADC_OPTIMIZE_DMA_STREAMING_GROUPS)
  376. const boolean bAdcOptimizeDmaStream; /**< @brief Enables or Disables the ADC optimize DMA streaming groups feature */
  377. const boolean bHalfInterrupt; /**< @brief Enable half interrupt for optimize DMA streaming groups feature */
  378. #endif
  379. #if (ADC_ENABLE_LIMIT_CHECK == STD_ON)
  380. const boolean bAdcGroupLimitcheck; /**< @brief Enables or disables the usage of limit checking for an ADC group. */
  381. #endif /* (ADC_ENABLE_LIMIT_CHECK == STD_ON) */
  382. #ifndef ADC_CMR_REGISTER_NOT_SUPPORTED
  383. Adc_ChansIdxMaskType AssignedChannelMask;
  384. #endif /* ADC_CMR_REGISTER_NOT_SUPPORTED */
  385. #if (ADC_CTU_HW_TRIGGER_OPTIMIZATION == STD_ON)
  386. const uint8 u8CtuTrigListPos; /**< @brief First position of channel in BCTU channel list or CTU command list. */
  387. #endif /* (ADC_CTU_HW_TRIGGER_OPTIMIZATION == STD_ON) */
  388. #if ((ADC_SET_ADC_CONV_TIME_ONCE == STD_OFF) || (ADC_PDB_AVAILABLE == STD_ON))
  389. Adc_Ipw_GroupConfig const * pAdcIpwGroupConfig;
  390. #endif /* ((ADC_SET_ADC_CONV_TIME_ONCE == STD_OFF) || (ADC_PDB_AVAILABLE == STD_ON)) */
  391. } Adc_GroupConfigurationType;
  392. /**
  393. * @brief Structure for ADC configuration.
  394. * @details Data structure containing the set of configuration parameters required
  395. * for initializing the ADC Driver.
  396. * @api
  397. * @implements Adc_ConfigType_struct
  398. * SWS_Adc_00505
  399. */
  400. typedef struct
  401. {
  402. Adc_Ipw_Config const * pAdcIpwConfig;
  403. /** @brief Group configurations */
  404. const Adc_GroupConfigurationType * pGroups;
  405. /** @brief Total number of groups */
  406. Adc_GroupType GroupCount;
  407. /** @brief Miscellaneous configuration parameters */
  408. const uint16 * pGroupIdToIndexMap;
  409. /** @brief Configuration CoreID */
  410. uint32 u32CoreId;
  411. /**< @brief Assigned Partition*/
  412. const uint8 * pAssignmentPartition; /* generated from ECUC partition reference. TODO: check can be moved in configurator (check that core from AdcHwUnitEcucPartitionRef is among AdcEcucPartitionRef). TBD */
  413. /**< @brief Number of Partition */
  414. const uint8 AssignedPartitionCount; /* remove if pAssignmentPartition is removed */
  415. } Adc_ConfigType;
  416. /*==================================================================================================
  417. GLOBAL VARIABLE DECLARATIONS
  418. ==================================================================================================*/
  419. /*==================================================================================================
  420. FUNCTION PROTOTYPES
  421. ==================================================================================================*/
  422. #ifdef __cplusplus
  423. }
  424. #endif
  425. /** @} */
  426. #endif /* ADC_TYPES_H */