1
0
mirror of https://github.com/esp8266/Arduino.git synced 2025-06-15 00:02:49 +03:00

Emulation on host: updates (#8409)

* mock: +Hash, +scheduled functions
Co-authored-by: Max Prokhorov <prokhorov.max@outlook.com>
This commit is contained in:
david gauchard
2022-01-03 14:23:45 +01:00
committed by GitHub
parent d0cc3a80f8
commit 2f58f679ee
4 changed files with 15 additions and 2 deletions

View File

@ -14,10 +14,12 @@
*/
#include <sys/time.h>
#include "Arduino.h"
#include <unistd.h>
#include <functional>
#include <unistd.h>
#include <Arduino.h>
#include <Schedule.h>
static struct timeval gtod0 = { 0, 0 };
@ -42,6 +44,13 @@ extern "C" unsigned long micros()
extern "C" void yield()
{
run_scheduled_recurrent_functions();
}
extern "C" void loop_end()
{
run_scheduled_functions();
run_scheduled_recurrent_functions();
}
extern "C" bool can_yield()