Skip to content

Commit 1355467

Browse files
committed
Make entry points into sequential cont scheduler weak functions
Move Schedule to libraries
1 parent 7b5489e commit 1355467

File tree

7 files changed

+23
-4
lines changed

7 files changed

+23
-4
lines changed

CMakeLists.txt

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,6 @@ set(CORE_SRCS
2929
cores/esp32/MD5Builder.cpp
3030
cores/esp32/Print.cpp
3131
cores/esp32/stdlib_noniso.c
32-
cores/esp32/Schedule.cpp
3332
cores/esp32/Stream.cpp
3433
cores/esp32/StreamString.cpp
3534
cores/esp32/wiring_pulse.c
@@ -52,6 +51,7 @@ set(LIBRARY_SRCS
5251
libraries/HTTPUpdate/src/HTTPUpdate.cpp
5352
libraries/NetBIOS/src/NetBIOS.cpp
5453
libraries/Preferences/src/Preferences.cpp
54+
libraries/Schedule/src/Schedule.cpp
5555
libraries/SD_MMC/src/SD_MMC.cpp
5656
libraries/SD/src/SD.cpp
5757
libraries/SD/src/sd_diskio.cpp
@@ -191,6 +191,7 @@ set(COMPONENT_ADD_INCLUDEDIRS
191191
libraries/HTTPUpdate/src
192192
libraries/NetBIOS/src
193193
libraries/Preferences/src
194+
libraries/Schedule/src
194195
libraries/SD_MMC/src
195196
libraries/SD/src
196197
libraries/SimpleBLE/src

cores/esp32/Arduino.h

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -156,7 +156,6 @@ void shiftOut(uint8_t dataPin, uint8_t clockPin, uint8_t bitOrder, uint8_t val);
156156
#include "Udp.h"
157157
#include "HardwareSerial.h"
158158
#include "Esp.h"
159-
#include "Schedule.h"
160159

161160
using std::abs;
162161
using std::isinf;

libraries/Schedule/library.properties

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
name=Schedule
2+
version=1.0
3+
author=
4+
maintainer=
5+
sentence=
6+
paragraph=
7+
category=Other
8+
url=
9+
architectures=esp32

cores/esp32/Schedule.cpp renamed to libraries/Schedule/src/Schedule.cpp

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,23 @@
11
#include "Schedule.h"
2-
#include "PolledTimeout.h"
2+
#include "PolledTimeout/PolledTimeout.h"
33
#include "Ticker.h"
44
#ifdef ESP8266
55
#include "interrupts.h"
66
#include "coredecls.h"
77
#else
88
#include <mutex>
99
#endif
10-
#include "circular_queue.h"
10+
#include "circular_queue/circular_queue.h"
11+
12+
void loop_completed()
13+
{
14+
run_scheduled_functions(SCHEDULE_FUNCTION_FROM_LOOP);
15+
}
16+
17+
void yield_completed()
18+
{
19+
run_scheduled_functions(SCHEDULE_FUNCTION_WITHOUT_YIELDELAYCALLS);
20+
}
1121

1222
typedef std::function<bool(void)> mFuncT;
1323

File renamed without changes.

0 commit comments

Comments
 (0)