a6c02b7a66be7bf2559d2d8d3a56ec1a4d838797
[mTask.git] / client / task.h
1 #ifndef TASK_H
2 #define TASK_H
3
4 #define MAXTASKSIZE 1024
5
6 #include <stdint.h>
7 #include <stdbool.h>
8
9 struct task {
10 uint8_t bc[MAXTASKSIZE];
11 uint16_t tlen;
12 uint16_t interval;
13 long lastrun;
14 bool used;
15 };
16
17 bool is_interrupt_task(struct task* t);
18 bool had_interrupt(struct task* t);
19
20 void task_init(void);
21 void task_register(void);
22 void task_delete(void);
23 struct task *task_get(int num);
24
25 #endif