23
23
#include " interrupts.h"
24
24
#include " coredecls.h"
25
25
26
- typedef Delegate<void ()> mSchedFuncT ;
26
+ typedef Delegate<void (), void * > mSchedFuncT ;
27
27
struct scheduled_fn_t
28
28
{
29
29
scheduled_fn_t * mNext = nullptr ;
@@ -35,13 +35,13 @@ static scheduled_fn_t* sLast = nullptr;
35
35
static scheduled_fn_t * sUnused = nullptr ;
36
36
static int sCount = 0 ;
37
37
38
- typedef Delegate<bool ()> mRecFuncT ;
38
+ typedef Delegate<bool (), void * > mRecFuncT ;
39
39
struct recurrent_fn_t
40
40
{
41
41
recurrent_fn_t * mNext = nullptr ;
42
42
mRecFuncT mFunc ;
43
43
esp8266::polledTimeout::periodicFastUs callNow;
44
- Delegate<bool ()> alarm = nullptr ;
44
+ Delegate<bool (), void * > alarm = nullptr ;
45
45
recurrent_fn_t (esp8266::polledTimeout::periodicFastUs interval) : callNow(interval) { }
46
46
};
47
47
@@ -79,7 +79,7 @@ static void recycle_fn_unsafe(scheduled_fn_t* fn)
79
79
}
80
80
81
81
IRAM_ATTR // (not only) called from ISR
82
- bool schedule_function (const Delegate<void ()>& fn)
82
+ bool schedule_function (const Delegate<void (), void* >& fn)
83
83
{
84
84
if (!fn)
85
85
return false ;
@@ -103,8 +103,8 @@ bool schedule_function(const Delegate<void()>& fn)
103
103
}
104
104
105
105
IRAM_ATTR // (not only) called from ISR
106
- bool schedule_recurrent_function_us (const Delegate<bool ()>& fn,
107
- uint32_t repeat_us, const Delegate<bool()>& alarm)
106
+ bool schedule_recurrent_function_us (const Delegate<bool (), void* >& fn,
107
+ uint32_t repeat_us, const Delegate<bool(), void* >& alarm)
108
108
{
109
109
assert (repeat_us < decltype (recurrent_fn_t ::callNow)::neverExpires); // ~26800000us (26.8s)
110
110
0 commit comments