X-Git-Url: https://git.martlubbers.net/?a=blobdiff_plain;f=client%2Ftask.h;h=41ff04acbfd57d885ee3162328515c6cf1282e9b;hb=HEAD;hp=6542b1c3e32ece39a72567615a93c9dd3fd77184;hpb=8246c6551faa818be7a58638dbbc2e521f21c454;p=mTask.git diff --git a/client/task.h b/client/task.h index 6542b1c..41ff04a 100644 --- a/client/task.h +++ b/client/task.h @@ -1,8 +1,5 @@ #ifndef TASK_H #define TASK_H - -#define MAXTASKSIZE 1024 - #ifdef __cplusplus extern "C" { #endif @@ -11,20 +8,23 @@ extern "C" { #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; + uint8_t *bc; + char type; + int value; }; bool is_interrupt_task(struct task* t); bool had_interrupt(struct task* t); -void task_init(void); +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 }