ADC Low Level Fucntions
[ADC Module]

ADC Low Level Functions. More...

Collaboration diagram for ADC Low Level Fucntions:

Functions

void init_adc (void)
 Configures the ADC accordingly to the ADC Define Configuration values.
void init_vref_source (void)
 < this define is set in adc_config.h file

Detailed Description

ADC Low Level Functions.

Function Documentation

void init_adc ( void   ) 

Configures the ADC accordingly to the ADC Define Configuration values.

Take care that you have to select the ports which will be converted as analog inputs thanks to the DIDR0 and DIDR1 registers.

void init_vref_source ( void   ) 

< this define is set in adc_config.h file

Definition at line 84 of file adc_drv.c.

References Adc_enable_external_vref, Adc_enable_internal_vref, and Adc_enable_vcc_vref.

00085 {
00086 #   if (VREF_SOURCE == 2)
00087        Adc_enable_vcc_vref();
00088 #   elif (VREF_SOURCE == 1)
00089        Adc_enable_internal_vref();
00090 #   elif (VREF_SOURCE == 0)
00091        Adc_enable_external_vref();
00092 #   else
00093 #      error (VREF_SOURCE should be 0, 1 or 2... See config.h file)
00094 #   endif
00095 }


Generated on Wed Oct 22 15:04:02 2008 for AVR172 : Atmel BLDC control on ATAVRMC310 with ATmega32M1 by  doxygen 1.5.7.1