122 #include "Std_Types.h" 143 #define ADC_SW_MAJOR_VERSION (1U) 145 #define ADC_SW_MINOR_VERSION (3U) 147 #define ADC_SW_PATCH_VERSION (2U) 157 #define ADC_AR_RELEASE_MAJOR_VERSION (4U) 159 #define ADC_AR_RELEASE_MINOR_VERSION (3U) 161 #define ADC_AR_RELEASE_REVISION_VERSION (1U) 169 #define ADC_VENDOR_ID ((uint16) 44U) 171 #define ADC_MODULE_ID ((uint16) 123U) 173 #define ADC_INSTANCE_ID ((uint8) 0U) 181 #define ADC_UNIT_0 ((Adc_HWUnitType) 0U) 183 #define ADC_UNIT_1 ((Adc_HWUnitType) 1U) 190 #if defined (SOC_J721E) 191 #define ADC_HW_UNIT_CNT (2U) 192 #elif defined (SOC_J7200) 193 #define ADC_HW_UNIT_CNT (1U) 200 #define ADC_DEF_CHANNEL_RESOLUTION (12U) 212 #define ADC_NUM_CHANNEL (10U) 214 #define ADC_MIN_CHANNEL_ID (0U) 216 #define ADC_MAX_CHANNEL_ID (ADC_NUM_CHANNEL - 1U) 223 #define ADC_NUM_HW_CHANNEL (10U) 225 #define ADC_MIN_HW_CHANNEL_ID (0U) 227 #define ADC_MAX_HW_CHANNEL_ID (ADC_NUM_HW_CHANNEL - 1U) 230 #define ADC_MIN_OPEN_DELAY (0x00U) 232 #define ADC_MAX_OPEN_DELAY (0x3FFFFU) 234 #define ADC_MIN_SAMPLE_DELAY (0x00U) 236 #define ADC_MAX_SAMPLE_DELAY (0xFFU) 238 #define ADC_MIN_RANGE (0x00U) 240 #define ADC_MAX_RANGE (0xFFFU) 253 #define ADC_E_UNINIT ((uint8) 0x0AU) 257 #define ADC_E_BUSY ((uint8) 0x0BU) 261 #define ADC_E_IDLE ((uint8) 0x0CU) 263 #ifndef ADC_E_ALREADY_INITIALIZED 268 #define ADC_E_ALREADY_INITIALIZED ((uint8) 0x0DU) 270 #ifndef ADC_E_PARAM_CONFIG 272 #define ADC_E_PARAM_CONFIG ((uint8) 0x0EU) 274 #ifndef ADC_E_PARAM_POINTER 276 #define ADC_E_PARAM_POINTER ((uint8) 0x14U) 278 #ifndef ADC_E_PARAM_GROUP 280 #define ADC_E_PARAM_GROUP ((uint8) 0x15U) 282 #ifndef ADC_E_WRONG_CONV_MODE 287 #define ADC_E_WRONG_CONV_MODE ((uint8) 0x16U) 289 #ifndef ADC_E_WRONG_TRIGG_SRC 291 #define ADC_E_WRONG_TRIGG_SRC ((uint8) 0x17U) 293 #ifndef ADC_E_NOTIF_CAPABILITY 298 #define ADC_E_NOTIF_CAPABILITY ((uint8) 0x18U) 300 #ifndef ADC_E_BUFFER_UNINIT 302 #define ADC_E_BUFFER_UNINIT ((uint8) 0x19U) 304 #ifndef ADC_E_NOT_DISENGAGED 306 #define ADC_E_NOT_DISENGAGED ((uint8) 0x1AU) 308 #ifndef ADC_E_POWER_STATE_NOT_SUPPORTED 310 #define ADC_E_POWER_STATE_NOT_SUPPORTED ((uint8) 0x1BU) 312 #ifndef ADC_E_TRANSITION_NOT_POSSIBLE 314 #define ADC_E_TRANSITION_NOT_POSSIBLE ((uint8) 0x1CU) 316 #ifndef ADC_E_PERIPHERAL_NOT_PREPARED 318 #define ADC_E_PERIPHERAL_NOT_PREPARED ((uint8) 0x1DU) 405 #define ADC_SID_INIT ((uint8) 0x00U) 407 #define ADC_SID_DEINIT ((uint8) 0x01U) 409 #define ADC_SID_START_GROUP_CONVERSION ((uint8) 0x02U) 411 #define ADC_SID_STOP_GROUP_CONVERSION ((uint8) 0x03U) 413 #define ADC_SID_READ_GROUP ((uint8) 0x04U) 415 #define ADC_SID_ENABLE_HARDWARE_TRIGGER ((uint8) 0x05U) 417 #define ADC_SID_DISABLE_HARDWARE_TRIGGER ((uint8) 0x06U) 419 #define ADC_SID_ENABLE_GROUP_NOTIFICATION ((uint8) 0x07U) 421 #define ADC_SID_DISABLE_GROUP_NOTIFICATION ((uint8) 0x08U) 423 #define ADC_SID_GET_GROUP_STATUS ((uint8) 0x09U) 425 #define ADC_SID_GET_VERSION_INFO ((uint8) 0x0AU) 427 #define ADC_SID_GET_STREAM_LAST_POINTER ((uint8) 0x0BU) 429 #define ADC_SID_SETUP_RESULT_BUFFER ((uint8) 0x0CU) 431 #define ADC_SID_SET_POWER_STATE ((uint8) 0x10U) 433 #define ADC_SID_GET_CURRENT_POWER_STATE ((uint8) 0x11U) 435 #define ADC_SID_GET_TARGET_POWER_STATE ((uint8) 0x12U) 437 #define ADC_SID_PREPARE_POWER_STATE ((uint8) 0x13U) 439 #define ADC_SID_MAIN_POWER_TRANSITION_MANAGER ((uint8) 0x14U) 441 #define ADC_SID_IOHWAB_NOTIFICATION ((uint8) 0x20U) 443 #define ADC_SID_IOHWAB_NOTIFY_READY_FOR_POWER_STATE ((uint8) 0x70U) 809 typedef struct Adc_ConfigType_s
823 #if (STD_ON == ADC_REGISTER_READBACK_API) 870 #if (STD_ON == ADC_DEINIT_API) 982 #if (STD_ON == ADC_ENABLE_START_STOP_GROUP_API) 1025 #if (STD_ON == ADC_READ_GROUP_API) 1064 #if (STD_ON == ADC_GRP_NOTIF_CAPABILITY_API) 1108 #if (STD_ON == ADC_VERSION_INFO_API) 1128 P2VAR(Std_VersionInfoType, AUTOMATIC, ADC_APPL_DATA) versioninfo);
1131 #if (STD_ON == ADC_REGISTER_READBACK_API)
void Adc_StartGroupConversion(Adc_GroupType Group)
Starts the conversion of all channels of the requested ADC Channel group.
#define ADC_NUM_CHANNEL
Number of MCAL channels - in terms of ADC HW, this represents the number of hardware steps....
Definition: Adc.h:212
Adc_StreamBufferModeType
Type for configuring the streaming access mode buffer type.
Definition: Adc.h:512
This file contains ISR function declaration for ADC MCAL driver.
#define ADC_MAX_GROUP
Maximum group across all hwunit.
Definition: Adc_Cfg.h:161
Adc_HWUnitType hwUnitId
Definition: Adc.h:800
uint32 adcCtrl
Definition: Adc.h:835
Structure containing parameters for ADC MCAL channel configuration. In term of ADC hardware,...
Definition: Adc.h:684
ADC config structure.
Definition: Adc.h:809
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:663
Adc_StreamBufferModeType streamBufMode
Definition: Adc.h:754
uint32 highRange
Definition: Adc.h:767
Adc_GroupReplacementType
Replacement mechanism, which is used on ADC group level, if a group conversion is interrupted by a gr...
Definition: Adc.h:572
This file contains generated pre compile configuration file for ADC MCAL driver.
uint8 Adc_ChannelType
Numeric ID of an ADC channel.
Definition: Adc.h:325
ADC Hardware unit configuration structure.
Definition: Adc.h:798
Adc_ResolutionType resolution
Definition: Adc.h:743
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:462
Adc_GroupAccessModeType
Type for configuring the access mode to group conversion results.
Definition: Adc.h:527
Adc_GroupEndNotifyType Adc_GroupEndNotification
Definition: Adc.h:738
Adc_AveragingMode averagingMode
Definition: Adc.h:715
Adc_StatusType Adc_GetGroupStatus(Adc_GroupType Group)
Returns the conversion status of the requested ADC Channel group.
Adc_PowerStateType
Power state currently active or set as target power state.
Definition: Adc.h:629
#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
Adc_GroupPriorityType groupPriority
Definition: Adc.h:734
Adc_HwTriggerTimerType hwTrigTimer
Definition: Adc.h:759
Adc_GroupReplacementType groupReplacement
Definition: Adc.h:763
uint32 hwChannelId
Definition: Adc.h:686
void Adc_StopGroupConversion(Adc_GroupType Group)
Stops the conversion of the requested ADC Channel group.
void Adc_DisableGroupNotification(Adc_GroupType Group)
Disables the notification mechanism for the requested ADC Channel group.
uint32 adcMisc
Definition: Adc.h:837
uint32 rangeCheckEnable
Definition: Adc.h:708
ADC Group configuration structure.
Definition: Adc.h:729
uint32 openDelay
Definition: Adc.h:700
uint32 adcRev
Definition: Adc.h:833
uint8 Adc_HWUnitType
Specifies the identification (ID) for a ADC Hardware microcontroller peripheral (unit)
Definition: Adc.h:395
void(* Adc_GroupEndNotifyType)(void)
Typedef for group end notification function pointer.
Definition: Adc.h:456
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:756
uint32 sampleDelay
Definition: Adc.h:704
Adc_ChannelRangeSelectType
In case of active limit checking: defines which conversion values are taken into account related to t...
Definition: Adc.h:593
ADC register readback structure.
Definition: Adc.h:828
uint8 maxGroup
Definition: Adc.h:811
Adc_StreamNumSampleType streamNumSamples
Definition: Adc.h:741
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:362
Adc_ResultAlignmentType
Type for alignment of ADC raw results in ADC result buffer (left/right alignment).
Definition: Adc.h:616
uint8 maxHwUnit
Definition: Adc.h:814
uint32 Adc_ValueGroupType
Type for reading the converted values of a channel group (raw, without further scaling,...
Definition: Adc.h:341
Adc_PowerStateRequestResultType
Result of the requests related to power state transitions.
Definition: Adc.h:641
void Adc_GetVersionInfo(Std_VersionInfoType *versioninfo)
This service returns the version information of this module.
Adc_TriggerSourceType
Type for configuring the trigger source for an ADC Channel group.
Definition: Adc.h:484
uint8 Adc_GroupType
Numeric ID of an ADC channel group.
Definition: Adc.h:330
Adc_GroupType groupId
Definition: Adc.h:731
Adc_GroupAccessModeType accessMode
Definition: Adc.h:752
Adc_TriggerSourceType triggSrc
Definition: Adc.h:749
Adc_GroupConvModeType convMode
Definition: Adc.h:747
uint8 Adc_ResolutionType
Type of channel resolution in number of bits.
Definition: Adc.h:366
Adc_GroupConvModeType
Type for configuring the conversion mode of an ADC Channel group.
Definition: Adc.h:498
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...
uint32 lowRange
Definition: Adc.h:777
uint8 Adc_HwTriggerTimerType
Type for the value of the ADC module embedded timer.
Definition: Adc.h:389
uint32 numChannels
Definition: Adc.h:788
Adc_PriorityImplementationType
Type for configuring the prioritization mechanism.
Definition: Adc.h:557
uint32 Adc_PrescaleType
Type of clock prescaler factor.
Definition: Adc.h:346
uint32 Adc_GroupDefType
Type of assignment of channels to a channel group.
Definition: Adc.h:376
void Adc_EnableGroupNotification(Adc_GroupType Group)
Enables the notification mechanism for the requested ADC Channel group.
Adc_HWUnitType hwUnitId
Definition: Adc.h:736
uint8 Adc_GroupPriorityType
Priority level of the channel. Lowest priority is 0.
Definition: Adc.h:371
uint16 Adc_StreamNumSampleType
Type for configuring the number of group conversions in streaming access mode (in single access mode,...
Definition: Adc.h:384
uint16 Adc_ConversionTimeType
Type of conversion time, i.e. the time during which the sampled analogue value is converted into digi...
Definition: Adc.h:354
Adc_HwTriggerSignalType
Type for configuring on which edge of the hardware trigger signal the driver should react,...
Definition: Adc.h:542
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...