BLDC control on ATAVRMC303 with ATxMega128A1
ADC Low Level Fucntions

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. More...
 

Detailed Description

ADC Low Level Functions.

Function Documentation

◆ init_adc()

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.

Configures the ADC accordingly to the ADC Define Configuration values.

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.

Definition at line 35 of file adc_drv.c.

References Enable_adc, Enable_vcc_vref, and Left_adjust_adc_result.

36 {
39  ADCB.CH0MUXCTRL = (U8) ADC_MUXPOS_PIN1_gc | ADC_INPUTMODE_SINGLEENDED_gc;
40 
41  Enable_adc();
42 }
#define Left_adjust_adc_result()
Definition: adc_drv.h:42
#define Enable_vcc_vref()
Definition: adc_drv.h:58
#define Enable_adc()
Definition: adc_drv.h:35