Electronic Load  1.0
Programmable Constant Current Sink
Data Structures | Functions | Variables
adc.h File Reference
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Data Structures

union  ADCData_t
 Holds raw ADC Values for all Channels. More...
 

Functions

void ADCNextChannel (void)
 
static void ADCResetMinMax (void)
 Resets the Min/Max values of the Analog Values. More...
 
void InitADC (void)
 Initializes the On Chip ADC. More...
 

Variables

ADCData_t ADCData
 ADC-Values for the last measurement. More...
 
ADCData_t ADCDataAvg
 Averaged ADC-Values. More...
 
ADCData_t ADCDataMax
 Maximum ADC-Values during last average Period. More...
 
static ADCData_t ADCDataMaxTmp
 
ADCData_t ADCDataMin
 Minimum ADC-Values during last average Period. More...
 
static ADCData_t ADCDataMinTmp
 
static const uint8_t ADCFLAG_NEWAVERAGES =2
 All Averages have been updated. More...
 
static const uint8_t ADCFLAG_NEWRESULTS =1
 All Channels have been updated. More...
 
volatile uint8_t adcFlags
 

Function Documentation

◆ InitADC()

void InitADC ( void  )

Initializes the On Chip ADC.

The ADC is set to free running mode at 115.2kHz clock. This gives one result every 113us or one complete set every 564us.

◆ ADCNextChannel()

void ADCNextChannel ( void  )

◆ ADCResetMinMax()

static void ADCResetMinMax ( void  )
inlinestatic

Resets the Min/Max values of the Analog Values.

Here is the caller graph for this function:

Variable Documentation

◆ adcFlags

volatile uint8_t adcFlags

◆ ADCFLAG_NEWRESULTS

const uint8_t ADCFLAG_NEWRESULTS =1
static

All Channels have been updated.

◆ ADCFLAG_NEWAVERAGES

const uint8_t ADCFLAG_NEWAVERAGES =2
static

All Averages have been updated.

◆ ADCData

ADCData_t ADCData

ADC-Values for the last measurement.

◆ ADCDataAvg

ADCData_t ADCDataAvg

Averaged ADC-Values.

◆ ADCDataMin

ADCData_t ADCDataMin

Minimum ADC-Values during last average Period.

◆ ADCDataMax

ADCData_t ADCDataMax

Maximum ADC-Values during last average Period.

◆ ADCDataMinTmp

ADCData_t ADCDataMinTmp
static

◆ ADCDataMaxTmp

ADCData_t ADCDataMaxTmp
static