MCUSW
|
This files defines ADC MCAL configuration structures
Data Structures | |
struct | Adc_ChannelConfigType |
Structure containing parameters for ADC MCAL channel configuration. In term of ADC hardware, this represents the step configuration. There are ADC_NUM_CHANNEL steps in the ADC hardware and each step could be mapped to an actual hardware input channel. More... | |
struct | Adc_GroupConfigType |
ADC Group configuration structure. More... | |
struct | Adc_HwUnitConfigType |
ADC Hardware unit configuration structure. More... | |
struct | Adc_ConfigType |
ADC config structure. More... | |
struct | Adc_RegisterReadbackType |
ADC register readback structure. More... | |
Functions | |
void | Adc_IrqUnit0 (void) |
void | Adc_IrqUnit1 (void) |
Variables | |
const struct Adc_ConfigType_s | AdcConfigSet |
ADC Configuration struct declaration. More... | |
Typedefs | |
typedef void(* | Adc_GroupEndNotifyType) (void) |
Typedef for group end notification function pointer. More... | |
Enumerations | |
enum | Adc_StatusType { ADC_IDLE, ADC_BUSY, ADC_COMPLETED, ADC_STREAM_COMPLETED } |
Current status of the conversion of the requested ADC Channel group. More... | |
enum | Adc_TriggerSourceType { ADC_TRIGG_SRC_SW, ADC_TRIGG_SRC_HW } |
Type for configuring the trigger source for an ADC Channel group. More... | |
enum | Adc_GroupConvModeType { ADC_CONV_MODE_ONESHOT, ADC_CONV_MODE_CONTINUOUS } |
Type for configuring the conversion mode of an ADC Channel group. More... | |
enum | Adc_StreamBufferModeType { ADC_STREAM_BUFFER_LINEAR, ADC_STREAM_BUFFER_CIRCULAR } |
Type for configuring the streaming access mode buffer type. More... | |
enum | Adc_GroupAccessModeType { ADC_ACCESS_MODE_SINGLE, ADC_ACCESS_MODE_STREAMING } |
Type for configuring the access mode to group conversion results. More... | |
enum | Adc_HwTriggerSignalType { ADC_HW_TRIG_RISING_EDGE, ADC_HW_TRIG_FALLING_EDGE, ADC_HW_TRIG_BOTH_EDGES } |
Type for configuring on which edge of the hardware trigger signal the driver should react, i.e. start the conversion. More... | |
enum | Adc_PriorityImplementationType { ADC_PRIORITY_NONE, ADC_PRIORITY_HW, ADC_PRIORITY_HW_SW } |
Type for configuring the prioritization mechanism. More... | |
enum | Adc_GroupReplacementType { ADC_GROUP_REPL_ABORT_RESTART, ADC_GROUP_REPL_SUSPEND_RESUME } |
Replacement mechanism, which is used on ADC group level, if a group conversion is interrupted by a group which has a higher priority. More... | |
enum | Adc_ChannelRangeSelectType { ADC_RANGE_UNDER_LOW, ADC_RANGE_BETWEEN, ADC_RANGE_OVER_HIGH, ADC_RANGE_ALWAYS, ADC_RANGE_NOT_UNDER_LOW, ADC_RANGE_NOT_BETWEEN, ADC_RANGE_NOT_OVER_HIGH } |
In case of active limit checking: defines which conversion values are taken into account related to the boardes defined with AdcChannelLowLimit and AdcChannelHighLimit. More... | |
enum | Adc_ResultAlignmentType { ADC_ALIGN_LEFT, ADC_ALIGN_RIGHT } |
Type for alignment of ADC raw results in ADC result buffer (left/right alignment). More... | |
enum | Adc_PowerStateType { ADC_FULL_POWER, ADC_ZERO_POWER } |
Power state currently active or set as target power state. More... | |
enum | Adc_PowerStateRequestResultType { ADC_SERVICE_ACCEPTED, ADC_NOT_INIT, ADC_SEQUENCE_ERROR, ADC_HW_FAILURE, ADC_POWER_STATE_NOT_SUPP, ADC_TRANS_NOT_POSSIBLE } |
Result of the requests related to power state transitions. More... | |
enum | Adc_AveragingMode { ADC_AVERAGING_MODE_NONE, ADC_AVERAGING_MODE_2_SAMPLES, ADC_AVERAGING_MODE_4_SAMPLES, ADC_AVERAGING_MODE_8_SAMPLES, ADC_AVERAGING_MODE_16_SAMPLES } |
Enum to number of samplings to average. ADC allows user to program the number of samplings to average. More... | |
Macros | |
#define | ADC_VARIANT_POST_BUILD (STD_ON) |
ADC Build Variant. Build variants.(i.e Pre Compile,Post Build) More... | |
#define | ADC_DEV_ERROR_DETECT (STD_ON) |
Pre Compile config macro name. More... | |
#define | ADC_GROUP_LOG (STD_OFF) |
Enable/disable ADC group log. More... | |
#define | ADC_MAX_GROUP_LOG (100U) |
Maximum group log entries when logging is ON. More... | |
#define | ADC_FIFO_ERR_LOG (STD_OFF) |
Enable/disable ADC FIFO error log. More... | |
#define | ADC_MAX_FIFO_ERR_LOG (100U) |
Maximum FIFO error log entries when logging is ON. More... | |
#define | ADC_VERSION_INFO_API (STD_ON) |
Enable/disable ADC get version info API. More... | |
#define | ADC_READ_GROUP_API (STD_ON) |
Read group API. More... | |
#define | ADC_GRP_NOTIF_CAPABILITY_API (STD_ON) |
Enable/disable ADC enable/disable group notify API. More... | |
#define | ADC_ENABLE_START_STOP_GROUP_API (STD_ON) |
Enable/disable ADC start/stop group notify API. More... | |
#define | ADC_DEINIT_API (STD_ON) |
Enable/disable ADC deinit API. More... | |
#define | ADC_INTERNAL_DIAGNOSTIC_DEBUG_MODE_API (STD_ON) |
Enable/disable Internal Diagnostic Debug Mode API. More... | |
#define | ADC_PRIORITY_IMPLEMENTATION (ADC_PRIORITY_HW_SW) |
Determines whether a priority mechanism is available for prioritization of the conversion requests and if available, the type of prioritization mechanism. More... | |
#define | ADC_ENABLE_QUEUING (STD_ON) |
Determines, if the queuing mechanism is active in case of priority mechanism disabled. More... | |
#define | ADC_RESULT_ALIGNMENT (ADC_ALIGN_RIGHT) |
Alignment of ADC raw results in ADC result buffer (left/right alignment) More... | |
#define | ADC_MAX_GROUP ((uint8)2U) |
Maximum group across all hwunit. More... | |
#define | ADC_MAX_HW_UNIT ((uint8)2U) |
Maximum HW unit - This should match the sum for the below units ISR which are ON. More... | |
#define | ADC_INSTANCE_0 |
#define | ADC_INSTANCE_1 |
#define | ADC_ISR_TYPE (ADC_ISR_CAT1) |
ISR type. More... | |
#define | ADC_OS_COUNTER_ID ((CounterType)0U) |
Counter ID for counter used to count wait ticks. More... | |
#define | ADC_TIMEOUT_DURATION (15000U) |
ADC timeout - used in ADC AFE busy wait and FSM busy wait. More... | |
#define | ADC_REGISTER_READBACK_API (STD_ON) |
Enable/disable ADC register read back API. More... | |
#define | ADC_DIFFERENTIAL_INPUT_ENABLE (STD_OFF) |
Enable/disable ADC differential input support. More... | |
Adc Group Id names | |
#define | AdcConf_AdcHwUnit_AdcHwUnit_0_AdcGroup_AdcGroup_0 (0U) |
#define | ADC_GROUP_ID_0 AdcConf_AdcHwUnit_AdcHwUnit_0_AdcGroup_AdcGroup_0 |
#define | AdcConf_AdcHwUnit_AdcHwUnit_1_AdcGroup_AdcGroup_0 (1U) |
#define | ADC_GROUP_ID_1 AdcConf_AdcHwUnit_AdcHwUnit_1_AdcGroup_AdcGroup_0 |
Adc Hw Unit Id names | |
#define | AdcConf_AdcHwUnit_AdcHwUnit_0 (ADC_UNIT_0) |
#define | ADC_HW_UNIT_ID_0 AdcConf_AdcHwUnit_AdcHwUnit_0 |
#define | AdcConf_AdcHwUnit_AdcHwUnit_1 (ADC_UNIT_1) |
#define | ADC_HW_UNIT_ID_1 AdcConf_AdcHwUnit_AdcHwUnit_1 |
Adc Channel Id names | |
#define | AdcConf_AdcHwUnit_AdcHwUnit_0_AdcChannel_AdcChannel_0 (0U) |
Channel Ids for all channels. More... | |
#define | ADC_HW_UNIT_ID_ADCHWUNIT_0_CHANNEL_ID_ADCCHANNEL_0 AdcConf_AdcHwUnit_AdcHwUnit_0_AdcChannel_AdcChannel_0 |
#define | AdcConf_AdcHwUnit_AdcHwUnit_1_AdcChannel_AdcChannel_0 (0U) |
#define | ADC_HW_UNIT_ID_ADCHWUNIT_1_CHANNEL_ID_ADCCHANNEL_0 AdcConf_AdcHwUnit_AdcHwUnit_1_AdcChannel_AdcChannel_0 |
ADC DEM Error codes to report | |
#define | DemConf_DemEventParameter_ADC_DEM_NO_EVENT (0xFFFFU) |
#define | ADC_DEM_NO_EVENT DemConf_DemEventParameter_ADC_DEM_NO_EVENT |
#define | ADC_E_HARDWARE_ERROR (DemConf_DemEventParameter_ADC_E_HARDWARE_ERROR) |
Hardware failed. More... | |
ADC HW unit Info | |
#define | ADC_UNIT_0 ((Adc_HWUnitType) 0U) |
ADC1 instance. More... | |
#define | ADC_UNIT_1 ((Adc_HWUnitType) 1U) |
ADC2 instance. More... | |
#define | ADC_HW_UNIT_CNT (2U) |
Total HW units - used for array allocation. This should be +1 of the max unit number. More... | |
#define ADC_VARIANT_POST_BUILD (STD_ON) |
ADC Build Variant. Build variants.(i.e Pre Compile,Post Build)
#define ADC_DEV_ERROR_DETECT (STD_ON) |
Pre Compile config macro name.
Enable/disable ADC dev detect error
#define ADC_GROUP_LOG (STD_OFF) |
Enable/disable ADC group log.
#define ADC_MAX_GROUP_LOG (100U) |
Maximum group log entries when logging is ON.
#define ADC_FIFO_ERR_LOG (STD_OFF) |
Enable/disable ADC FIFO error log.
#define ADC_MAX_FIFO_ERR_LOG (100U) |
Maximum FIFO error log entries when logging is ON.
#define ADC_VERSION_INFO_API (STD_ON) |
Enable/disable ADC get version info API.
#define ADC_READ_GROUP_API (STD_ON) |
Read group API.
#define ADC_GRP_NOTIF_CAPABILITY_API (STD_ON) |
Enable/disable ADC enable/disable group notify API.
#define ADC_ENABLE_START_STOP_GROUP_API (STD_ON) |
Enable/disable ADC start/stop group notify API.
#define ADC_DEINIT_API (STD_ON) |
Enable/disable ADC deinit API.
#define ADC_INTERNAL_DIAGNOSTIC_DEBUG_MODE_API (STD_ON) |
Enable/disable Internal Diagnostic Debug Mode API.
#define ADC_PRIORITY_IMPLEMENTATION (ADC_PRIORITY_HW_SW) |
Determines whether a priority mechanism is available for prioritization of the conversion requests and if available, the type of prioritization mechanism.
#define ADC_ENABLE_QUEUING (STD_ON) |
Determines, if the queuing mechanism is active in case of priority mechanism disabled.
#define ADC_RESULT_ALIGNMENT (ADC_ALIGN_RIGHT) |
Alignment of ADC raw results in ADC result buffer (left/right alignment)
#define ADC_MAX_GROUP ((uint8)2U) |
Maximum group across all hwunit.
#define ADC_MAX_HW_UNIT ((uint8)2U) |
Maximum HW unit - This should match the sum for the below units ISR which are ON.
#define ADC_INSTANCE_0 |
< ADC UNIT 0 INSTANCE ADC UNIT 1 INSTANCE
#define ADC_INSTANCE_1 |
#define ADC_ISR_TYPE (ADC_ISR_CAT1) |
ISR type.
#define ADC_OS_COUNTER_ID ((CounterType)0U) |
Counter ID for counter used to count wait ticks.
#define ADC_TIMEOUT_DURATION (15000U) |
ADC timeout - used in ADC AFE busy wait and FSM busy wait.
#define ADC_REGISTER_READBACK_API (STD_ON) |
Enable/disable ADC register read back API.
#define ADC_DIFFERENTIAL_INPUT_ENABLE (STD_OFF) |
Enable/disable ADC differential input support.
#define AdcConf_AdcHwUnit_AdcHwUnit_0_AdcGroup_AdcGroup_0 (0U) |
#define ADC_GROUP_ID_0 AdcConf_AdcHwUnit_AdcHwUnit_0_AdcGroup_AdcGroup_0 |
#define AdcConf_AdcHwUnit_AdcHwUnit_1_AdcGroup_AdcGroup_0 (1U) |
#define ADC_GROUP_ID_1 AdcConf_AdcHwUnit_AdcHwUnit_1_AdcGroup_AdcGroup_0 |
#define AdcConf_AdcHwUnit_AdcHwUnit_0 (ADC_UNIT_0) |
#define ADC_HW_UNIT_ID_0 AdcConf_AdcHwUnit_AdcHwUnit_0 |
#define AdcConf_AdcHwUnit_AdcHwUnit_1 (ADC_UNIT_1) |
#define ADC_HW_UNIT_ID_1 AdcConf_AdcHwUnit_AdcHwUnit_1 |
#define AdcConf_AdcHwUnit_AdcHwUnit_0_AdcGroup_AdcGroup_0_AdcChannel_AdcChannel_0 (0U) |
Channel Ids for each group.
#define ADC_HW_UNIT_ID_ADCHWUNIT_0_GROUP_ID_CHANNEL_ID_ADCCHANNEL_0 AdcConf_AdcHwUnit_AdcHwUnit_0_AdcGroup_AdcGroup_0_AdcChannel_AdcChannel_0 |
#define AdcConf_AdcHwUnit_AdcHwUnit_1_AdcGroup_AdcGroup_0_AdcChannel_AdcChannel_0 (0U) |
#define ADC_HW_UNIT_ID_ADCHWUNIT_1_GROUP_ID_CHANNEL_ID_ADCCHANNEL_0 AdcConf_AdcHwUnit_AdcHwUnit_1_AdcGroup_AdcGroup_0_AdcChannel_AdcChannel_0 |
#define AdcConf_AdcHwUnit_AdcHwUnit_0_AdcChannel_AdcChannel_0 (0U) |
Channel Ids for all channels.
#define ADC_HW_UNIT_ID_ADCHWUNIT_0_CHANNEL_ID_ADCCHANNEL_0 AdcConf_AdcHwUnit_AdcHwUnit_0_AdcChannel_AdcChannel_0 |
#define AdcConf_AdcHwUnit_AdcHwUnit_1_AdcChannel_AdcChannel_0 (0U) |
#define ADC_HW_UNIT_ID_ADCHWUNIT_1_CHANNEL_ID_ADCCHANNEL_0 AdcConf_AdcHwUnit_AdcHwUnit_1_AdcChannel_AdcChannel_0 |
#define DemConf_DemEventParameter_ADC_DEM_NO_EVENT (0xFFFFU) |
#define ADC_DEM_NO_EVENT DemConf_DemEventParameter_ADC_DEM_NO_EVENT |
#define ADC_E_HARDWARE_ERROR (DemConf_DemEventParameter_ADC_E_HARDWARE_ERROR) |
Hardware failed.
#define ADC_UNIT_0 ((Adc_HWUnitType) 0U) |
ADC1 instance.
#define ADC_UNIT_1 ((Adc_HWUnitType) 1U) |
ADC2 instance.
#define ADC_HW_UNIT_CNT (2U) |
Total HW units - used for array allocation. This should be +1 of the max unit number.
typedef void(* Adc_GroupEndNotifyType) (void) |
Typedef for group end notification function pointer.
enum Adc_StatusType |
Current status of the conversion of the requested ADC Channel group.
Type for configuring the conversion mode of an ADC Channel group.
Type for configuring the streaming access mode buffer type.
Type for configuring on which edge of the hardware trigger signal the driver should react, i.e. start the conversion.
Note: This feature is not supported in this driver
Replacement mechanism, which is used on ADC group level, if a group conversion is interrupted by a group which has a higher priority.
In case of active limit checking: defines which conversion values are taken into account related to the boardes defined with AdcChannelLowLimit and AdcChannelHighLimit.
Note: This feature is not supported yet.
enum Adc_PowerStateType |
Result of the requests related to power state transitions.
enum Adc_AveragingMode |
Enum to number of samplings to average. ADC allows user to program the number of samplings to average.
void Adc_IrqUnit0 | ( | void | ) |
< ADC UNIT 0 ISR ADC UNIT 1 ISR
void Adc_IrqUnit1 | ( | void | ) |
const struct Adc_ConfigType_s AdcConfigSet |
ADC Configuration struct declaration.