From 69aead513de2f646a186eaacc40fa7c5a3ef5db2 Mon Sep 17 00:00:00 2001 From: Cristian Maglie Date: Fri, 2 Nov 2012 18:12:21 +0100 Subject: Added general yield()-hook for cooperative scheduling development (part 2) --- 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 ac8bb6f..ec5b888 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