[simu] Updates for RTOS abstraction layer; Remove further SIMU_SLEEP usages.

This commit is contained in:
Max Paperno
2018-09-08 22:04:37 -04:00
parent a2006940db
commit 66cd99bf6b
8 changed files with 28 additions and 36 deletions
+3 -3
View File
@@ -398,14 +398,14 @@ bool simuIsRunning()
return simu_running;
}
bool simuSleep(uint32_t ms)
uint8_t simuSleep(uint32_t ms)
{
for (uint32_t i = 0; i < ms; ++i){
if (simu_shutdown || !simu_running)
return false;
return 1;
sleep(1);
}
return true;
return 0;
}
void audioConsumeCurrentBuffer()
+2 -6
View File
@@ -232,11 +232,7 @@ extern char * main_thread_error;
#define OPENTX_START_DEFAULT_ARGS simu_start_mode
static inline void getADC()
{
}
#define SIMU_SLEEP(x) simuSleep(x)
static inline void getADC() { }
uint64_t simuTimerMicros(void);
@@ -244,7 +240,7 @@ void simuInit();
void StartSimu(bool tests=true, const char * sdPath = 0, const char * settingsPath = 0);
void StopSimu();
bool simuIsRunning();
bool simuSleep(uint32_t ms);
uint8_t simuSleep(uint32_t ms); // returns true if thread shutdown requested
void simuSetKey(uint8_t key, bool state);
void simuSetTrim(uint8_t trim, bool state);