repositories
/
mTask.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
added debug statements, dynamic allocation is working for tasks
[mTask.git]
/
client
/
task.h
diff --git
a/client/task.h
b/client/task.h
index
6542b1c
..
5dba8d2
100644
(file)
--- a/
client/task.h
+++ b/
client/task.h
@@
-1,8
+1,5
@@
#ifndef TASK_H
#define TASK_H
#ifndef TASK_H
#define TASK_H
-
-#define MAXTASKSIZE 1024
-
#ifdef __cplusplus
extern "C" {
#endif
#ifdef __cplusplus
extern "C" {
#endif
@@
-11,20
+8,22
@@
extern "C" {
#include <stdbool.h>
struct task {
#include <stdbool.h>
struct task {
- uint8_t bc[MAXTASKSIZE];
- uint16_t tlen;
+ uint16_t tasklength;
uint16_t interval;
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);
};
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_init(void);
void task_register(void);
-void task_delete(void);
-struct task *task_get(int num);
+void task_delete(uint8_t num);
#ifdef __cplusplus
}
#ifdef __cplusplus
}