24
24
// #define CONT_STACKSIZE 4096
25
25
#include < Arduino.h>
26
26
#include " Schedule.h"
27
- #include " Delegate.h"
28
27
extern " C" {
29
28
#include " ets_sys.h"
30
29
#include " os_type.h"
@@ -72,6 +71,7 @@ static uint32_t s_cycles_at_yield_start;
72
71
static uint16_t ets_intr_lock_stack[ETS_INTR_LOCK_NEST_MAX];
73
72
static byte ets_intr_lock_stack_ptr=0 ;
74
73
74
+
75
75
extern " C" {
76
76
extern const uint32_t __attribute__ ((section(" .ver_number" ))) core_version = ARDUINO_ESP8266_GIT_VER;
77
77
const char * core_release =
@@ -153,7 +153,7 @@ extern "C" void __esp_delay(unsigned long ms) {
153
153
154
154
extern " C" void esp_delay (unsigned long ms) __attribute__((weak, alias(" __esp_delay" )));
155
155
156
- using IsBlockedCB = Delegate <bool (), void * >;
156
+ using IsBlockedCB = std::function <bool ()>;
157
157
158
158
void esp_delay (const uint32_t timeout_ms, const IsBlockedCB& blocked, const uint32_t intvl_ms) {
159
159
const auto start = millis ();
@@ -174,7 +174,7 @@ extern "C" void __yield() {
174
174
}
175
175
}
176
176
177
- extern " C" void yield () __attribute__ ((weak, alias(" __yield" )));
177
+ extern " C" void yield (void ) __attribute__ ((weak, alias(" __yield" )));
178
178
179
179
extern " C" void optimistic_yield (uint32_t interval_us) {
180
180
const uint32_t intvl_cycles = interval_us *
@@ -205,6 +205,7 @@ extern "C" void IRAM_ATTR ets_intr_unlock() {
205
205
xt_rsil (0 );
206
206
}
207
207
208
+
208
209
// Save / Restore the PS state across the rom ets_post call as the rom code
209
210
// does not implement this correctly.
210
211
extern " C" bool ets_post_rom (uint8 prio, ETSSignal sig, ETSParam par);
0 commit comments