X-Git-Url: https://git.martlubbers.net/?a=blobdiff_plain;ds=sidebyside;f=client%2Ftask.h;h=375aafc361a76e4555f98c958b86a9f614a1b151;hb=f39868397acdc4cdcb71b58926dee62327933336;hp=6c7dfd3ba8abecddfb723c756c0ea6948250199a;hpb=c3bb3dde2bb886a9f86f9de5f4f96beb8d86b53d;p=mTask.git diff --git a/client/task.h b/client/task.h index 6c7dfd3..375aafc 100644 --- a/client/task.h +++ b/client/task.h @@ -1,26 +1,31 @@ #ifndef TASK_H #define TASK_H - -#define MAXTASKS 5 -#define MAXTASKSIZE 1024 +#ifdef __cplusplus +extern "C" { +#endif #include #include struct task { - uint8_t bc[MAXTASKSIZE]; - uint16_t tlen; + uint16_t tasklength; uint16_t interval; - long lastrun; - bool used; + unsigned long lastrun; + uint8_t taskid; + struct task *next; + uint8_t *bc; }; bool is_interrupt_task(struct task* t); bool had_interrupt(struct task* t); +struct task *task_head(void); +struct task *task_next(struct task *t); void task_init(void); void task_register(void); void task_delete(void); -struct task *task_get(int num); +#ifdef __cplusplus +} +#endif #endif