feat(radio): OS compatibility layer (#5840)

This commit is contained in:
Raphael Coeffic
2025-05-03 19:07:49 +10:00
committed by GitHub
parent c996612b0a
commit ab2a19e153
92 changed files with 1740 additions and 896 deletions
@@ -20,6 +20,7 @@
*/
#include "edgetx.h"
#include "os/sleep.h"
#if defined(GHOST) && defined(HARDWARE_EXTERNAL_MODULE)
@@ -84,7 +85,7 @@ void menuGhostModuleConfig(event_t event)
reusableBuffer.ghostMenu.buttonAction = GHST_BTN_NONE;
reusableBuffer.ghostMenu.menuAction = GHST_MENU_CTRL_CLOSE;
moduleState[EXTERNAL_MODULE].counter = GHST_MENU_CONTROL;
RTOS_WAIT_MS(10);
sleep_ms(10);
popMenu();
break;
}
@@ -20,6 +20,7 @@
*/
#include "edgetx.h"
#include "os/sleep.h"
#include "timers_driver.h"
extern uint8_t g_moduleIdx;
@@ -52,7 +53,7 @@ void menuRadioPowerMeter(event_t event)
moduleState[g_moduleIdx].readModuleInformation(&reusableBuffer.moduleSetup.pxx2.moduleInformation, PXX2_HW_INFO_TX_ID, PXX2_HW_INFO_TX_ID);
/* wait 1s to resume normal operation before leaving */
watchdogSuspend(500 /*5s*/);
RTOS_WAIT_MS(1000);
sleep_ms(1000);
return;
}
@@ -20,6 +20,7 @@
*/
#include "edgetx.h"
#include "os/sleep.h"
#include "timers_driver.h"
extern uint8_t g_moduleIdx;
@@ -49,7 +50,7 @@ void menuRadioSpectrumAnalyser(event_t event)
#endif
/* wait 1s to resume normal operation before leaving */
watchdogSuspend(500 /*5s*/);
RTOS_WAIT_MS(1000);
sleep_ms(1000);
return;
}
+2 -1
View File
@@ -21,6 +21,7 @@
#include "edgetx.h"
#include "inactivity_timer.h"
#include "os/sleep.h"
static bool splashStarted = false;
@@ -53,7 +54,7 @@ void waitSplash()
tmr10ms_t tgtime = get_tmr10ms() + SPLASH_TIMEOUT;
while (tgtime > get_tmr10ms()) {
RTOS_WAIT_TICKS(1);
sleep_ms(1);
getADC();