Skip to content

Commit

Permalink
Simplify and Fix support for esp8266 core v3+
Browse files Browse the repository at this point in the history
  • Loading branch information
d-a-v committed Nov 12, 2021
1 parent aa76d26 commit 5b45fe6
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
5 changes: 4 additions & 1 deletion hal/architecture/ESP8266/MyHwESP8266.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
* version 2 as published by the Free Software Foundation.
*/

#include <Schedule.h>
#include "MyHwESP8266.h"

bool hwInit(void)
Expand All @@ -29,7 +30,9 @@ bool hwInit(void)
#endif
#endif
EEPROM.begin(EEPROM_size);
return true;
// register _process() to be called at most every 1us,
// at every loop() or yield()
return schedule_recurrent_function_us([](){ _process(); return true; }, 1);
}

void hwReadConfigBlock(void *buf, void *addr, size_t length)
Expand Down
2 changes: 2 additions & 0 deletions hal/architecture/ESP8266/MyMainESP8266.cpp
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
#if 0 // replaced by a call to schedule_recurrent_function_us()
/*
* The MySensors Arduino library handles the wireless radio link and protocol
* between your home built sensors/actuators and HA controller of choice.
Expand Down Expand Up @@ -346,3 +347,4 @@ extern "C" void user_init(void)

system_init_done_cb(&init_done);
}
#endif

0 comments on commit 5b45fe6

Please sign in to comment.