diff options
author | Karel Kočí <cynerd@email.cz> | 2016-03-08 16:10:33 +0100 |
---|---|---|
committer | Karel Kočí <cynerd@email.cz> | 2016-03-08 16:10:33 +0100 |
commit | 5d29fe79d30f430ae326d9dc57ccfaed6fe61328 (patch) | |
tree | 8341804d561c0060176cbebc3f9a57c7c07f7816 /tasks.h | |
parent | 4e773191d447ac434536262a6f204dd991d4ad77 (diff) | |
download | avr-ioe-5d29fe79d30f430ae326d9dc57ccfaed6fe61328.tar.gz avr-ioe-5d29fe79d30f430ae326d9dc57ccfaed6fe61328.tar.bz2 avr-ioe-5d29fe79d30f430ae326d9dc57ccfaed6fe61328.zip |
Another full update of current work
Diffstat (limited to 'tasks.h')
-rw-r--r-- | tasks.h | 44 |
1 files changed, 0 insertions, 44 deletions
diff --git a/tasks.h b/tasks.h deleted file mode 100644 index 60653b3..0000000 --- a/tasks.h +++ /dev/null @@ -1,44 +0,0 @@ -#include <avr/io.h> -#include <util/delay.h> -#include <avr/interrupt.h> -#include <stdint.h> - -#include "mcu/mcu_def.h" -#include "timer.h" - -#ifndef _IOE_TASKS_H_ -#define _IOE_TASKS_H_ -#ifdef CONFIG_IOE_TASKS - -#ifndef CONFIG_IOE_TIMERS -#error "To use tasks you must enable timers (CONFIG_IOE_TIMERS)." -#endif - -struct Task { - -}; - -void taskDelay(uint16_t us); -void taskDelayMS(uint16_t ms); -void taskDelayTill(int8_t *boolean); -int8_t taskDelayTillT(int8_t *boolean, uin16_t us); -void taskDelayTillF(int8_t (*fnc)(void)); -void taskDelayTillFT(int8_t (*fnc)(void), uint16_t us); - -struct Mutex { -}; -void takeMutex(void); -int8_t takeMutexT(uint16_t timeout); -void giveMutex(void); - -struct Semaphore { -}; - -#else /* CONFIG_IOE_TASKS */ - -#define taskDelay(US) _delay_us(US) -#define taskDelayTill(BOOL) while(*BOOL == 0) -int8_t taskDelayTillT(int8_t *condition, uint8_t timeout_10us); - -#endif /* CONFIG_IOE_TASKS */ -#endif /* _IOE_TASKS_H_ */ |