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
+6 -5
View File
@@ -29,10 +29,11 @@
#include "stm32_exti_driver.h"
#include "hal.h"
#include "timers_driver.h"
#include "tp_gt911.h"
#include "delays_driver.h"
#include "rtos.h"
#include "os/sleep.h"
#include "edgetx_types.h"
#include "debug.h"
@@ -651,7 +652,7 @@ struct TouchState touchPanelRead()
touchEventOccured = false;
uint32_t startReadStatus = RTOS_GET_MS();
uint32_t startReadStatus = timersGetMsTick();
do {
if (!I2C_GT911_ReadRegister(GT911_READ_XY_REG, &state, 1)) {
// ledRed();
@@ -665,15 +666,15 @@ struct TouchState touchPanelRead()
// ready
break;
}
RTOS_WAIT_MS(1);
} while (RTOS_GET_MS() - startReadStatus < GT911_TIMEOUT);
sleep_ms(1);
} while (timersGetMsTick() - startReadStatus < GT911_TIMEOUT);
internalTouchState.deltaX = 0;
internalTouchState.deltaY = 0;
TRACE("touch state = 0x%x", state);
if (state & 0x80u) {
uint8_t pointsCount = (state & 0x0Fu);
uint32_t now = RTOS_GET_MS();
uint32_t now = timersGetMsTick();
internalTouchState.tapCount = 0;
if (pointsCount > 0 && pointsCount <= GT911_MAX_TP) {