Compare commits

...

3 Commits

Author SHA1 Message Date
mverch67
2d010af6ba update platform-native commit 2025-04-30 13:10:50 +02:00
mverch67
a76e5643dd remove superfluous check 2025-04-30 12:15:43 +02:00
mverch67
0c615f3dbd move portduino tft task creation into tftSetup 2025-04-30 12:08:13 +02:00
2 changed files with 13 additions and 12 deletions

View File

@ -2,7 +2,7 @@
[portduino_base]
platform =
# renovate: datasource=git-refs depName=platform-native packageName=https://github.com/meshtastic/platform-native gitBranch=develop
https://github.com/meshtastic/platform-native/archive/e19f77e034590669feaaf26214667b76d0821d06.zip
https://github.com/meshtastic/platform-native/archive/622341c6de8a239704318b10c3dbb00c21a3eab3.zip
framework = arduino
build_src_filter =

View File

@ -11,6 +11,7 @@
#ifdef ARCH_PORTDUINO
#include "PortduinoGlue.h"
#include <thread>
#endif
DeviceScreen *deviceScreen = nullptr;
@ -26,14 +27,10 @@ CallbackObserver<DeviceScreen, esp_sleep_wakeup_cause_t> endSleepObserver =
void tft_task_handler(void *param = nullptr)
{
while (true) {
if (deviceScreen) {
spiLock->lock();
deviceScreen->task_handler();
spiLock->unlock();
deviceScreen->sleep();
} else {
delay(100);
}
spiLock->lock();
deviceScreen->task_handler();
spiLock->unlock();
deviceScreen->sleep();
}
}
@ -118,11 +115,15 @@ void tftSetup(void)
}
#endif
if (deviceScreen) {
#ifdef ARCH_ESP32
tftSleepObserver.observe(&notifyLightSleep);
endSleepObserver.observe(&notifyLightSleepEnd);
xTaskCreatePinnedToCore(tft_task_handler, "tft", 10240, NULL, 1, NULL, 0);
tftSleepObserver.observe(&notifyLightSleep);
endSleepObserver.observe(&notifyLightSleepEnd);
xTaskCreatePinnedToCore(tft_task_handler, "tft", 10240, NULL, 1, NULL, 0);
#elif defined(ARCH_PORTDUINO)
std::thread *tft_task = new std::thread([] { tft_task_handler(); });
#endif
}
}
#endif