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