Skip to content
Merged
Show file tree
Hide file tree
Changes from 3 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions tests/host/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -345,6 +345,7 @@ OPT_ARDUINO_LIBS ?= \
DNSServer/src/DNSServer.cpp \
ESP8266AVRISP/src/ESP8266AVRISP.cpp \
ESP8266HTTPClient/src/ESP8266HTTPClient.cpp \
Hash/src/Hash.cpp \
)

MOCK_ARDUINO_LIBS := \
Expand Down
8 changes: 6 additions & 2 deletions tests/host/common/Arduino.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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 };

Expand All @@ -42,6 +44,8 @@ extern "C" unsigned long micros()

extern "C" void yield()
{
run_scheduled_functions();
run_scheduled_recurrent_functions();
}

extern "C" bool can_yield()
Expand Down
1 change: 1 addition & 0 deletions tests/host/common/ArduinoMain.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -309,6 +309,7 @@ int main (int argc, char* const argv [])
usleep(1000); // not 100% cpu, ~1000 loops per second
loop();
check_incoming_udp();
yield(); // call scheduled functions

if (run_once)
user_exit = true;
Expand Down