update memory consumption on task acknowledgement
[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 int value;
18 };
19
20 bool is_interrupt_task(struct task* t);
21 bool had_interrupt(struct task* t);
22
23 struct task *task_head(void);
24 struct task *task_next(struct task *t);
25
26 void task_register(void);
27 void task_delete(uint8_t num);
28
29 #ifdef __cplusplus
30 }
31 #endif
32 #endif