From b0d8f22f3492fbb3f6dc0e8026e63c803af59007 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Karel=20Ko=C4=8D=C3=AD?= Date: Sat, 17 Oct 2015 15:40:51 +0200 Subject: Complete commit of current work --- src/tasks.c | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) create mode 100644 src/tasks.c (limited to 'src/tasks.c') diff --git a/src/tasks.c b/src/tasks.c new file mode 100644 index 0000000..1d94eaa --- /dev/null +++ b/src/tasks.c @@ -0,0 +1,17 @@ +#include "../tasks.h" + +#ifdef CONFIG_IOE_TASKS + +#else /* CONFIG_IOE_TASKS */ + +int8_t taskDelayTillT(int8_t *condition, uint8_t timeout_10us) { + while(*condition == 0) { + if (timeout_10us == 0) + return 1; + timeout_10us--; + _delay_us(10); + } + return 0; +} + +#endif /* CONFIG_IOE_TASKS */ -- cgit v1.2.3