aboutsummaryrefslogtreecommitdiff
path: root/cores/arduino/wiring.c
diff options
context:
space:
mode:
authorCristian Maglie <c.maglie@bug.st>2014-10-15 11:26:09 +0200
committerCristian Maglie <c.maglie@bug.st>2014-12-02 22:15:57 +0100
commita05d1d4851e0642880a48682547a61ca4813440f (patch)
treef1daebca4eff312f26947dd30c7461a1ff958466 /cores/arduino/wiring.c
parent02f5b999581287001fb83f5304c06a3d144b3b42 (diff)
Backported 'yield()' hook from 1.5.x
Diffstat (limited to 'cores/arduino/wiring.c')
-rw-r--r--cores/arduino/wiring.c1
1 files changed, 1 insertions, 0 deletions
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;