From 2e97a0b2eca201c2b120cbe32351169fb375c943 Mon Sep 17 00:00:00 2001 From: hreintke Date: Sun, 22 Apr 2018 13:24:07 +0200 Subject: [PATCH 1/5] Add Schedule and Functional/Scheduled Ticker --- cores/esp32/Schedule.cpp | 78 +++++++++++++++++++++++++++++++++ cores/esp32/Schedule.h | 27 ++++++++++++ cores/esp32/main.cpp | 2 + libraries/Ticker/src/Ticker.cpp | 13 ++++++ libraries/Ticker/src/Ticker.h | 47 ++++++++++++++++---- 5 files changed, 158 insertions(+), 9 deletions(-) create mode 100644 cores/esp32/Schedule.cpp create mode 100644 cores/esp32/Schedule.h diff --git a/cores/esp32/Schedule.cpp b/cores/esp32/Schedule.cpp new file mode 100644 index 00000000000..27b9731954d --- /dev/null +++ b/cores/esp32/Schedule.cpp @@ -0,0 +1,78 @@ +#include "Schedule.h" + +struct scheduled_fn_t +{ + scheduled_fn_t* mNext; + std::function mFunc; +}; + +static scheduled_fn_t* sFirst = 0; +static scheduled_fn_t* sLast = 0; + +static scheduled_fn_t* sFirstUnused = 0; +static scheduled_fn_t* sLastUnused = 0; + +static int sCount = 0; + +static scheduled_fn_t* get_fn() { + scheduled_fn_t* result = NULL; + // try to get an item from unused items list + if (sFirstUnused) { + result = sFirstUnused; + sFirstUnused = result->mNext; + if (sFirstUnused == NULL) { + sLastUnused = NULL; + } + } + // if no unused items, and count not too high, allocate a new one + else if (sCount != SCHEDULED_FN_MAX_COUNT) { + result = new scheduled_fn_t; + result->mNext = NULL; + ++sCount; + } + return result; +} + +static void recycle_fn(scheduled_fn_t* fn) +{ + if (!sLastUnused) { + sFirstUnused = fn; + } + else { + sLastUnused->mNext = fn; + } + fn->mNext = NULL; + sLastUnused = fn; +} + +bool schedule_function(std::function fn) +{ + scheduled_fn_t* item = get_fn(); + if (!item) { + return false; + } + item->mFunc = fn; + item->mNext = NULL; + if (!sFirst) { + sFirst = item; + } + else { + sLast->mNext = item; + } + sLast = item; + return true; +} + +void run_scheduled_functions() +{ + scheduled_fn_t* rFirst = sFirst; + sFirst = NULL; + sLast = NULL; + while (rFirst) { + scheduled_fn_t* item = rFirst; + rFirst = item->mNext; + item->mFunc(); + item->mFunc = std::function(); + recycle_fn(item); + } +} diff --git a/cores/esp32/Schedule.h b/cores/esp32/Schedule.h new file mode 100644 index 00000000000..3399972945d --- /dev/null +++ b/cores/esp32/Schedule.h @@ -0,0 +1,27 @@ +#ifndef ESP_SCHEDULE_H +#define ESP_SCHEDULE_H + +#include + +#define SCHEDULED_FN_MAX_COUNT 32 +#define SCHEDULED_FN_INITIAL_COUNT 4 + +// Warning +// This API is not considered stable. +// Function signatures will change. +// You have been warned. + +// Run given function next time `loop` function returns, +// or `run_scheduled_functions` is called. +// Use std::bind to pass arguments to a function, or call a class member function. +// Note: there is no mechanism for cancelling scheduled functions. +// Keep that in mind when binding functions to objects which may have short lifetime. +// Returns false if the number of scheduled functions exceeds SCHEDULED_FN_MAX_COUNT. +bool schedule_function(std::function fn); + +// Run all scheduled functions. +// Use this function if your are not using `loop`, or `loop` does not return +// on a regular basis. +void run_scheduled_functions(); + +#endif //ESP_SCHEDULE_H diff --git a/cores/esp32/main.cpp b/cores/esp32/main.cpp index 771da0452fa..5adc75bc3b1 100644 --- a/cores/esp32/main.cpp +++ b/cores/esp32/main.cpp @@ -1,6 +1,7 @@ #include "freertos/FreeRTOS.h" #include "freertos/task.h" #include "Arduino.h" +#include "Schedule.h" #if CONFIG_AUTOSTART_ARDUINO @@ -15,6 +16,7 @@ void loopTask(void *pvParameters) setup(); for(;;) { loop(); + run_scheduled_functions(); } } diff --git a/libraries/Ticker/src/Ticker.cpp b/libraries/Ticker/src/Ticker.cpp index ce5cf69332c..8cbf432c377 100644 --- a/libraries/Ticker/src/Ticker.cpp +++ b/libraries/Ticker/src/Ticker.cpp @@ -54,5 +54,18 @@ void Ticker::detach() { esp_timer_stop(_timer); esp_timer_delete(_timer); _timer = nullptr; + _callback_function = nullptr; } } + +void Ticker::_static_callback(void* arg){ + Ticker* _this = (Ticker*)arg; + if (_this == nullptr) + { + return; + } + if (_this->_callback_function) + { + _this->_callback_function(); + } +} diff --git a/libraries/Ticker/src/Ticker.h b/libraries/Ticker/src/Ticker.h index 82804e0f37d..0c1a54f3d2c 100644 --- a/libraries/Ticker/src/Ticker.h +++ b/libraries/Ticker/src/Ticker.h @@ -25,6 +25,9 @@ #ifndef TICKER_H #define TICKER_H +#include +#include "Schedule.h" + extern "C" { #include "esp_timer.h" } @@ -36,15 +39,28 @@ class Ticker ~Ticker(); typedef void (*callback_t)(void); typedef void (*callback_with_arg_t)(void*); + typedef std::function callback_function_t; + + void attach_scheduled(float seconds, callback_function_t callback) + { + attach(seconds,std::bind(schedule_function, callback)); + } + + void attach(float seconds, callback_function_t callback) + { + _callback_function = callback; + attach(seconds, _static_callback, (void*)this); + } - void attach(float seconds, callback_t callback) + void attach_ms_scheduled(uint32_t milliseconds, callback_function_t callback) { - _attach_ms(seconds * 1000, true, reinterpret_cast(callback), 0); + attach_ms(milliseconds, std::bind(schedule_function, callback)); } - void attach_ms(uint32_t milliseconds, callback_t callback) + void attach_ms(uint32_t milliseconds, callback_function_t callback) { - _attach_ms(milliseconds, true, reinterpret_cast(callback), 0); + _callback_function = callback; + attach_ms(milliseconds, _static_callback, (void*)this); } template @@ -66,14 +82,26 @@ class Ticker _attach_ms(milliseconds, true, reinterpret_cast(callback), arg32); } - void once(float seconds, callback_t callback) + void once_scheduled(float seconds, callback_function_t callback) { - _attach_ms(seconds * 1000, false, reinterpret_cast(callback), 0); + once(seconds, std::bind(schedule_function, callback)); } - void once_ms(uint32_t milliseconds, callback_t callback) + void once(float seconds, callback_function_t callback) { - _attach_ms(milliseconds, false, reinterpret_cast(callback), 0); + _callback_function = callback; + once(seconds, _static_callback, (void*)this); + } + + void once_ms_scheduled(uint32_t milliseconds, callback_function_t callback) + { + once_ms(milliseconds, std::bind(schedule_function, callback)); + } + + void once_ms(uint32_t milliseconds, callback_function_t callback) + { + _callback_function = callback; + once_ms(milliseconds, _static_callback, (void*)this); } template @@ -97,10 +125,11 @@ class Ticker protected: void _attach_ms(uint32_t milliseconds, bool repeat, callback_with_arg_t callback, uint32_t arg); - + static void _static_callback (void* arg); protected: esp_timer_handle_t _timer; + callback_function_t _callback_function = nullptr; }; From 90a1413b61859af266ac3a8f91cd4b939298d917 Mon Sep 17 00:00:00 2001 From: hreintke Date: Thu, 14 Jun 2018 16:37:35 +0200 Subject: [PATCH 2/5] Update Schedule to use freeRTOS tasks & queues (WIP) --- cores/esp32/FunctionQueue.cpp | 91 +++++++++++++++++++++++++++++++++++ cores/esp32/FunctionQueue.h | 50 +++++++++++++++++++ cores/esp32/Schedule.cpp | 78 ------------------------------ cores/esp32/Schedule.h | 27 ----------- cores/esp32/main.cpp | 11 +++-- libraries/Ticker/src/Ticker.h | 10 ++-- 6 files changed, 154 insertions(+), 113 deletions(-) create mode 100644 cores/esp32/FunctionQueue.cpp create mode 100644 cores/esp32/FunctionQueue.h delete mode 100644 cores/esp32/Schedule.cpp delete mode 100644 cores/esp32/Schedule.h diff --git a/cores/esp32/FunctionQueue.cpp b/cores/esp32/FunctionQueue.cpp new file mode 100644 index 00000000000..4e60cb159da --- /dev/null +++ b/cores/esp32/FunctionQueue.cpp @@ -0,0 +1,91 @@ +/* + * FunctionQueue.cpp + * + * Created on: 9 jun. 2018 + * Author: Herman + */ + +#include +#include +#include "Arduino.h" +#include "freertos/event_groups.h" + +EventGroupHandle_t FunctionQueue::loopEventHandle = xEventGroupCreate(); +uint8_t FunctionQueue::allSynced = 0; +SemaphoreHandle_t FunctionQueue::syncedMutex = xSemaphoreCreateMutex(); + + +FunctionQueue::FunctionQueue() +:FunctionQueue(0) +{ +} + +FunctionQueue::FunctionQueue(uint8_t reqSyncIndex) +:syncIndex(reqSyncIndex) +{ + if (syncIndex != 0) + { + xSemaphoreTake(syncedMutex, portMAX_DELAY); + allSynced |= (1u << syncIndex); + xSemaphoreGive(syncedMutex); + } + + functionQueue = xQueueCreate( 10,sizeof(QueuedItem*) ); + // ARDUINO_RUNNING_CORE is defined in main.cpp core is here hardcoded to 1 + // Priority 1 is identical to the prio of the looptask + xTaskCreatePinnedToCore(staticFunction, "FunctionQueue", 8192, this, 1, &this->functionTask, 1); +} + +FunctionQueue::~FunctionQueue() +{ + if (syncIndex != 0) + { + xSemaphoreTake(syncedMutex, portMAX_DELAY); + allSynced &= ~(1u << syncIndex); + xSemaphoreGive(syncedMutex); + } + vQueueDelete(functionQueue); + vTaskDelete(functionTask); +} + +bool FunctionQueue::scheduleFunction(std::function sf) +{ + QueuedItem* queuedItem = new QueuedItem; + queuedItem->queuedFunction = sf; + xQueueSendToBack(functionQueue,&queuedItem,portMAX_DELAY); + + return true; +} + +void FunctionQueue::staticFunction(void* pvParameters) +{ + FunctionQueue* _this = static_cast(pvParameters); + for (;;) { + if (_this->syncIndex != 0) + { + uint16_t er = xEventGroupSync(loopEventHandle,(1u << _this->syncIndex),0x01,portMAX_DELAY); + int mc = uxQueueMessagesWaiting(_this->functionQueue); + // only run already queued functions to allow recursive + while (mc-- > 0) + { + QueuedItem* queuedItem = nullptr; + if (xQueueReceive(_this->functionQueue, &queuedItem, portMAX_DELAY) == pdTRUE){ + queuedItem->queuedFunction(); + delete queuedItem; + } + } + } + else + { + QueuedItem* queuedItem = nullptr; + if (xQueueReceive(_this->functionQueue, &queuedItem, portMAX_DELAY) == pdTRUE){ + queuedItem->queuedFunction(); + delete queuedItem; + } + } + } + vTaskDelete(NULL); +} + +FunctionQueue FQ; + diff --git a/cores/esp32/FunctionQueue.h b/cores/esp32/FunctionQueue.h new file mode 100644 index 00000000000..7ee402f1f61 --- /dev/null +++ b/cores/esp32/FunctionQueue.h @@ -0,0 +1,50 @@ +/* + * FunctionQueue.h + * + * Created on: 9 jun. 2018 + * Author: Herman + */ + +#ifndef CORE_CORE_FUNCTIONQUEUE_H_ +#define CORE_CORE_FUNCTIONQUEUE_H_ + +#include + +extern "C" +{ +#include "freertos\freeRTOS.h" +#include "freertos\task.h" +#include "freertos\queue.h" +#include "freertos\semphr.h" +#include "freertos/event_groups.h" +} + +class FunctionQueue { +public: + + struct QueuedItem + { + std::function queuedFunction; + }; + + FunctionQueue(); + FunctionQueue(uint8_t); + virtual ~FunctionQueue(); + + static void staticFunction(void* pvParameters); + static EventGroupHandle_t loopEventHandle; + static uint8_t allSynced; + static SemaphoreHandle_t syncedMutex; + + bool scheduleFunction(std::function); + + uint8_t syncIndex; + + QueueHandle_t functionQueue; + TaskHandle_t functionTask; + +}; + +extern FunctionQueue FQ; + +#endif /* CORE_CORE_FUNCTIONQUEUE_H_ */ diff --git a/cores/esp32/Schedule.cpp b/cores/esp32/Schedule.cpp deleted file mode 100644 index 27b9731954d..00000000000 --- a/cores/esp32/Schedule.cpp +++ /dev/null @@ -1,78 +0,0 @@ -#include "Schedule.h" - -struct scheduled_fn_t -{ - scheduled_fn_t* mNext; - std::function mFunc; -}; - -static scheduled_fn_t* sFirst = 0; -static scheduled_fn_t* sLast = 0; - -static scheduled_fn_t* sFirstUnused = 0; -static scheduled_fn_t* sLastUnused = 0; - -static int sCount = 0; - -static scheduled_fn_t* get_fn() { - scheduled_fn_t* result = NULL; - // try to get an item from unused items list - if (sFirstUnused) { - result = sFirstUnused; - sFirstUnused = result->mNext; - if (sFirstUnused == NULL) { - sLastUnused = NULL; - } - } - // if no unused items, and count not too high, allocate a new one - else if (sCount != SCHEDULED_FN_MAX_COUNT) { - result = new scheduled_fn_t; - result->mNext = NULL; - ++sCount; - } - return result; -} - -static void recycle_fn(scheduled_fn_t* fn) -{ - if (!sLastUnused) { - sFirstUnused = fn; - } - else { - sLastUnused->mNext = fn; - } - fn->mNext = NULL; - sLastUnused = fn; -} - -bool schedule_function(std::function fn) -{ - scheduled_fn_t* item = get_fn(); - if (!item) { - return false; - } - item->mFunc = fn; - item->mNext = NULL; - if (!sFirst) { - sFirst = item; - } - else { - sLast->mNext = item; - } - sLast = item; - return true; -} - -void run_scheduled_functions() -{ - scheduled_fn_t* rFirst = sFirst; - sFirst = NULL; - sLast = NULL; - while (rFirst) { - scheduled_fn_t* item = rFirst; - rFirst = item->mNext; - item->mFunc(); - item->mFunc = std::function(); - recycle_fn(item); - } -} diff --git a/cores/esp32/Schedule.h b/cores/esp32/Schedule.h deleted file mode 100644 index 3399972945d..00000000000 --- a/cores/esp32/Schedule.h +++ /dev/null @@ -1,27 +0,0 @@ -#ifndef ESP_SCHEDULE_H -#define ESP_SCHEDULE_H - -#include - -#define SCHEDULED_FN_MAX_COUNT 32 -#define SCHEDULED_FN_INITIAL_COUNT 4 - -// Warning -// This API is not considered stable. -// Function signatures will change. -// You have been warned. - -// Run given function next time `loop` function returns, -// or `run_scheduled_functions` is called. -// Use std::bind to pass arguments to a function, or call a class member function. -// Note: there is no mechanism for cancelling scheduled functions. -// Keep that in mind when binding functions to objects which may have short lifetime. -// Returns false if the number of scheduled functions exceeds SCHEDULED_FN_MAX_COUNT. -bool schedule_function(std::function fn); - -// Run all scheduled functions. -// Use this function if your are not using `loop`, or `loop` does not return -// on a regular basis. -void run_scheduled_functions(); - -#endif //ESP_SCHEDULE_H diff --git a/cores/esp32/main.cpp b/cores/esp32/main.cpp index 5adc75bc3b1..fd2b4ed0197 100644 --- a/cores/esp32/main.cpp +++ b/cores/esp32/main.cpp @@ -1,7 +1,8 @@ #include "freertos/FreeRTOS.h" #include "freertos/task.h" +#include "freertos/event_groups.h" #include "Arduino.h" -#include "Schedule.h" +#include "FunctionQueue.h" #if CONFIG_AUTOSTART_ARDUINO @@ -11,13 +12,17 @@ #define ARDUINO_RUNNING_CORE 1 #endif + void loopTask(void *pvParameters) { setup(); for(;;) { loop(); - run_scheduled_functions(); - } + if (FunctionQueue::allSynced != 0) + { + uint16_t er = xEventGroupSync(FunctionQueue::loopEventHandle,0x01,FunctionQueue::allSynced,portMAX_DELAY); + } + } } extern "C" void app_main() diff --git a/libraries/Ticker/src/Ticker.h b/libraries/Ticker/src/Ticker.h index 0c1a54f3d2c..69c7a48a85e 100644 --- a/libraries/Ticker/src/Ticker.h +++ b/libraries/Ticker/src/Ticker.h @@ -26,7 +26,7 @@ #define TICKER_H #include -#include "Schedule.h" +#include "FunctionQueue.h" extern "C" { #include "esp_timer.h" @@ -43,7 +43,7 @@ class Ticker void attach_scheduled(float seconds, callback_function_t callback) { - attach(seconds,std::bind(schedule_function, callback)); + attach(seconds,std::bind(&FunctionQueue::scheduleFunction, &FQ , callback)); } void attach(float seconds, callback_function_t callback) @@ -54,7 +54,7 @@ class Ticker void attach_ms_scheduled(uint32_t milliseconds, callback_function_t callback) { - attach_ms(milliseconds, std::bind(schedule_function, callback)); + attach_ms(milliseconds, std::bind(&FunctionQueue::scheduleFunction, &FQ , callback)); } void attach_ms(uint32_t milliseconds, callback_function_t callback) @@ -84,7 +84,7 @@ class Ticker void once_scheduled(float seconds, callback_function_t callback) { - once(seconds, std::bind(schedule_function, callback)); + once(seconds, std::bind(&FunctionQueue::scheduleFunction, &FQ , callback)); } void once(float seconds, callback_function_t callback) @@ -95,7 +95,7 @@ class Ticker void once_ms_scheduled(uint32_t milliseconds, callback_function_t callback) { - once_ms(milliseconds, std::bind(schedule_function, callback)); + once_ms(milliseconds, std::bind(&FunctionQueue::scheduleFunction, &FQ , callback)); } void once_ms(uint32_t milliseconds, callback_function_t callback) From 4d6905c52166b2e80e2aafeea5abef3551428afe Mon Sep 17 00:00:00 2001 From: hreintke Date: Tue, 19 Jun 2018 17:18:22 +0200 Subject: [PATCH 3/5] Finalize Function Queue Implementation --- cores/esp32/FunctionQueue.cpp | 56 +++++++++++++++++++++++------------ cores/esp32/FunctionQueue.h | 5 +++- cores/esp32/main.cpp | 8 ++--- 3 files changed, 44 insertions(+), 25 deletions(-) diff --git a/cores/esp32/FunctionQueue.cpp b/cores/esp32/FunctionQueue.cpp index 4e60cb159da..5d1c297c7cc 100644 --- a/cores/esp32/FunctionQueue.cpp +++ b/cores/esp32/FunctionQueue.cpp @@ -11,23 +11,38 @@ #include "freertos/event_groups.h" EventGroupHandle_t FunctionQueue::loopEventHandle = xEventGroupCreate(); -uint8_t FunctionQueue::allSynced = 0; +uint8_t FunctionQueue::allSynced = 0; // Loop is always in the sync group +const uint8_t FunctionQueue::loopIndex = 1; SemaphoreHandle_t FunctionQueue::syncedMutex = xSemaphoreCreateMutex(); - FunctionQueue::FunctionQueue() -:FunctionQueue(0) +:FunctionQueue(false) { } -FunctionQueue::FunctionQueue(uint8_t reqSyncIndex) -:syncIndex(reqSyncIndex) +FunctionQueue::FunctionQueue(bool loopSynced) { - if (syncIndex != 0) + if (loopSynced) { - xSemaphoreTake(syncedMutex, portMAX_DELAY); - allSynced |= (1u << syncIndex); - xSemaphoreGive(syncedMutex); + syncIndex = 0; + for (int ix = loopIndex;ix < 8;ix++) + { + if (((allSynced >> ix) & 1U) == 0) + { + syncIndex = ix; + break; + } + } + if (syncIndex) + { + xSemaphoreTake(syncedMutex, portMAX_DELAY); + allSynced |= (1u << syncIndex); + xSemaphoreGive(syncedMutex); + } + else + { + // To many synced FQ's + } } functionQueue = xQueueCreate( 10,sizeof(QueuedItem*) ); @@ -44,6 +59,7 @@ FunctionQueue::~FunctionQueue() allSynced &= ~(1u << syncIndex); xSemaphoreGive(syncedMutex); } + xEventGroupSetBits(loopEventHandle, (1u << syncIndex)); //Loop still may be waiting on this vQueueDelete(functionQueue); vTaskDelete(functionTask); } @@ -57,6 +73,15 @@ bool FunctionQueue::scheduleFunction(std::function sf) return true; } +void FunctionQueue::processQueueItem() +{ + QueuedItem* queuedItem = nullptr; + if (xQueueReceive(functionQueue, &queuedItem, portMAX_DELAY) == pdTRUE){ + queuedItem->queuedFunction(); + delete queuedItem; + } +} + void FunctionQueue::staticFunction(void* pvParameters) { FunctionQueue* _this = static_cast(pvParameters); @@ -64,24 +89,17 @@ void FunctionQueue::staticFunction(void* pvParameters) if (_this->syncIndex != 0) { uint16_t er = xEventGroupSync(loopEventHandle,(1u << _this->syncIndex),0x01,portMAX_DELAY); + int mc = uxQueueMessagesWaiting(_this->functionQueue); // only run already queued functions to allow recursive while (mc-- > 0) { - QueuedItem* queuedItem = nullptr; - if (xQueueReceive(_this->functionQueue, &queuedItem, portMAX_DELAY) == pdTRUE){ - queuedItem->queuedFunction(); - delete queuedItem; - } + _this->processQueueItem(); // Will always return } } else { - QueuedItem* queuedItem = nullptr; - if (xQueueReceive(_this->functionQueue, &queuedItem, portMAX_DELAY) == pdTRUE){ - queuedItem->queuedFunction(); - delete queuedItem; - } + _this->processQueueItem(); // Will block when queue is empty } } vTaskDelete(NULL); diff --git a/cores/esp32/FunctionQueue.h b/cores/esp32/FunctionQueue.h index 7ee402f1f61..f6705a21cb0 100644 --- a/cores/esp32/FunctionQueue.h +++ b/cores/esp32/FunctionQueue.h @@ -28,13 +28,16 @@ class FunctionQueue { }; FunctionQueue(); - FunctionQueue(uint8_t); + FunctionQueue(bool); virtual ~FunctionQueue(); static void staticFunction(void* pvParameters); static EventGroupHandle_t loopEventHandle; static uint8_t allSynced; static SemaphoreHandle_t syncedMutex; + static const uint8_t loopIndex; + + void processQueueItem(); bool scheduleFunction(std::function); diff --git a/cores/esp32/main.cpp b/cores/esp32/main.cpp index fd2b4ed0197..9bbcab9f71e 100644 --- a/cores/esp32/main.cpp +++ b/cores/esp32/main.cpp @@ -17,11 +17,9 @@ void loopTask(void *pvParameters) { setup(); for(;;) { - loop(); - if (FunctionQueue::allSynced != 0) - { - uint16_t er = xEventGroupSync(FunctionQueue::loopEventHandle,0x01,FunctionQueue::allSynced,portMAX_DELAY); - } + xEventGroupSync(FunctionQueue::loopEventHandle,0x00,FunctionQueue::allSynced,portMAX_DELAY); + loop(); + xEventGroupSetBits(FunctionQueue::loopEventHandle, FunctionQueue::loopIndex);// enable synced fq's to run } } From 1f99fcf17336135e3bb46355bf41e8dd04a98fd2 Mon Sep 17 00:00:00 2001 From: hreintke Date: Fri, 22 Jun 2018 12:12:01 +0200 Subject: [PATCH 4/5] Update freeRTOS.h to FreeRTOS.h --- cores/esp32/FunctionQueue.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/cores/esp32/FunctionQueue.h b/cores/esp32/FunctionQueue.h index f6705a21cb0..5470c88fa73 100644 --- a/cores/esp32/FunctionQueue.h +++ b/cores/esp32/FunctionQueue.h @@ -12,11 +12,11 @@ extern "C" { -#include "freertos\freeRTOS.h" +#include "freertos\FreeRTOS.h" #include "freertos\task.h" #include "freertos\queue.h" #include "freertos\semphr.h" -#include "freertos/event_groups.h" +#include "freertos\event_groups.h" } class FunctionQueue { From 46e1ae82b17b5e189956ba40d4621c2db7ab7db6 Mon Sep 17 00:00:00 2001 From: hreintke Date: Fri, 22 Jun 2018 12:34:28 +0200 Subject: [PATCH 5/5] Update slashes in includes --- cores/esp32/FunctionQueue.h | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/cores/esp32/FunctionQueue.h b/cores/esp32/FunctionQueue.h index 5470c88fa73..db001116f04 100644 --- a/cores/esp32/FunctionQueue.h +++ b/cores/esp32/FunctionQueue.h @@ -12,11 +12,11 @@ extern "C" { -#include "freertos\FreeRTOS.h" -#include "freertos\task.h" -#include "freertos\queue.h" -#include "freertos\semphr.h" -#include "freertos\event_groups.h" +#include "freertos/FreeRTOS.h" +#include "freertos/task.h" +#include "freertos/queue.h" +#include "freertos/semphr.h" +#include "freertos/event_groups.h" } class FunctionQueue {