Skip to content

Commit a453c1c

Browse files
committed
Improved loop() extension plugin scheme.
1 parent ef281f9 commit a453c1c

File tree

1 file changed

+4
-7
lines changed

1 file changed

+4
-7
lines changed

Diff for: cores/esp32/main.cpp

+4-7
Original file line numberDiff line numberDiff line change
@@ -9,22 +9,19 @@ TaskHandle_t loopTaskHandle = NULL;
99

1010
bool loopTaskWDTEnabled;
1111

12-
extern "C" void __loop_end(void)
13-
{
14-
/* do nothing by default */
12+
extern "C" void esp_loop(void) __attribute__((weak));
13+
extern "C" void esp_loop(void) {
14+
loop();
1515
}
1616

17-
extern "C" void loop_end(void) __attribute__((weak, alias("__loop_end")));
18-
1917
void loopTask(void *pvParameters)
2018
{
2119
setup();
2220
for(;;) {
2321
if(loopTaskWDTEnabled){
2422
esp_task_wdt_reset();
2523
}
26-
loop();
27-
loop_end();
24+
esp_loop();
2825
}
2926
}
3027

0 commit comments

Comments
 (0)