26 #define HAL_ADC_CONV_INVALID_INDEX 0xFF 27 #define HAL_ADC_MAX_MOD_FREQ 2097152L 29 #define HAL_ADC_V_ARRAY_LENGTH 4 31 #define HAL_ADC_I_ARRAY_LENGTH 4 38 #define HAL_ADC_V_MASK (HAL_ADC_V_ARRAY_LENGTH-1) 39 #define HAL_ADC_I_MASK (HAL_ADC_I_ARRAY_LENGTH-1) 48 #define HAL_ADC_CH0_READ (BIT0) 49 #define HAL_ADC_CH1_READ (BIT1) 50 #define HAL_ADC_CH2_READ (BIT2) 51 #define HAL_ADC_CH3_READ (BIT3) 59 #define HAL_ADC_FREQ_4000_HZ (4000) 60 #define HAL_ADC_FREQ_8000_HZ (8000) 61 #define HAL_ADC_FREQ_16000_HZ (16000) 69 #define HAL_ADC_PHASE_NO_DATA_READY 0x00 70 #define HAL_ADC_PHASE_A_DATA_READY 0x01 71 #define HAL_ADC_PHASE_B_DATA_READY 0x02 72 #define HAL_ADC_PHASE_C_DATA_READY 0x04 73 #define HAL_ADC_PHASE_NEUTRAL_DATA_READY 0x40 74 #define HAL_ADC_PHASE_TOTAL_DATA_READY 0x80 82 #define HAL_ADC_OSR_32 (32-1) 83 #define HAL_ADC_OSR_64 (64-1) 84 #define HAL_ADC_OSR_128 (128-1) 85 #define HAL_ADC_OSR_256 (256-1) uint8_t preload
Preload of the Sigma Delta 24 Channel- Valid 0x00 to SD24_MAX_PRELOAD.
Definition: hal_adc_sd24.h:115
HAL_ADC_SD24_Channel * adcChannelPtr
The highest converter used to start / stop conversions.
Definition: hal_adc_sd24.h:153
void HAL_ADC_clearVariables(uint8_t phase)
The following API clears all the global variables used in the ISR.)
uint8_t masterConverter
Definition: hal_adc_sd24.h:151
void HAL_ADC_printResult(HAL_ADC_SD24_Configuration *config)
The following API sends the stored results to the GUI.
int32_t * samplePtr
Channel enabled used to initialize the SD24 channel.
Definition: hal_adc_sd24.h:117
uint16_t overSampleRatio
Definition: hal_adc_sd24.h:133
This message code is returned when the input frequency is not supported.
Definition: hal_adc_sd24.h:99
uint8_t converter
Definition: hal_adc_sd24.h:119
void HAL_ADC_enableInterrupt(HAL_ADC_SD24_Configuration *config)
The following API enables the interrupt for the master converter.
Definition: hal_adc_sd24.h:96
uint8_t adcChannelLength
Pointer to the location where the channel configuration is stored.
Definition: hal_adc_sd24.h:155
HAL_ADC_message_code HAL_ADC_init(HAL_ADC_SD24_Configuration *config)
The following API configures SD24 module based on user configuration files "emSwLib_userConfig.c" and "emSwLib_userConfig.h".
struct _HAL_ADC_SD24_Channel_ HAL_ADC_SD24_Channel
Contains the SD24 Channel Configuration.
Contains the SD24 Configuration.
Definition: hal_adc_sd24.h:131
void HAL_ADC_startConversion(HAL_ADC_SD24_Configuration *config)
The following API starts the enabled converters.
uint8_t gain
Definition: hal_adc_sd24.h:107
uint8_t referenceSelect
Definition: hal_adc_sd24.h:146
volatile uint8_t phaseDataReady
uint16_t sampleFreq
Definition: hal_adc_sd24.h:140
_HAL_ADC_message_code_
The following enumeration contain all possible HAL_ADC driver return message codes.
Definition: hal_adc_sd24.h:94
enum _HAL_ADC_message_code_ HAL_ADC_message_code
The following enumeration contain all possible HAL_ADC driver return message codes.
void HAL_ADC_disableInterrupt(HAL_ADC_SD24_Configuration *config)
The following API disables the interrupt for the master converter.
void HAL_ADC_stopConversion(HAL_ADC_SD24_Configuration *config)
The following API stops the enabled converters.
Contains the SD24 Channel Configuration.
Definition: hal_adc_sd24.h:105
struct _HAL_ADC_SD24_Configuration_ HAL_ADC_SD24_Configuration
Contains the SD24 Configuration.
HAL_ADC_SD24_Configuration halAdcConfig