further work on return values
[mTask.git] / client / task.h
1 #ifndef TASK_H
2 #define TASK_H
3 #ifdef __cplusplus
4 extern "C" {
5 #endif
6
7 #include <stdint.h>
8 #include <stdbool.h>
9
10 struct task {
11 uint16_t tasklength;
12 uint16_t interval;
13 unsigned long lastrun;
14 uint8_t taskid;
15 struct task *next;
16 uint8_t *bc;
17 char type;
18 int value;
19 };
20
21 bool is_interrupt_task(struct task* t);
22 bool had_interrupt(struct task* t);
23
24 struct task *task_head(void);
25 struct task *task_next(struct task *t);
26
27 void task_register(void);
28 void task_delete(uint8_t num);
29
30 #ifdef __cplusplus
31 }
32 #endif
33 #endif