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:
@ -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()
|
||||
|
Reference in New Issue
Block a user