aboutsummaryrefslogtreecommitdiff
path: root/docs/parts/tasks.md
diff options
context:
space:
mode:
authorKarel Kočí <cynerd@email.cz>2016-03-20 16:39:30 +0100
committerKarel Kočí <cynerd@email.cz>2016-03-20 16:39:30 +0100
commit9439c6f1caffd938673018f3af7460b33a12528e (patch)
tree55eb32bfb1f90a489982853f698619a2083a4285 /docs/parts/tasks.md
parent1ac3026c039cb15dd8c110c84215096854c3c804 (diff)
downloadavr-ioe-9439c6f1caffd938673018f3af7460b33a12528e.tar.gz
avr-ioe-9439c6f1caffd938673018f3af7460b33a12528e.tar.bz2
avr-ioe-9439c6f1caffd938673018f3af7460b33a12528e.zip
Another work progress
Diffstat (limited to 'docs/parts/tasks.md')
-rw-r--r--docs/parts/tasks.md38
1 files changed, 38 insertions, 0 deletions
diff --git a/docs/parts/tasks.md b/docs/parts/tasks.md
new file mode 100644
index 0000000..e4f71df
--- /dev/null
+++ b/docs/parts/tasks.md
@@ -0,0 +1,38 @@
+Tasks
+=====
+Tasks can be used for sharing processor for example during period of waiting for
+interrupt. Planing is based on priority.
+
+## Functions
+### tasks_run
+```C
+int8_t tasks_run(void)
+```
+This function starts tasks execution. Should be called after all task slots are
+prepared and at least one task is started. This function exits if no task exist or
+all existing tasks exited.
+
+### task_init
+
+## Structures
+### Task
+```C
+typedef struct {
+ uint8_t flags;
+ void (*func) (void);
+} Task;
+```
+
+### TaskSlot
+```C
+typedef struct {
+ uint8_t flags;
+ Task *task;
+ uint8_t stack_size;
+ uint8_t stack[];
+} TaskSlot;
+```
+
+### Mutex
+
+### Semaphore