1
0
mirror of https://github.com/esp8266/Arduino.git synced 2025-07-01 03:26:58 +03:00

Add mechanism for posting functions to the main loop (#2082)

* Add mechanism for posting functions to the main loop (#1064)

* Fix indentation, add note that API is not stable
This commit is contained in:
Ivan Grokhotkov
2016-06-08 11:22:48 +08:00
parent 6bb8e1145b
commit 5eb6a7f449
4 changed files with 203 additions and 0 deletions

View File

@ -23,6 +23,7 @@
//This may be used to change user task stack size:
//#define CONT_STACKSIZE 4096
#include <Arduino.h>
#include "Schedule.h"
extern "C" {
#include "ets_sys.h"
#include "os_type.h"
@ -119,6 +120,7 @@ static void loop_wrapper() {
setup_done = true;
}
loop();
run_scheduled_functions();
esp_schedule();
}