aboutsummaryrefslogtreecommitdiff
path: root/cores/arduino/wiring.c
diff options
context:
space:
mode:
authorCristian Maglie <c.maglie@bug.st>2012-11-02 18:12:21 +0100
committerCristian Maglie <c.maglie@bug.st>2012-11-02 18:12:21 +0100
commit69aead513de2f646a186eaacc40fa7c5a3ef5db2 (patch)
tree06d8c02b9666ec7264ca51bd50c210fffac65947 /cores/arduino/wiring.c
parent6e2b0e87555a6cbd839328960bc75d21cb53f88b (diff)
Added general yield()-hook for cooperative scheduling development (part 2)
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 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;