Skip to content

Commit 5b45fe6

Browse files
committed
Simplify and Fix support for esp8266 core v3+
1 parent aa76d26 commit 5b45fe6

File tree

2 files changed

+6
-1
lines changed

2 files changed

+6
-1
lines changed

hal/architecture/ESP8266/MyHwESP8266.cpp

+4-1
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@
1717
* version 2 as published by the Free Software Foundation.
1818
*/
1919

20+
#include <Schedule.h>
2021
#include "MyHwESP8266.h"
2122

2223
bool hwInit(void)
@@ -29,7 +30,9 @@ bool hwInit(void)
2930
#endif
3031
#endif
3132
EEPROM.begin(EEPROM_size);
32-
return true;
33+
// register _process() to be called at most every 1us,
34+
// at every loop() or yield()
35+
return schedule_recurrent_function_us([](){ _process(); return true; }, 1);
3336
}
3437

3538
void hwReadConfigBlock(void *buf, void *addr, size_t length)

hal/architecture/ESP8266/MyMainESP8266.cpp

+2
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
#if 0 // replaced by a call to schedule_recurrent_function_us()
12
/*
23
* The MySensors Arduino library handles the wireless radio link and protocol
34
* between your home built sensors/actuators and HA controller of choice.
@@ -346,3 +347,4 @@ extern "C" void user_init(void)
346347

347348
system_init_done_cb(&init_done);
348349
}
350+
#endif

0 commit comments

Comments
 (0)