File tree Expand file tree Collapse file tree 2 files changed +3
-4
lines changed Expand file tree Collapse file tree 2 files changed +3
-4
lines changed Original file line number Diff line number Diff line change @@ -24,7 +24,7 @@ struct recurrent_fn_t
24
24
recurrent_fn_t * mNext = nullptr ;
25
25
mRecFuncT mFunc ;
26
26
esp8266::polledTimeout::periodicFastUs callNow;
27
- std::function<bool ()> alarm = nullptr ;
27
+ std::function<bool (void )> alarm = nullptr ;
28
28
recurrent_fn_t (esp8266::polledTimeout::periodicFastUs interval) : callNow(interval) { }
29
29
};
30
30
@@ -86,7 +86,7 @@ bool schedule_function (const std::function<void(void)>& fn)
86
86
}
87
87
88
88
bool schedule_recurrent_function_us (const std::function<bool (void )>& fn,
89
- uint32_t repeat_us, std::function<bool()> alarm)
89
+ uint32_t repeat_us, std::function<bool(void )> alarm)
90
90
{
91
91
assert (repeat_us < decltype (recurrent_fn_t ::callNow)::neverExpires); // ~26800000us (26.8s)
92
92
Original file line number Diff line number Diff line change 2
2
#define ESP_SCHEDULE_H
3
3
4
4
#include < functional>
5
- #include < atomic>
6
5
7
6
#define SCHEDULED_FN_MAX_COUNT 32
8
7
@@ -62,7 +61,7 @@ void run_scheduled_functions();
62
61
// * If alarm is used, anytime during scheduling when it returns true,
63
62
// any remaining delay from repeat_us is disregarded, and fn is executed.
64
63
bool schedule_recurrent_function_us (const std::function<bool (void )>& fn,
65
- uint32_t repeat_us, std::function<bool()> alarm = nullptr);
64
+ uint32_t repeat_us, std::function<bool(void )> alarm = nullptr);
66
65
67
66
// Test recurrence and run recurrent scheduled functions.
68
67
// (internally called at every `yield()` and `loop()`)
You can’t perform that action at this time.
0 commit comments