![](/media/cache/profiles/c19a46c712c75b70a137f619a0916436.jpg.50x50_q85.png)
Skeleton program for Federico's 4YP project.
Dependencies: WebSocketClient WiflyInterface mbed messages
Fork of IoT_Ex by
Diff: headers/ADC.h
- Revision:
- 2:7abdaa5a9209
- Parent:
- 1:4403f2ed1c1f
- Child:
- 6:424e225d2a91
diff -r 4403f2ed1c1f -r 7abdaa5a9209 headers/ADC.h --- a/headers/ADC.h Tue Oct 04 13:19:19 2016 +0000 +++ b/headers/ADC.h Tue Oct 04 13:59:13 2016 +0000 @@ -19,8 +19,8 @@ #define ADC_MAX 4095.0f -#define STARTADCCONVERSION ADC1->CR2 |= ADC_CR2_JSWSTART // This command starts the ADC Conversion. -#define ADCCONVERSIONCOMPLETE ((ADC1->SR & ADC_SR_JSTRT) == 0) // This command returns true when the ADC conversion is complete. +#define STARTADCCONVERSION ADC1->CR2 |= ADC_CR2_SWSTART // This command starts the ADC Conversion. +#define ADCCONVERSIONCOMPLETE ((ADC1->SR & ADC_SR_EOC) > 0) // This command returns true when the ADC conversion is complete. void ConfigureADC(void);