CLEON  Version 1
Cloud-Offloaded GPS Receiver
hal_adc.c
Go to the documentation of this file.
1 
7 #include "cleon_conf.h"
8 #include "app_define.h"
9 #include "sys_define.h"
10 #include "hal_define.h"
11 #include "fs_define.h"
12 
13 /*----------------------------------------------------------------------------*/
21 void HAL_ADC_Init(void)
22 {
23  ADC12CTL0 |= ADC12SHT0_15 + ADC12SHT1_15 + ADC12MSC + ADC12ON;
24  ADC12CTL1 |= ADC12SHP;
25 
26  ADC12MCTL0 = (ADC12INCH_15 + ADC12SREF_0);
27  ADC12MCTL1 = (ADC12INCH_14 + ADC12SREF_0 + ADC12EOS);
28 
29  ADC12CTL1 |= ADC12CONSEQ_1;
30  ADC12CTL1 |= ADC12CSTARTADD_0;
31 
32  ADC12CTL0 |= ADC12ON;
33 
34  // Initially ADC is disabled
35  ADC12CTL0 |= ADC12ENC;
36 }
37