Fix boot on RP2040 by excluding new FreeRTOS task (#8508)

This commit is contained in:
GUVWAF
2025-11-01 22:48:04 +01:00
committed by GitHub
parent c46abe125c
commit bca0e1abde
3 changed files with 6 additions and 6 deletions

View File

@@ -5,7 +5,7 @@ InputBroker *inputBroker = nullptr;
InputBroker::InputBroker() InputBroker::InputBroker()
{ {
#ifdef HAS_FREE_RTOS #if defined(HAS_FREE_RTOS) && !defined(ARCH_RP2040)
inputEventQueue = xQueueCreate(5, sizeof(InputEvent)); inputEventQueue = xQueueCreate(5, sizeof(InputEvent));
pollSoonQueue = xQueueCreate(5, sizeof(InputPollable *)); pollSoonQueue = xQueueCreate(5, sizeof(InputPollable *));
xTaskCreate(pollSoonWorker, "input-pollSoon", 2 * 1024, this, 10, &pollSoonTask); xTaskCreate(pollSoonWorker, "input-pollSoon", 2 * 1024, this, 10, &pollSoonTask);
@@ -17,7 +17,7 @@ void InputBroker::registerSource(Observable<const InputEvent *> *source)
this->inputEventObserver.observe(source); this->inputEventObserver.observe(source);
} }
#ifdef HAS_FREE_RTOS #if defined(HAS_FREE_RTOS) && !defined(ARCH_RP2040)
void InputBroker::requestPollSoon(InputPollable *pollable) void InputBroker::requestPollSoon(InputPollable *pollable)
{ {
if (xPortInIsrContext() == pdTRUE) { if (xPortInIsrContext() == pdTRUE) {
@@ -52,7 +52,7 @@ int InputBroker::handleInputEvent(const InputEvent *event)
return 0; return 0;
} }
#ifdef HAS_FREE_RTOS #if defined(HAS_FREE_RTOS) && !defined(ARCH_RP2040)
void InputBroker::pollSoonWorker(void *p) void InputBroker::pollSoonWorker(void *p)
{ {
InputBroker *instance = (InputBroker *)p; InputBroker *instance = (InputBroker *)p;

View File

@@ -59,7 +59,7 @@ class InputBroker : public Observable<const InputEvent *>
InputBroker(); InputBroker();
void registerSource(Observable<const InputEvent *> *source); void registerSource(Observable<const InputEvent *> *source);
void injectInputEvent(const InputEvent *event) { handleInputEvent(event); } void injectInputEvent(const InputEvent *event) { handleInputEvent(event); }
#ifdef HAS_FREE_RTOS #if defined(HAS_FREE_RTOS) && !defined(ARCH_RP2040)
void requestPollSoon(InputPollable *pollable); void requestPollSoon(InputPollable *pollable);
void queueInputEvent(const InputEvent *event); void queueInputEvent(const InputEvent *event);
void processInputEventQueue(); void processInputEventQueue();
@@ -69,7 +69,7 @@ class InputBroker : public Observable<const InputEvent *>
int handleInputEvent(const InputEvent *event); int handleInputEvent(const InputEvent *event);
private: private:
#ifdef HAS_FREE_RTOS #if defined(HAS_FREE_RTOS) && !defined(ARCH_RP2040)
QueueHandle_t inputEventQueue; QueueHandle_t inputEventQueue;
QueueHandle_t pollSoonQueue; QueueHandle_t pollSoonQueue;
TaskHandle_t pollSoonTask; TaskHandle_t pollSoonTask;

View File

@@ -1595,7 +1595,7 @@ void loop()
#endif #endif
service->loop(); service->loop();
#if !MESHTASTIC_EXCLUDE_INPUTBROKER && defined(HAS_FREE_RTOS) #if !MESHTASTIC_EXCLUDE_INPUTBROKER && defined(HAS_FREE_RTOS) && !defined(ARCH_RP2040)
if (inputBroker) if (inputBroker)
inputBroker->processInputEventQueue(); inputBroker->processInputEventQueue();
#endif #endif