diff options
author | Karel Kočí <cynerd@email.cz> | 2015-10-17 15:40:51 +0200 |
---|---|---|
committer | Karel Kočí <cynerd@email.cz> | 2015-10-17 15:40:51 +0200 |
commit | b0d8f22f3492fbb3f6dc0e8026e63c803af59007 (patch) | |
tree | eb9707612e87856962474885f2a18ae1621d214e /src/tasks.c | |
parent | 8fa9db4244f4ee33aa47561c569edfa62fe37928 (diff) | |
download | avr-ioe-b0d8f22f3492fbb3f6dc0e8026e63c803af59007.tar.gz avr-ioe-b0d8f22f3492fbb3f6dc0e8026e63c803af59007.tar.bz2 avr-ioe-b0d8f22f3492fbb3f6dc0e8026e63c803af59007.zip |
Complete commit of current work
Diffstat (limited to 'src/tasks.c')
-rw-r--r-- | src/tasks.c | 17 |
1 files changed, 17 insertions, 0 deletions
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 */ |