NetBurner 3.5.6
PDF Version
PeriodicAD.h
1/*NB_REVISION*/
2
3/*NB_COPYRIGHT*/
4
5#define ADC_CR1_STOP 0x4000
6#define ADC_CR1_START 0x2000
7#define ADC_CR1_LOOP 0x0002
8#define ADC_CR2_INIT_OFF 0x0000
9#define ADC_ZCCR_OFF 0x0000
10#define ADC_SDIS_ENABLE_ALL 0x0000
11#define ADC_SDIS_DISABLE_ALL 0x0000
12
13void InitSingleEndAD(); // Setup the A/D converter to be ready to run
14
15void StartAD(); // Start A/D conversion set.
16
17void StartADLoop(); // Start A/D conversion set, continuous loop mode.
18
19void StopAD(); // Stop A/D conversion set.
20
21bool ADDone(); // Return true if the conversion is complete
22
23uint16_t GetADResult(int ch); // Return the AD Result