Re #3827: added mutex to getADC(), because adcRead() is not reentrant (#3889)

* Re #3827: added mutex to getADC(), because adcRead() is not reentrant

* Re #3827: alternative solution to prevent calling getADC() from different threads, because adcRead() is not reentrant

* Cosmetics
This commit is contained in:
Damjan Adamic
2016-10-08 22:09:25 +02:00
committed by Bertrand Songis
parent 1e4470a007
commit 2dd8b8702f
4 changed files with 25 additions and 12 deletions
+1
View File
@@ -360,6 +360,7 @@ extern uint8_t main_thread_running;
extern char * main_thread_error;
#define getADC()
#define GET_ADC_IF_MIXER_NOT_RUNNING()
#define getADC_bandgap()
#define SIMU_SLEEP(x) do { if (!main_thread_running) return; sleep(x/*ms*/); } while (0)