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