X-Git-Url: https://git.martlubbers.net/?a=blobdiff_plain;f=client%2Ftask.h;h=253558e6022c05e81d84cb952fa3b370895643ee;hb=a81623aa9629a3c5c8f8bf920e494a596b30c4b7;hp=bfa2f559adf0f8e593599f0c1ff3ffe20eae299f;hpb=6c8939998c64aafb8cdfa40e52a227bf72767648;p=mTask.git diff --git a/client/task.h b/client/task.h index bfa2f55..253558e 100644 --- a/client/task.h +++ b/client/task.h @@ -1,23 +1,33 @@ #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; + char type; + int value; }; -void task_init(void); -int task_register(void); -void task_delete(void); -struct task *task_get(int num); +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(uint8_t num); + +#ifdef __cplusplus +} +#endif #endif