MCUSW
Adc.h
Go to the documentation of this file.
1 /*
2 *
3 * Copyright (c) 2024 Texas Instruments Incorporated
4 *
5 * All rights reserved not granted herein.
6 *
7 * Limited License.
8 *
9 * Texas Instruments Incorporated grants a world-wide, royalty-free, non-exclusive
10 * license under copyrights and patents it now or hereafter owns or controls to make,
11 * have made, use, import, offer to sell and sell ("Utilize") this software subject to the
12 * terms herein. With respect to the foregoing patent license, such license is granted
13 * solely to the extent that any such patent is necessary to Utilize the software alone.
14 * The patent license shall not apply to any combinations which include this software,
15 * other than combinations with devices manufactured by or for TI ("TI Devices").
16 * No hardware patent is licensed hereunder.
17 *
18 * Redistributions must preserve existing copyright notices and reproduce this license
19 * (including the above copyright notice and the disclaimer and (if applicable) source
20 * code license limitations below) in the documentation and/or other materials provided
21 * with the distribution
22 *
23 * Redistribution and use in binary form, without modification, are permitted provided
24 * that the following conditions are met:
25 *
26 * * No reverse engineering, decompilation, or disassembly of this software is
27 * permitted with respect to any software provided in binary form.
28 *
29 * * any redistribution and use are licensed by TI for use only with TI Devices.
30 *
31 * * Nothing shall obligate TI to provide you with source code for the software
32 * licensed and provided to you in object code.
33 *
34 * If software source code is provided to you, modification and redistribution of the
35 * source code are permitted provided that the following conditions are met:
36 *
37 * * any redistribution and use of the source code, including any resulting derivative
38 * works, are licensed by TI for use only with TI Devices.
39 *
40 * * any redistribution and use of any object code compiled from the source code
41 * and any resulting derivative works, are licensed by TI for use only with TI Devices.
42 *
43 * Neither the name of Texas Instruments Incorporated nor the names of its suppliers
44 *
45 * may be used to endorse or promote products derived from this software without
46 * specific prior written permission.
47 *
48 * DISCLAIMER.
49 *
50 * THIS SOFTWARE IS PROVIDED BY TI AND TI'S LICENSORS "AS IS" AND ANY EXPRESS
51 * OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
52 * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
53 * IN NO EVENT SHALL TI AND TI'S LICENSORS BE LIABLE FOR ANY DIRECT, INDIRECT,
54 * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
55 * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
56 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
57 * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE
58 * OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
59 * OF THE POSSIBILITY OF SUCH DAMAGE.
60 *
61 */
62 
94 /*
95  * Below are the global design requirements which are met by this ADC
96  * driver which can't be mapped to a particular source ID
97  */
98 /*
99  * Design: MCAL-5723,MCAL-5861
100  */
101 
102 /*
103  * Below are the ADC's module environment design requirements which can't
104  * be mapped to this driver
105  */
106 /*
107  * Design: MCAL-5805,MCAL-5708,MCAL-5739,MCAL-5748
108  */
109 
110  /*
111  * Note: MCAL-5700,MCAL-5834 are prerequisites which are done by SBL/GEL files.
112  */
113 
114 
115 #ifndef ADC_H_
116 #define ADC_H_
117 
118 /* ========================================================================== */
119 /* Include Files */
120 /* ========================================================================== */
121 #include "Std_Types.h"
122 #include "Adc_Cfg.h"
123 
124 #ifdef __cplusplus
125 extern "C"
126 {
127 #endif
128 
129 /* ========================================================================== */
130 /* Macros & Typedefs */
131 /* ========================================================================== */
132 
140 #define ADC_SW_MAJOR_VERSION (9U)
141 
142 #define ADC_SW_MINOR_VERSION (2U)
143 
144 #define ADC_SW_PATCH_VERSION (0U)
145 
146 /* @} */
147 
155 #define ADC_AR_RELEASE_MAJOR_VERSION (4U)
156 
157 #define ADC_AR_RELEASE_MINOR_VERSION (3U)
158 
159 #define ADC_AR_RELEASE_REVISION_VERSION (1U)
160 /* @} */
161 
167 #define ADC_VENDOR_ID ((uint16) 44U)
168 
169 #define ADC_MODULE_ID ((uint16) 123U)
170 
171 #define ADC_INSTANCE_ID ((uint8) 0U)
172 /* @} */
177 #define ADC_DEF_CHANNEL_RESOLUTION ((Adc_ResolutionType) 12U)
178 
189 #define ADC_NUM_CHANNEL (10U)
190 
191 #define ADC_MIN_CHANNEL_ID (0U)
192 
193 #define ADC_MAX_CHANNEL_ID (ADC_NUM_CHANNEL - 1U)
194 
200 #define ADC_NUM_HW_CHANNEL (10U)
201 
202 #define ADC_MIN_HW_CHANNEL_ID (0U)
203 
204 #define ADC_MAX_HW_CHANNEL_ID (ADC_NUM_HW_CHANNEL - 1U)
205 
207 #define ADC_MIN_OPEN_DELAY (0x00U)
208 
209 #define ADC_MAX_OPEN_DELAY (0x3FFFFU)
210 
211 #define ADC_MIN_SAMPLE_DELAY (0x00U)
212 
213 #define ADC_MAX_SAMPLE_DELAY (0xFFU)
214 
215 #define ADC_MIN_RANGE (0x00U)
216 
217 #define ADC_MAX_RANGE (0xFFFU)
218 
219 /*
220  *Design: MCAL-5687
221  */
228 #ifndef ADC_E_UNINIT
229 
230 #define ADC_E_UNINIT ((uint8) 0x0AU)
231 #endif
232 #ifndef ADC_E_BUSY
233 
234 #define ADC_E_BUSY ((uint8) 0x0BU)
235 #endif
236 #ifndef ADC_E_IDLE
237 
238 #define ADC_E_IDLE ((uint8) 0x0CU)
239 #endif
240 #ifndef ADC_E_ALREADY_INITIALIZED
241 
245 #define ADC_E_ALREADY_INITIALIZED ((uint8) 0x0DU)
246 #endif
247 #ifndef ADC_E_PARAM_CONFIG
248 
249 #define ADC_E_PARAM_CONFIG ((uint8) 0x0EU)
250 #endif
251 #ifndef ADC_E_PARAM_POINTER
252 
253 #define ADC_E_PARAM_POINTER ((uint8) 0x14U)
254 #endif
255 #ifndef ADC_E_PARAM_GROUP
256 
257 #define ADC_E_PARAM_GROUP ((uint8) 0x15U)
258 #endif
259 #ifndef ADC_E_WRONG_CONV_MODE
260 
264 #define ADC_E_WRONG_CONV_MODE ((uint8) 0x16U)
265 #endif
266 #ifndef ADC_E_WRONG_TRIGG_SRC
267 
268 #define ADC_E_WRONG_TRIGG_SRC ((uint8) 0x17U)
269 #endif
270 #ifndef ADC_E_NOTIF_CAPABILITY
271 
275 #define ADC_E_NOTIF_CAPABILITY ((uint8) 0x18U)
276 #endif
277 #ifndef ADC_E_BUFFER_UNINIT
278 
279 #define ADC_E_BUFFER_UNINIT ((uint8) 0x19U)
280 #endif
281 #ifndef ADC_E_NOT_DISENGAGED
282 
283 #define ADC_E_NOT_DISENGAGED ((uint8) 0x1AU)
284 #endif
285 #ifndef ADC_E_POWER_STATE_NOT_SUPPORTED
286 
287 #define ADC_E_POWER_STATE_NOT_SUPPORTED ((uint8) 0x1BU)
288 #endif
289 #ifndef ADC_E_TRANSITION_NOT_POSSIBLE
290 
291 #define ADC_E_TRANSITION_NOT_POSSIBLE ((uint8) 0x1CU)
292 #endif
293 #ifndef ADC_E_PERIPHERAL_NOT_PREPARED
294 
295 #define ADC_E_PERIPHERAL_NOT_PREPARED ((uint8) 0x1DU)
296 #endif
297 /* @} */
298 
300 /*
301  *Design: MCAL-5852
302  */
303 typedef uint8 Adc_ChannelType;
304 
306 /*
307  * Design: MCAL-5702
308  */
309 typedef uint8 Adc_GroupType;
310 
318 /*
319  * Design: MCAL-5881,MCAL-5856
320  */
321 typedef uint32 Adc_ValueGroupType;
322 
324 /*
325  * Design: MCAL-5709
326  */
327 typedef uint32 Adc_PrescaleType;
328 
333 /*
334  * Design: MCAL-5822
335  */
336 typedef uint16 Adc_ConversionTimeType;
337 
342 /*
343  * Design: MCAL-5855
344  */
345 typedef uint16 Adc_SamplingTimeType;
346 
348 /*
349  * Design: MCAL-5800
350  */
351 typedef uint8 Adc_ResolutionType;
352 
354 /*
355  * Design: MCAL-5712
356  */
357 typedef uint8 Adc_GroupPriorityType;
358 
360 /*
361  * Design: MCAL-5817
362  */
363 typedef uint32 Adc_GroupDefType;
364 
369 /*
370  * Design: MCAL-5826
371  */
372 typedef uint16 Adc_StreamNumSampleType;
373 
375 /*
376  * Design: MCAL-5858
377  */
379 
384 typedef uint8 Adc_HWUnitType;
385 
386 #if (STD_ON == ADC_INTERNAL_DIAGNOSTIC_DEBUG_MODE_API)
387 
391 typedef uint8 Adc_RefSelType;
392 #endif
393 
402 #define ADC_SID_INIT ((uint8) 0x00U)
403 
404 #define ADC_SID_DEINIT ((uint8) 0x01U)
405 
406 #define ADC_SID_START_GROUP_CONVERSION ((uint8) 0x02U)
407 
408 #define ADC_SID_STOP_GROUP_CONVERSION ((uint8) 0x03U)
409 
410 #define ADC_SID_READ_GROUP ((uint8) 0x04U)
411 
412 #define ADC_SID_ENABLE_HARDWARE_TRIGGER ((uint8) 0x05U)
413 
414 #define ADC_SID_DISABLE_HARDWARE_TRIGGER ((uint8) 0x06U)
415 
416 #define ADC_SID_ENABLE_GROUP_NOTIFICATION ((uint8) 0x07U)
417 
418 #define ADC_SID_DISABLE_GROUP_NOTIFICATION ((uint8) 0x08U)
419 
420 #define ADC_SID_GET_GROUP_STATUS ((uint8) 0x09U)
421 
422 #define ADC_SID_GET_VERSION_INFO ((uint8) 0x0AU)
423 
424 #define ADC_SID_GET_STREAM_LAST_POINTER ((uint8) 0x0BU)
425 
426 #define ADC_SID_SETUP_RESULT_BUFFER ((uint8) 0x0CU)
427 
428 #define ADC_SID_SET_POWER_STATE ((uint8) 0x10U)
429 
430 #define ADC_SID_GET_CURRENT_POWER_STATE ((uint8) 0x11U)
431 
432 #define ADC_SID_GET_TARGET_POWER_STATE ((uint8) 0x12U)
433 
434 #define ADC_SID_PREPARE_POWER_STATE ((uint8) 0x13U)
435 
436 #define ADC_SID_MAIN_POWER_TRANSITION_MANAGER ((uint8) 0x14U)
437 
438 #define ADC_SID_IOHWAB_NOTIFICATION ((uint8) 0x20U)
439 
440 #define ADC_SID_IOHWAB_NOTIFY_READY_FOR_POWER_STATE ((uint8) 0x70U)
441 /* @} */
442 
443 /* ========================================================================== */
444 /* Structures and Enums */
445 /* ========================================================================== */
446 
453 typedef P2FUNC(void, ADC_APPL_CODE, Adc_GroupEndNotifyType)(void);
454 
458 /*
459  * Design: MCAL-5811
460  */
461 typedef enum
462 {
463  ADC_IDLE,
466  ADC_BUSY,
477 
481 /*
482  * Design: MCAL-5836
483  */
484 typedef enum
485 {
492 
496 /*
497  * Design: MCAL-5735
498  */
499 typedef enum
500 {
508 
512 /*
513  * Design: MCAL-5742
514  */
515 typedef enum
516 {
525 
529 /*
530  * Design: MCAL-5769
531  */
532 typedef enum
533 {
539 
546 /*
547  * Design: MCAL-5871
548  */
549 typedef enum
550 {
558 
562 /*
563  * Design: MCAL-5807
564  */
565 typedef enum
566 {
574 
579 /*
580  * Design: MCAL-5732
581  */
582 typedef enum
583 {
594 
602 /*
603  * Design: MCAL-5703
604  */
605 typedef enum
606 {
622 
627 /*
628  * Design: MCAL-5843
629  */
630 typedef enum
631 {
638 
642 /*
643  * Design: MCAL-5829
644  */
645 typedef enum
646 {
652 
656 /*
657  * Design: MCAL-5705
658  */
659 typedef enum
660 {
663  ADC_NOT_INIT,
676 
681 typedef enum
682 {
694 
701 typedef struct
702 {
703  uint32 hwChannelId;
717  uint32 openDelay;
721  uint32 sampleDelay;
736 
740 /*
741  *Design: MCAL-5865,MCAL-5764,MCAL-5756,MCAL-5889,MCAL-5801,MCAL-5883,MCAL-5845,MCAL-5814,MCAL-5757,MCAL-5768
742  */
743 typedef struct
744 {
752  Adc_GroupEndNotifyType Adc_GroupEndNotification;
781  uint32 highRange;
791  uint32 lowRange;
802  uint32 numChannels;
808 
812 typedef struct
813 {
816  uint32 baseAddr;
818 
822 /*
823  * Design: MCAL-5716,MCAL-5760,MCAL-5690
824  */
825 typedef struct Adc_ConfigType_s
826 {
827  uint8 maxGroup;
830  uint8 maxHwUnit;
838 
839 #if (STD_ON == ADC_REGISTER_READBACK_API)
840 
844 typedef struct
845 {
846  /*
847  * ADC related registers
848  */
849  uint32 adcRev;
851  uint32 adcCtrl;
853  uint32 adcMisc;
857 #endif /* #if (STD_ON == ADC_REGISTER_READBACK_API) */
858 
859 /* @} */
860 
861 /* ========================================================================== */
862 /* Function Declarations */
863 /* ========================================================================== */
864 
883 FUNC(void, ADC_CODE) Adc_Init(
885 
886 #if (STD_ON == ADC_DEINIT_API)
887 
906 FUNC(void, ADC_CODE) Adc_DeInit(void);
907 #endif /* #if (STD_ON == ADC_DEINIT_API) */
908 
939 FUNC(Std_ReturnType, ADC_CODE) Adc_SetupResultBuffer(
940  Adc_GroupType Group,
942 
962 FUNC(Adc_StatusType, ADC_CODE) Adc_GetGroupStatus(Adc_GroupType Group);
963 
993 FUNC(Adc_StreamNumSampleType, ADC_CODE) Adc_GetStreamLastPointer(
994  Adc_GroupType Group,
996 
997 #if (STD_ON == ADC_ENABLE_START_STOP_GROUP_API)
998 
1017 FUNC(void, ADC_CODE) Adc_StartGroupConversion(Adc_GroupType Group);
1018 
1037 FUNC(void, ADC_CODE) Adc_StopGroupConversion(Adc_GroupType Group);
1038 #endif /* #if (STD_ON == ADC_ENABLE_START_STOP_GROUP_API) */
1039 
1040 #if (STD_ON == ADC_READ_GROUP_API)
1041 
1073 FUNC(Std_ReturnType, ADC_CODE) Adc_ReadGroup(
1074  Adc_GroupType Group,
1076 #endif /* #if (STD_ON == ADC_READ_GROUP_API) */
1077 
1078 #if (STD_ON == ADC_GRP_NOTIF_CAPABILITY_API)
1079 
1098 FUNC(void, ADC_CODE) Adc_EnableGroupNotification(Adc_GroupType Group);
1099 
1119 FUNC(void, ADC_CODE) Adc_DisableGroupNotification(Adc_GroupType Group);
1120 #endif /* #if (STD_ON == ADC_GRP_NOTIF_CAPABILITY_API) */
1121 
1122 #if (STD_ON == ADC_VERSION_INFO_API)
1123 
1141 FUNC(void, ADC_CODE) Adc_GetVersionInfo(
1142  P2VAR(Std_VersionInfoType, AUTOMATIC, ADC_APPL_DATA) versioninfo);
1143 #endif /* #if (STD_ON == ADC_VERSION_INFO_API) */
1144 
1145 #if (STD_ON == ADC_REGISTER_READBACK_API)
1146 
1175 FUNC(Std_ReturnType, ADC_CODE) Adc_RegisterReadback(
1176  Adc_HWUnitType HWUnit,
1178 #endif /* #if (STD_ON == ADC_REGISTER_READBACK_API) */
1179 
1180 #if (STD_ON == ADC_INTERNAL_DIAGNOSTIC_DEBUG_MODE_API)
1181 
1204 FUNC(Std_ReturnType, ADC_CODE) Adc_EnableInternalDiagnostic(
1206 
1225 FUNC(Std_ReturnType, ADC_CODE) Adc_DisableInternalDiagnostic(
1226  Adc_GroupType Group);
1227 #endif /* #if (STD_ON == ADC_INTERNAL_DIAGNOSTIC_DEBUG_MODE_API) */
1228 
1229 #ifdef __cplusplus
1230 }
1231 #endif
1232 
1233 #endif /* #ifndef ADC_H_ */
1234 
1235 /* @} */
ADC_AVERAGING_MODE_8_SAMPLES
@ ADC_AVERAGING_MODE_8_SAMPLES
Definition: Adc.h:689
Adc_ChannelConfigType::sampleDelay
uint32 sampleDelay
Definition: Adc.h:721
ADC_STREAM_BUFFER_CIRCULAR
@ ADC_STREAM_BUFFER_CIRCULAR
Definition: Adc.h:520
Adc_ConfigType::maxGroup
uint8 maxGroup
Definition: Adc.h:827
Adc_GroupConfigType::groupPriority
Adc_GroupPriorityType groupPriority
Definition: Adc.h:748
ADC_RANGE_BETWEEN
@ ADC_RANGE_BETWEEN
Definition: Adc.h:609
Adc_Cfg.h
This file contains generated pre compile configuration file for ADC MCAL driver.
Adc_HwUnitConfigType
ADC Hardware unit configuration structure.
Definition: Adc.h:813
ADC_CONV_MODE_CONTINUOUS
@ ADC_CONV_MODE_CONTINUOUS
Definition: Adc.h:504
ADC_TRANS_NOT_POSSIBLE
@ ADC_TRANS_NOT_POSSIBLE
Definition: Adc.h:672
ADC_RANGE_OVER_HIGH
@ ADC_RANGE_OVER_HIGH
Definition: Adc.h:611
Adc_ConversionTimeType
uint16 Adc_ConversionTimeType
Type of conversion time, i.e. the time during which the sampled analogue value is converted into digi...
Definition: Adc.h:336
Adc_GroupAccessModeType
Adc_GroupAccessModeType
Type for configuring the access mode to group conversion results.
Definition: Adc.h:533
Adc_GroupConfigType::lowRange
uint32 lowRange
Definition: Adc.h:791
Adc_ChannelConfigType::openDelay
uint32 openDelay
Definition: Adc.h:717
P2FUNC
typedef P2FUNC(void, ADC_APPL_CODE, Adc_GroupEndNotifyType)(void)
Typedef for group end notification function pointer.
Adc_RegisterReadbackType::adcMisc
uint32 adcMisc
Definition: Adc.h:853
ADC_PRIORITY_HW_SW
@ ADC_PRIORITY_HW_SW
Definition: Adc.h:571
Adc_HWUnitType
uint8 Adc_HWUnitType
Specifies the identification (ID) for a ADC Hardware microcontroller peripheral (unit)
Definition: Adc.h:384
ADC_GROUP_REPL_ABORT_RESTART
@ ADC_GROUP_REPL_ABORT_RESTART
Definition: Adc.h:584
Adc_GroupConfigType::accessMode
Adc_GroupAccessModeType accessMode
Definition: Adc.h:766
Adc_GroupConfigType::numChannels
uint32 numChannels
Definition: Adc.h:802
ADC_RANGE_NOT_BETWEEN
@ ADC_RANGE_NOT_BETWEEN
Definition: Adc.h:617
Adc_GroupConfigType::groupReplacement
Adc_GroupReplacementType groupReplacement
Definition: Adc.h:777
ADC_NOT_INIT
@ ADC_NOT_INIT
Definition: Adc.h:663
Adc_GroupConfigType::groupId
Adc_GroupType groupId
Definition: Adc.h:745
PtrToSamplePtr
Adc_ValueGroupType ** PtrToSamplePtr
Definition: Adc.h:995
Adc_RegisterReadbackType::adcRev
uint32 adcRev
Definition: Adc.h:849
ADC_AVERAGING_MODE_NONE
@ ADC_AVERAGING_MODE_NONE
Definition: Adc.h:683
Adc_PriorityImplementationType
Adc_PriorityImplementationType
Type for configuring the prioritization mechanism.
Definition: Adc.h:566
Adc_ValueGroupType
uint32 Adc_ValueGroupType
Type for reading the converted values of a channel group (raw, without further scaling,...
Definition: Adc.h:321
ADC_HW_TRIG_FALLING_EDGE
@ ADC_HW_TRIG_FALLING_EDGE
Definition: Adc.h:553
ADC_HW_FAILURE
@ ADC_HW_FAILURE
Definition: Adc.h:667
ADC_POWER_STATE_NOT_SUPP
@ ADC_POWER_STATE_NOT_SUPP
Definition: Adc.h:670
Adc_RegisterReadbackType
ADC register readback structure.
Definition: Adc.h:845
ADC_ACCESS_MODE_SINGLE
@ ADC_ACCESS_MODE_SINGLE
Definition: Adc.h:534
ADC_HW_TRIG_BOTH_EDGES
@ ADC_HW_TRIG_BOTH_EDGES
Definition: Adc.h:555
Adc_GroupConfigType::streamNumSamples
Adc_StreamNumSampleType streamNumSamples
Definition: Adc.h:755
ADC_PRIORITY_HW
@ ADC_PRIORITY_HW
Definition: Adc.h:569
ADC_STREAM_BUFFER_LINEAR
@ ADC_STREAM_BUFFER_LINEAR
Definition: Adc.h:517
ADC_RANGE_UNDER_LOW
@ ADC_RANGE_UNDER_LOW
Definition: Adc.h:607
RefSelect
Adc_RefSelType RefSelect
Definition: Adc.h:1205
Adc_ChannelConfigType::hwChannelId
uint32 hwChannelId
Definition: Adc.h:703
versioninfo
ADC_APPL_DATA versioninfo
Definition: Adc.h:1142
ADC_RANGE_NOT_UNDER_LOW
@ ADC_RANGE_NOT_UNDER_LOW
Definition: Adc.h:615
ADC_TRIGG_SRC_SW
@ ADC_TRIGG_SRC_SW
Definition: Adc.h:486
Adc_GroupConfigType::convMode
Adc_GroupConvModeType convMode
Definition: Adc.h:761
ADC_AVERAGING_MODE_4_SAMPLES
@ ADC_AVERAGING_MODE_4_SAMPLES
Definition: Adc.h:687
Adc_RegisterReadbackType::adcCtrl
uint32 adcCtrl
Definition: Adc.h:851
Adc_ChannelType
uint8 Adc_ChannelType
Numeric ID of an ADC channel.
Definition: Adc.h:303
Adc_ChannelConfigType
Structure containing parameters for ADC MCAL channel configuration. In term of ADC hardware,...
Definition: Adc.h:702
Adc_ResultAlignmentType
Adc_ResultAlignmentType
Type for alignment of ADC raw results in ADC result buffer (left/right alignment).
Definition: Adc.h:631
RegRbPtr
SPI_APPL_DATA RegRbPtr
Definition: Fls.h:806
Adc_GroupConfigType::Adc_GroupEndNotification
Adc_GroupEndNotifyType Adc_GroupEndNotification
Definition: Adc.h:752
Adc_SamplingTimeType
uint16 Adc_SamplingTimeType
Type of sampling time, i.e. the time during which the value is sampled (in clockcycles).
Definition: Adc.h:345
ADC_MAX_HW_UNIT
#define ADC_MAX_HW_UNIT
Maximum HW unit - This should match the sum for the below units ISR which are ON.
Definition: Adc_Cfg.h:191
Adc_GroupPriorityType
uint8 Adc_GroupPriorityType
Priority level of the channel. Lowest priority is 0.
Definition: Adc.h:357
Adc_GroupConvModeType
Adc_GroupConvModeType
Type for configuring the conversion mode of an ADC Channel group.
Definition: Adc.h:500
Adc_StreamBufferModeType
Adc_StreamBufferModeType
Type for configuring the streaming access mode buffer type.
Definition: Adc.h:516
ADC_AVERAGING_MODE_2_SAMPLES
@ ADC_AVERAGING_MODE_2_SAMPLES
Definition: Adc.h:685
CfgPtr
ADC_PBCFG CfgPtr
Definition: Adc.h:884
ADC_STREAM_COMPLETED
@ ADC_STREAM_COMPLETED
Definition: Adc.h:473
Adc_GroupDefType
uint32 Adc_GroupDefType
Type of assignment of channels to a channel group.
Definition: Adc.h:363
Adc_HwTriggerSignalType
Adc_HwTriggerSignalType
Type for configuring on which edge of the hardware trigger signal the driver should react,...
Definition: Adc.h:550
ADC_TRIGG_SRC_HW
@ ADC_TRIGG_SRC_HW
Definition: Adc.h:488
Adc_AveragingMode
Adc_AveragingMode
Enum to number of samplings to average. ADC allows user to program the number of samplings to average...
Definition: Adc.h:682
P2CONST
P2CONST(void, AUTOMATIC, DIO_CONST) DioConfig_WKUP_GPIO0_B01_ChannelGroupRef[1]
Reference to channel group structure for WKUP_GPIO0_B01 created at config time.
Adc_ChannelConfigType::averagingMode
Adc_AveragingMode averagingMode
Definition: Adc.h:732
Adc_ResolutionType
uint8 Adc_ResolutionType
Type of channel resolution in number of bits.
Definition: Adc.h:351
Adc_GroupConfigType::highRange
uint32 highRange
Definition: Adc.h:781
Adc_ChannelRangeSelectType
Adc_ChannelRangeSelectType
In case of active limit checking: defines which conversion values are taken into account related to t...
Definition: Adc.h:606
ADC_SEQUENCE_ERROR
@ ADC_SEQUENCE_ERROR
Definition: Adc.h:665
Adc_GroupConfigType
ADC Group configuration structure.
Definition: Adc.h:744
ADC_IDLE
@ ADC_IDLE
Definition: Adc.h:463
Adc_PowerStateType
Adc_PowerStateType
Power state currently active or set as target power state.
Definition: Adc.h:646
ADC_SERVICE_ACCEPTED
@ ADC_SERVICE_ACCEPTED
Definition: Adc.h:661
Adc_GroupType
uint8 Adc_GroupType
Numeric ID of an ADC channel group.
Definition: Adc.h:309
DataBufferPtr
const Adc_ValueGroupType * DataBufferPtr
Definition: Adc.h:941
Adc_ConfigType::maxHwUnit
uint8 maxHwUnit
Definition: Adc.h:830
ADC_FULL_POWER
@ ADC_FULL_POWER
Definition: Adc.h:647
Adc_HwUnitConfigType::baseAddr
uint32 baseAddr
Definition: Adc.h:816
Adc_GroupReplacementType
Adc_GroupReplacementType
Replacement mechanism, which is used on ADC group level, if a group conversion is interrupted by a gr...
Definition: Adc.h:583
ADC_ALIGN_LEFT
@ ADC_ALIGN_LEFT
Definition: Adc.h:632
Adc_GroupConfigType::hwTrigSignal
Adc_HwTriggerSignalType hwTrigSignal
Definition: Adc.h:770
ADC_MAX_GROUP
#define ADC_MAX_GROUP
Maximum group across all hwunit.
Definition: Adc_Cfg.h:184
Adc_StatusType
Adc_StatusType
Current status of the conversion of the requested ADC Channel group.
Definition: Adc.h:462
ADC_RANGE_ALWAYS
@ ADC_RANGE_ALWAYS
Definition: Adc.h:613
Adc_HwTriggerTimerType
uint8 Adc_HwTriggerTimerType
Type for the value of the ADC module embedded timer.
Definition: Adc.h:378
Adc_GroupConfigType::triggSrc
Adc_TriggerSourceType triggSrc
Definition: Adc.h:763
Adc_RefSelType
uint8 Adc_RefSelType
Specifies the Reference select for functional internal diagnostic debug mode.
Definition: Adc.h:391
ADC_CONV_MODE_ONESHOT
@ ADC_CONV_MODE_ONESHOT
Definition: Adc.h:501
Adc_GroupConfigType::hwTrigTimer
Adc_HwTriggerTimerType hwTrigTimer
Definition: Adc.h:773
AUTOMATIC
AUTOMATIC
Definition: Adc.h:884
Adc_PowerStateRequestResultType
Adc_PowerStateRequestResultType
Result of the requests related to power state transitions.
Definition: Adc.h:660
ADC_ALIGN_RIGHT
@ ADC_ALIGN_RIGHT
Definition: Adc.h:635
Adc_HwUnitConfigType::hwUnitId
Adc_HWUnitType hwUnitId
Definition: Adc.h:814
ADC_ZERO_POWER
@ ADC_ZERO_POWER
Definition: Adc.h:649
Adc_GroupConfigType::streamBufMode
Adc_StreamBufferModeType streamBufMode
Definition: Adc.h:768
FUNC
FUNC(void, ADC_CODE) Adc_Init(P2CONST(Adc_ConfigType
Service for ADC initialization.
Adc_GroupConfigType::resolution
Adc_ResolutionType resolution
Definition: Adc.h:757
ADC_COMPLETED
@ ADC_COMPLETED
Definition: Adc.h:469
Adc_TriggerSourceType
Adc_TriggerSourceType
Type for configuring the trigger source for an ADC Channel group.
Definition: Adc.h:485
ADC_AVERAGING_MODE_16_SAMPLES
@ ADC_AVERAGING_MODE_16_SAMPLES
Definition: Adc.h:691
ADC_HW_TRIG_RISING_EDGE
@ ADC_HW_TRIG_RISING_EDGE
Definition: Adc.h:551
ADC_GROUP_REPL_SUSPEND_RESUME
@ ADC_GROUP_REPL_SUSPEND_RESUME
Definition: Adc.h:587
Adc_GroupConfigType::hwUnitId
Adc_HWUnitType hwUnitId
Definition: Adc.h:750
P2VAR
P2VAR(Adc_RegisterReadbackType, AUTOMATIC, ADC_APPL_DATA) RegRbPtr)
ADC_PRIORITY_NONE
@ ADC_PRIORITY_NONE
Definition: Adc.h:567
Adc_ChannelConfigType::rangeCheckEnable
uint32 rangeCheckEnable
Definition: Adc.h:725
Adc_PrescaleType
uint32 Adc_PrescaleType
Type of clock prescaler factor.
Definition: Adc.h:327
Adc_StreamNumSampleType
uint16 Adc_StreamNumSampleType
Type for configuring the number of group conversions in streaming access mode (in single access mode,...
Definition: Adc.h:372
ADC_ACCESS_MODE_STREAMING
@ ADC_ACCESS_MODE_STREAMING
Definition: Adc.h:536
ADC_NUM_CHANNEL
#define ADC_NUM_CHANNEL
Number of MCAL channels - in terms of ADC HW, this represents the number of hardware steps....
Definition: Adc.h:189
ADC_BUSY
@ ADC_BUSY
Definition: Adc.h:466
ADC_RANGE_NOT_OVER_HIGH
@ ADC_RANGE_NOT_OVER_HIGH
Definition: Adc.h:619
Adc_ConfigType
ADC config structure.
Definition: Adc.h:826