MCUSW
Adc.h
Go to the documentation of this file.
1 /*
2 *
3 * Copyright (c) 2019 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 requirements which are met by this ADC
96  * driver which can't be mapped to a particular source ID
97  */
98 /* Design : DES_ADC_001, DES_ADC_016 */
99 /*
100  * Requirements : MCAL-3172, MCAL-3185, MCAL-3206, MCAL-3207,
101  * MCAL-3228, MCAL-3417, MCAL-3430, MCAL-3471, MCAL-981
102  * MCAL-4473
103  */
104 
105 /*
106  * Below are the ADC's module environment requirements which can't be mapped
107  * to this driver
108  */
109 /*
110  * Requirements : MCAL-3186, MCAL-3208, MCAL-3209, MCAL-3272,
111  * MCAL-3273, MCAL-3281, MCAL-3289, MCAL-3372,
112  * MCAL-3381, MCAL-3419,
113  */
114 
115 #ifndef ADC_H_
116 #define ADC_H_
117 
118 /* ========================================================================== */
119 /* Include Files */
120 /* ========================================================================== */
121 
122 #include "Std_Types.h"
123 /* Design : DES_ADC_011 */
124 #include "Adc_Cfg.h"
125 #include "Adc_Irq.h"
126 
127 #ifdef __cplusplus
128 extern "C"
129 {
130 #endif
131 
132 /* ========================================================================== */
133 /* Macros & Typedefs */
134 /* ========================================================================== */
135 
143 #define ADC_SW_MAJOR_VERSION (1U)
144 
145 #define ADC_SW_MINOR_VERSION (2U)
146 
147 #define ADC_SW_PATCH_VERSION (1U)
148 /* @} */
149 
157 #define ADC_AR_RELEASE_MAJOR_VERSION (4U)
158 
159 #define ADC_AR_RELEASE_MINOR_VERSION (3U)
160 
161 #define ADC_AR_RELEASE_REVISION_VERSION (1U)
162 /* @} */
163 
169 #define ADC_VENDOR_ID ((uint16) 44U)
170 
171 #define ADC_MODULE_ID ((uint16) 123U)
172 
173 #define ADC_INSTANCE_ID ((uint8) 0U)
174 /* @} */
175 
181 #define ADC_UNIT_0 ((Adc_HWUnitType) 0U)
182 
183 #define ADC_UNIT_1 ((Adc_HWUnitType) 1U)
184 /* @} */
185 
190 #define ADC_HW_UNIT_CNT (2U)
191 
196 #define ADC_DEF_CHANNEL_RESOLUTION (12U)
197 
208 #define ADC_NUM_CHANNEL (10U)
209 
210 #define ADC_MIN_CHANNEL_ID (0U)
211 
212 #define ADC_MAX_CHANNEL_ID (ADC_NUM_CHANNEL - 1U)
213 
219 #define ADC_NUM_HW_CHANNEL (10U)
220 
221 #define ADC_MIN_HW_CHANNEL_ID (0U)
222 
223 #define ADC_MAX_HW_CHANNEL_ID (ADC_NUM_HW_CHANNEL - 1U)
224 
226 #define ADC_MIN_OPEN_DELAY (0x00U)
227 
228 #define ADC_MAX_OPEN_DELAY (0x3FFFFU)
229 
230 #define ADC_MIN_SAMPLE_DELAY (0x00U)
231 
232 #define ADC_MAX_SAMPLE_DELAY (0xFFU)
233 
234 #define ADC_MIN_RANGE (0x00U)
235 
236 #define ADC_MAX_RANGE (0xFFFU)
237 
238 /* Design : DES_ADC_014 */
239 /* Requirements : MCAL-3464, MCAL-4478 */
240 
247 #ifndef ADC_E_UNINIT
248 
249 #define ADC_E_UNINIT ((uint8) 0x0AU)
250 #endif
251 #ifndef ADC_E_BUSY
252 
253 #define ADC_E_BUSY ((uint8) 0x0BU)
254 #endif
255 #ifndef ADC_E_IDLE
256 
257 #define ADC_E_IDLE ((uint8) 0x0CU)
258 #endif
259 #ifndef ADC_E_ALREADY_INITIALIZED
260 
264 #define ADC_E_ALREADY_INITIALIZED ((uint8) 0x0DU)
265 #endif
266 #ifndef ADC_E_PARAM_CONFIG
267 
268 #define ADC_E_PARAM_CONFIG ((uint8) 0x0EU)
269 #endif
270 #ifndef ADC_E_PARAM_POINTER
271 
272 #define ADC_E_PARAM_POINTER ((uint8) 0x14U)
273 #endif
274 #ifndef ADC_E_PARAM_GROUP
275 
276 #define ADC_E_PARAM_GROUP ((uint8) 0x15U)
277 #endif
278 #ifndef ADC_E_WRONG_CONV_MODE
279 
283 #define ADC_E_WRONG_CONV_MODE ((uint8) 0x16U)
284 #endif
285 #ifndef ADC_E_WRONG_TRIGG_SRC
286 
287 #define ADC_E_WRONG_TRIGG_SRC ((uint8) 0x17U)
288 #endif
289 #ifndef ADC_E_NOTIF_CAPABILITY
290 
294 #define ADC_E_NOTIF_CAPABILITY ((uint8) 0x18U)
295 #endif
296 #ifndef ADC_E_BUFFER_UNINIT
297 
298 #define ADC_E_BUFFER_UNINIT ((uint8) 0x19U)
299 #endif
300 #ifndef ADC_E_NOT_DISENGAGED
301 
302 #define ADC_E_NOT_DISENGAGED ((uint8) 0x1AU)
303 #endif
304 #ifndef ADC_E_POWER_STATE_NOT_SUPPORTED
305 
306 #define ADC_E_POWER_STATE_NOT_SUPPORTED ((uint8) 0x1BU)
307 #endif
308 #ifndef ADC_E_TRANSITION_NOT_POSSIBLE
309 
310 #define ADC_E_TRANSITION_NOT_POSSIBLE ((uint8) 0x1CU)
311 #endif
312 #ifndef ADC_E_PERIPHERAL_NOT_PREPARED
313 
314 #define ADC_E_PERIPHERAL_NOT_PREPARED ((uint8) 0x1DU)
315 #endif
316 /* @} */
317 
319 /* Design : DES_ADC_017 */
320 /* Requirements : MCAL-3230 */
321 typedef uint8 Adc_ChannelType;
322 
324 /* Design : DES_ADC_017 */
325 /* Requirements : MCAL-3231 */
326 typedef uint8 Adc_GroupType;
327 
335 /* Design : DES_ADC_017 */
336 /* Requirements : MCAL-3232, MCAL-3235 */
337 typedef uint32 Adc_ValueGroupType;
338 
340 /* Design : DES_ADC_017 */
341 /* Requirements : MCAL-3236 */
342 typedef uint32 Adc_PrescaleType;
343 
348 /* Design : DES_ADC_017 */
349 /* Requirements : MCAL-3237 */
350 typedef uint16 Adc_ConversionTimeType;
351 
356 /* Design : DES_ADC_017 */
357 /* Requirements : MCAL-3238 */
358 typedef uint16 Adc_SamplingTimeType;
359 
361 /* Requirements : MCAL-3239 */
362 typedef uint8 Adc_ResolutionType;
363 
365 /* Design : DES_ADC_017 */
366 /* Requirements : MCAL-3193, MCAL-3243 */
367 typedef uint8 Adc_GroupPriorityType;
368 
370 /* Design : DES_ADC_017 */
371 /* Requirements : MCAL-3244 */
372 typedef uint32 Adc_GroupDefType;
373 
378 /* Design : DES_ADC_017 */
379 /* Requirements : MCAL-3245 */
380 typedef uint16 Adc_StreamNumSampleType;
381 
383 /* Design : DES_ADC_017 */
384 /* Requirements : MCAL-3249 */
386 
391 typedef uint8 Adc_HWUnitType;
392 
401 #define ADC_SID_INIT ((uint8) 0x00U)
402 
403 #define ADC_SID_DEINIT ((uint8) 0x01U)
404 
405 #define ADC_SID_START_GROUP_CONVERSION ((uint8) 0x02U)
406 
407 #define ADC_SID_STOP_GROUP_CONVERSION ((uint8) 0x03U)
408 
409 #define ADC_SID_READ_GROUP ((uint8) 0x04U)
410 
411 #define ADC_SID_ENABLE_HARDWARE_TRIGGER ((uint8) 0x05U)
412 
413 #define ADC_SID_DISABLE_HARDWARE_TRIGGER ((uint8) 0x06U)
414 
415 #define ADC_SID_ENABLE_GROUP_NOTIFICATION ((uint8) 0x07U)
416 
417 #define ADC_SID_DISABLE_GROUP_NOTIFICATION ((uint8) 0x08U)
418 
419 #define ADC_SID_GET_GROUP_STATUS ((uint8) 0x09U)
420 
421 #define ADC_SID_GET_VERSION_INFO ((uint8) 0x0AU)
422 
423 #define ADC_SID_GET_STREAM_LAST_POINTER ((uint8) 0x0BU)
424 
425 #define ADC_SID_SETUP_RESULT_BUFFER ((uint8) 0x0CU)
426 
427 #define ADC_SID_SET_POWER_STATE ((uint8) 0x10U)
428 
429 #define ADC_SID_GET_CURRENT_POWER_STATE ((uint8) 0x11U)
430 
431 #define ADC_SID_GET_TARGET_POWER_STATE ((uint8) 0x12U)
432 
433 #define ADC_SID_PREPARE_POWER_STATE ((uint8) 0x13U)
434 
435 #define ADC_SID_MAIN_POWER_TRANSITION_MANAGER ((uint8) 0x14U)
436 
437 #define ADC_SID_IOHWAB_NOTIFICATION ((uint8) 0x20U)
438 
439 #define ADC_SID_IOHWAB_NOTIFY_READY_FOR_POWER_STATE ((uint8) 0x70U)
440 /* @} */
441 
442 /* ========================================================================== */
443 /* Structures and Enums */
444 /* ========================================================================== */
445 
452 typedef P2FUNC(void, ADC_APPL_CODE, Adc_GroupEndNotifyType)(void);
453 
457 /* Requirements : MCAL-3240 */
458 typedef enum
459 {
474 
478 /* Requirements : MCAL-3241 */
479 /* Design : DES_ADC_005, DES_ADC_006 */
480 typedef enum
481 {
488 
492 /* Requirements : MCAL-3242 */
493 /* Design : DES_ADC_003, DES_ADC_004 */
494 typedef enum
495 {
503 
507 /* Requirements : MCAL-3246 */
508 typedef enum
509 {
518 
522 /* Requirements : MCAL-3247 */
523 typedef enum
524 {
530 
537 /* Requirements : MCAL-3248 */
538 typedef enum
539 {
547 
551 /* Requirements : MCAL-3250 */
552 /* Design : DES_ADC_009 */
553 typedef enum
554 {
562 
567 /* Requirements : MCAL-3251 */
568 typedef enum
569 {
580 
588 /* Requirements : MCAL-3252 */
589 typedef enum
590 {
606 
611 /* Requirements : MCAL-3253 */
612 typedef enum
613 {
620 
624 /* Requirements : MCAL-3254 */
625 typedef enum
626 {
632 
636 /* Requirements : MCAL-3255 */
637 typedef enum
638 {
654 
659 typedef enum
660 {
672 
673 /* Design : DES_ADC_017 */
680 typedef struct
681 {
682  uint32 hwChannelId;
696  uint32 openDelay;
700  uint32 sampleDelay;
711  Adc_AveragingMode averagingMode;
715 
719 /* Design : DES_ADC_018 */
720 /* Requirements : MCAL-3173, MCAL-3176, MCAL-3177, MCAL-3180,
721  * MCAL-3181, MCAL-3178, MCAL-3182, MCAL-3420,
722  * MCAL-3423, MCAL-3425, MCAL-3428, MCAL-3187,
723  * MCAL-3190,
724  */
725 typedef struct
726 {
727  Adc_GroupType groupId;
730  Adc_GroupPriorityType groupPriority;
732  Adc_HWUnitType hwUnitId;
737  Adc_StreamNumSampleType streamNumSamples;
739  Adc_ResolutionType resolution;
743  Adc_GroupConvModeType convMode;
745  Adc_TriggerSourceType triggSrc;
748  Adc_GroupAccessModeType accessMode;
750  Adc_StreamBufferModeType streamBufMode;
752  Adc_HwTriggerSignalType hwTrigSignal;
755  Adc_HwTriggerTimerType hwTrigTimer;
759  Adc_GroupReplacementType groupReplacement;
763  uint32 highRange;
773  uint32 lowRange;
784  uint32 numChannels;
790 
794 typedef struct
795 {
796  Adc_HWUnitType hwUnitId;
799 
803 /* Design : DES_ADC_019 */
804 /* Requirements : MCAL-3229, MCAL-3429 */
805 typedef struct Adc_ConfigType_s
806 {
807  uint8 maxGroup;
810  uint8 maxHwUnit;
818 
819 #if (STD_ON == ADC_REGISTER_READBACK_API)
820 
824 typedef struct
825 {
826  /*
827  * ADC related registers
828  */
829  uint32 adcRev;
831  uint32 adcCtrl;
833  uint32 adcMisc;
837 #endif /* #if (STD_ON == ADC_REGISTER_READBACK_API) */
838 
839 /* @} */
840 
841 /* ========================================================================== */
842 /* Function Declarations */
843 /* ========================================================================== */
844 
862 FUNC(void, ADC_CODE) Adc_Init(
863  P2CONST(Adc_ConfigType, AUTOMATIC, ADC_PBCFG) CfgPtr);
864 
865 #if (STD_ON == ADC_DEINIT_API)
866 
884 FUNC(void, ADC_CODE) Adc_DeInit(void);
885 #endif /* #if (STD_ON == ADC_DEINIT_API) */
886 
916 FUNC(Std_ReturnType, ADC_CODE) Adc_SetupResultBuffer(
917  Adc_GroupType Group,
918  const Adc_ValueGroupType *DataBufferPtr);
919 
938 FUNC(Adc_StatusType, ADC_CODE) Adc_GetGroupStatus(Adc_GroupType Group);
939 
968 /* Design : DES_ADC_007 */
969 FUNC(Adc_StreamNumSampleType, ADC_CODE) Adc_GetStreamLastPointer(
970  Adc_GroupType Group,
971  Adc_ValueGroupType **PtrToSamplePtr);
972 
973 #if (STD_ON == ADC_ENABLE_START_STOP_GROUP_API)
974 
992 FUNC(void, ADC_CODE) Adc_StartGroupConversion(Adc_GroupType Group);
993 
1011 FUNC(void, ADC_CODE) Adc_StopGroupConversion(Adc_GroupType Group);
1012 #endif /* #if (STD_ON == ADC_ENABLE_START_STOP_GROUP_API) */
1013 
1014 #if (STD_ON == ADC_READ_GROUP_API)
1015 
1046 /* Design : DES_ADC_008 */
1047 FUNC(Std_ReturnType, ADC_CODE) Adc_ReadGroup(
1048  Adc_GroupType Group,
1049  Adc_ValueGroupType *DataBufferPtr);
1050 #endif /* #if (STD_ON == ADC_READ_GROUP_API) */
1051 
1052 #if (STD_ON == ADC_GRP_NOTIF_CAPABILITY_API)
1053 
1071 FUNC(void, ADC_CODE) Adc_EnableGroupNotification(Adc_GroupType Group);
1072 
1091 FUNC(void, ADC_CODE) Adc_DisableGroupNotification(Adc_GroupType Group);
1092 #endif /* #if (STD_ON == ADC_GRP_NOTIF_CAPABILITY_API) */
1093 
1094 #if (STD_ON == ADC_VERSION_INFO_API)
1095 
1112 FUNC(void, ADC_CODE) Adc_GetVersionInfo(
1113  P2VAR(Std_VersionInfoType, AUTOMATIC, ADC_APPL_DATA) versioninfo);
1114 #endif /* #if (STD_ON == ADC_VERSION_INFO_API) */
1115 
1116 #if (STD_ON == ADC_REGISTER_READBACK_API)
1117 
1145 FUNC(Std_ReturnType, ADC_CODE) Adc_RegisterReadback(
1146  Adc_HWUnitType HWUnit,
1147  P2VAR(Adc_RegisterReadbackType, AUTOMATIC, ADC_APPL_DATA) RegRbPtr);
1148 #endif /* #if (STD_ON == ADC_REGISTER_READBACK_API) */
1149 
1150 #ifdef __cplusplus
1151 }
1152 #endif
1153 
1154 #endif /* #ifndef ADC_H_ */
1155 
1156 /* @} */
Definition: Adc.h:641
Definition: Adc.h:595
void Adc_StartGroupConversion(Adc_GroupType Group)
Starts the conversion of all channels of the requested ADC Channel group.
Definition: Adc.h:460
#define ADC_NUM_CHANNEL
Number of MCAL channels - in terms of ADC HW, this represents the number of hardware steps...
Definition: Adc.h:208
Adc_StreamBufferModeType
Type for configuring the streaming access mode buffer type.
Definition: Adc.h:508
This file contains ISR function declaration for ADC MCAL driver.
Definition: Adc.h:629
#define ADC_MAX_GROUP
Maximum group across all hwunit.
Definition: Adc_Cfg.h:161
Adc_HWUnitType hwUnitId
Definition: Adc.h:796
uint32 adcCtrl
Definition: Adc.h:831
Definition: Adc.h:557
Structure containing parameters for ADC MCAL channel configuration. In term of ADC hardware...
Definition: Adc.h:680
Definition: Adc.h:510
Definition: Adc.h:544
ADC config structure.
Definition: Adc.h:805
void Adc_Init(const Adc_ConfigType *CfgPtr)
Service for ADC initialization.
Adc_AveragingMode
Enum to number of samplings to average. ADC allows user to program the number of samplings to average...
Definition: Adc.h:659
Adc_StreamBufferModeType streamBufMode
Definition: Adc.h:750
uint32 highRange
Definition: Adc.h:763
Adc_GroupReplacementType
Replacement mechanism, which is used on ADC group level, if a group conversion is interrupted by a gr...
Definition: Adc.h:568
This file contains generated pre compile configuration file for ADC MCAL driver.
uint8 Adc_ChannelType
Numeric ID of an ADC channel.
Definition: Adc.h:321
ADC Hardware unit configuration structure.
Definition: Adc.h:794
Adc_ResolutionType resolution
Definition: Adc.h:739
Std_ReturnType Adc_ReadGroup(Adc_GroupType Group, Adc_ValueGroupType *DataBufferPtr)
Reads the group conversion result of the last completed conversion round of the requested group and s...
Adc_StatusType
Current status of the conversion of the requested ADC Channel group.
Definition: Adc.h:458
Adc_GroupAccessModeType
Type for configuring the access mode to group conversion results.
Definition: Adc.h:523
Adc_GroupEndNotifyType Adc_GroupEndNotification
Definition: Adc.h:734
Definition: Adc.h:665
Definition: Adc.h:593
Adc_AveragingMode averagingMode
Definition: Adc.h:711
Adc_StatusType Adc_GetGroupStatus(Adc_GroupType Group)
Returns the conversion status of the requested ADC Channel group.
Definition: Adc.h:496
Definition: Adc.h:603
Adc_PowerStateType
Power state currently active or set as target power state.
Definition: Adc.h:625
#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:168
Definition: Adc.h:597
Adc_GroupPriorityType groupPriority
Definition: Adc.h:730
Adc_HwTriggerTimerType hwTrigTimer
Definition: Adc.h:755
Adc_GroupReplacementType groupReplacement
Definition: Adc.h:759
uint32 hwChannelId
Definition: Adc.h:682
void Adc_StopGroupConversion(Adc_GroupType Group)
Stops the conversion of the requested ADC Channel group.
Definition: Adc.h:570
void Adc_DisableGroupNotification(Adc_GroupType Group)
Disables the notification mechanism for the requested ADC Channel group.
uint32 adcMisc
Definition: Adc.h:833
Definition: Adc.h:601
uint32 rangeCheckEnable
Definition: Adc.h:704
ADC Group configuration structure.
Definition: Adc.h:725
Definition: Adc.h:463
uint32 openDelay
Definition: Adc.h:696
uint32 adcRev
Definition: Adc.h:829
Definition: Adc.h:540
Definition: Adc.h:542
uint8 Adc_HWUnitType
Specifies the identification (ID) for a ADC Hardware microcontroller peripheral (unit) ...
Definition: Adc.h:391
void(* Adc_GroupEndNotifyType)(void)
Typedef for group end notification function pointer.
Definition: Adc.h:452
Definition: Adc.h:525
void Adc_DeInit(void)
This service sets all ADC HW Units to a state comparable to their power on reset state.
Adc_HwTriggerSignalType hwTrigSignal
Definition: Adc.h:752
Definition: Adc.h:470
uint32 sampleDelay
Definition: Adc.h:700
Adc_ChannelRangeSelectType
In case of active limit checking: defines which conversion values are taken into account related to t...
Definition: Adc.h:589
ADC register readback structure.
Definition: Adc.h:824
Definition: Adc.h:527
uint8 maxGroup
Definition: Adc.h:807
Adc_StreamNumSampleType streamNumSamples
Definition: Adc.h:737
Definition: Adc.h:591
Definition: Adc.h:667
Definition: Adc.h:573
Definition: Adc.h:645
Adc_StreamNumSampleType Adc_GetStreamLastPointer(Adc_GroupType Group, Adc_ValueGroupType **PtrToSamplePtr)
Returns the number of valid samples per channel, stored in the result buffer.
uint16 Adc_SamplingTimeType
Type of sampling time, i.e. the time during which the value is sampled (in clockcycles).
Definition: Adc.h:358
Definition: Adc.h:661
Adc_ResultAlignmentType
Type for alignment of ADC raw results in ADC result buffer (left/right alignment).
Definition: Adc.h:612
uint8 maxHwUnit
Definition: Adc.h:810
uint32 Adc_ValueGroupType
Type for reading the converted values of a channel group (raw, without further scaling, right aligned).
Definition: Adc.h:337
Adc_PowerStateRequestResultType
Result of the requests related to power state transitions.
Definition: Adc.h:637
void Adc_GetVersionInfo(Std_VersionInfoType *versioninfo)
This service returns the version information of this module.
Definition: Adc.h:639
Adc_TriggerSourceType
Type for configuring the trigger source for an ADC Channel group.
Definition: Adc.h:480
uint8 Adc_GroupType
Numeric ID of an ADC channel group.
Definition: Adc.h:326
Adc_GroupType groupId
Definition: Adc.h:727
Adc_GroupAccessModeType accessMode
Definition: Adc.h:748
Definition: Adc.h:643
Adc_TriggerSourceType triggSrc
Definition: Adc.h:745
Adc_GroupConvModeType convMode
Definition: Adc.h:743
Definition: Adc.h:617
uint8 Adc_ResolutionType
Type of channel resolution in number of bits.
Definition: Adc.h:362
Definition: Adc.h:663
Definition: Adc.h:513
Adc_GroupConvModeType
Type for configuring the conversion mode of an ADC Channel group.
Definition: Adc.h:494
Std_ReturnType Adc_SetupResultBuffer(Adc_GroupType Group, const Adc_ValueGroupType *DataBufferPtr)
This service initializes ADC driver with the group specific result buffer start address where the con...
Definition: Adc.h:484
Definition: Adc.h:627
Definition: Adc.h:555
uint32 lowRange
Definition: Adc.h:773
uint8 Adc_HwTriggerTimerType
Type for the value of the ADC module embedded timer.
Definition: Adc.h:385
uint32 numChannels
Definition: Adc.h:784
Adc_PriorityImplementationType
Type for configuring the prioritization mechanism.
Definition: Adc.h:553
uint32 Adc_PrescaleType
Type of clock prescaler factor.
Definition: Adc.h:342
Definition: Adc.h:650
uint32 Adc_GroupDefType
Type of assignment of channels to a channel group.
Definition: Adc.h:372
void Adc_EnableGroupNotification(Adc_GroupType Group)
Enables the notification mechanism for the requested ADC Channel group.
Adc_HWUnitType hwUnitId
Definition: Adc.h:732
uint8 Adc_GroupPriorityType
Priority level of the channel. Lowest priority is 0.
Definition: Adc.h:367
Definition: Adc.h:482
Definition: Adc.h:669
Definition: Adc.h:466
Definition: Adc.h:648
Definition: Adc.h:499
uint16 Adc_StreamNumSampleType
Type for configuring the number of group conversions in streaming access mode (in single access mode...
Definition: Adc.h:380
Definition: Adc.h:599
uint16 Adc_ConversionTimeType
Type of conversion time, i.e. the time during which the sampled analogue value is converted into digi...
Definition: Adc.h:350
Adc_HwTriggerSignalType
Type for configuring on which edge of the hardware trigger signal the driver should react...
Definition: Adc.h:538
Definition: Adc.h:614
Std_ReturnType Adc_RegisterReadback(Adc_HWUnitType HWUnit, Adc_RegisterReadbackType *RegRbPtr)
This function reads the important registers of the hardware unit and returns the value in the structu...
Definition: Adc.h:559