| BLDC control on ATAVRMC303 with ATxMega128A1

adc_drv.c
Go to the documentation of this file.
1
14 //_____ I N C L U D E S ___________________________________________________
15
16 #include "config.h"
17
18 #ifdef USE_ADC
19 #include "adc_drv.h"
20
21 //_____ M A C R O S ________________________________________________________
22
23
24 //_____ P R I V A T E D E C L A R A T I O N _____________________________
25
26
27 //_____ D E F I N I T I O N ________________________________________________
28
29
30 //_____ D E C L A R A T I O N ______________________________________________
35 void init_adc(void)
36 {
37 Left_adjust_adc_result();
38 Enable_vcc_vref();
39 ADCB.CH0MUXCTRL = (U8) ADC_MUXPOS_PIN1_gc | ADC_INPUTMODE_SINGLEENDED_gc;
40
41 Enable_adc();
42 }
43 #endif // USE_ADC
init_adc
void init_adc(void)
< this define is set on config.h file
Definition: adc_drv.c:35
Left_adjust_adc_result
#define Left_adjust_adc_result()
Definition: adc_drv.h:42
config.h
,v
Enable_vcc_vref
#define Enable_vcc_vref()
Definition: adc_drv.h:58
Enable_adc
#define Enable_adc()
Definition: adc_drv.h:35