X-Git-Url: https://git.martlubbers.net/?a=blobdiff_plain;f=client%2Ftask.h;h=bcd07835f95951d0c25eaba31b8e50734b3a4a19;hb=a2df77cbda43d5a24eeb8ac7db7452baae9f18aa;hp=0ea1b99f5b797cd3dc13bf3b24803b0347a4f6b0;hpb=55afb005ced3bba3813163596cdc7288a318a3c2;p=mTask.git diff --git a/client/task.h b/client/task.h index 0ea1b99..bcd0783 100644 --- a/client/task.h +++ b/client/task.h @@ -1,23 +1,32 @@ #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; + int value; }; -void task_init(void); +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_register(void); -void task_delete(void); -struct task *task_get(int num); +void task_delete(uint8_t num); +#ifdef __cplusplus +} +#endif #endif