Skip to content

Commit 2812b98

Browse files
committed
Drop atomic include, align function type syntax.
1 parent 88302e8 commit 2812b98

File tree

2 files changed

+3
-4
lines changed

2 files changed

+3
-4
lines changed

cores/esp8266/Schedule.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ struct recurrent_fn_t
2424
recurrent_fn_t* mNext = nullptr;
2525
mRecFuncT mFunc;
2626
esp8266::polledTimeout::periodicFastUs callNow;
27-
std::function<bool()> alarm = nullptr;
27+
std::function<bool(void)> alarm = nullptr;
2828
recurrent_fn_t(esp8266::polledTimeout::periodicFastUs interval) : callNow(interval) { }
2929
};
3030

@@ -86,7 +86,7 @@ bool schedule_function (const std::function<void(void)>& fn)
8686
}
8787

8888
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)
9090
{
9191
assert(repeat_us < decltype(recurrent_fn_t::callNow)::neverExpires); //~26800000us (26.8s)
9292

cores/esp8266/Schedule.h

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@
22
#define ESP_SCHEDULE_H
33

44
#include <functional>
5-
#include <atomic>
65

76
#define SCHEDULED_FN_MAX_COUNT 32
87

@@ -62,7 +61,7 @@ void run_scheduled_functions();
6261
// * If alarm is used, anytime during scheduling when it returns true,
6362
// any remaining delay from repeat_us is disregarded, and fn is executed.
6463
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);
6665

6766
// Test recurrence and run recurrent scheduled functions.
6867
// (internally called at every `yield()` and `loop()`)

0 commit comments

Comments
 (0)