From a05d1d4851e0642880a48682547a61ca4813440f Mon Sep 17 00:00:00 2001 From: Cristian Maglie Date: Wed, 15 Oct 2014 11:26:09 +0200 Subject: Backported 'yield()' hook from 1.5.x --- cores/arduino/wiring.c | 1 + 1 file changed, 1 insertion(+) (limited to 'cores/arduino/wiring.c') diff --git a/cores/arduino/wiring.c b/cores/arduino/wiring.c index a3c4390..5cbe241 100644 --- a/cores/arduino/wiring.c +++ b/cores/arduino/wiring.c @@ -111,6 +111,7 @@ void delay(unsigned long ms) uint16_t start = (uint16_t)micros(); while (ms > 0) { + yield(); if (((uint16_t)micros() - start) >= 1000) { ms--; start += 1000; -- cgit v1.2.3-18-g5258