Ensure ADC conversion is complete before reading (#11370)

Co-Authored-By: gloomyandy <andy-git@gloomy-place.com>
This commit is contained in:
Scott Lahteine
2018-07-26 03:58:33 -05:00
committed by GitHub
parent b5ed4a1a8c
commit 56fbe3361b
3 changed files with 125 additions and 104 deletions

View File

@@ -59,6 +59,7 @@
* States for ADC reading in the ISR
*/
enum ADCSensorState : char {
StartSampling,
#if HAS_TEMP_ADC_0
PrepareTemp_0,
MeasureTemp_0,
@@ -329,6 +330,7 @@ class Temperature {
/**
* Called from the Temperature ISR
*/
static void readings_ready();
static void isr();
/**