X-Git-Url: https://git.martlubbers.net/?a=blobdiff_plain;f=client%2Ftask.c;h=1c16ce5281231a6532588e44bf1b86d9468a7078;hb=c518754bec4758cce7d899463f9c68612c3bf4e4;hp=9ef54033662c5a5a7a280dc83e996f1cbc4036db;hpb=55afb005ced3bba3813163596cdc7288a318a3c2;p=mTask.git diff --git a/client/task.c b/client/task.c index 9ef5403..1c16ce5 100644 --- a/client/task.c +++ b/client/task.c @@ -1,12 +1,8 @@ #include #include -#ifndef STM -#include -#include -#endif - #include "task.h" +#include "spec.h" #include "interface.h" struct task tasks[MAXTASKS]; @@ -30,6 +26,13 @@ void task_register(void) memset(&tasks[ct], 0, sizeof(struct task)); //Read interval tasks[ct].interval = read16(); + debug("interval: %d\n", tasks[ct].interval); + + //Interrupt task + if(is_interrupt_task(&tasks[ct])) { + + } + //Read tasklength tasks[ct].tlen = read16(); debug("task interval: %d, length: %d\n", @@ -40,8 +43,6 @@ void task_register(void) //Read task bytecode for(i = 0; iinterval & (2 <<14); +} + +bool had_interrupt(struct task* t) +{ + //Not implemented yet... + return false; + (void)t; +} + void task_delete(void) { - uint8_t c = read_byte(); + uint8_t c = read16(); tasks[c].used = false; write_byte('d'); write16(c);