aboutsummaryrefslogtreecommitdiff
path: root/docs/references/tasks.md
diff options
context:
space:
mode:
authorKarel Kočí <cynerd@email.cz>2016-06-30 17:18:49 +0200
committerKarel Kočí <cynerd@email.cz>2016-06-30 17:18:49 +0200
commit4e1ce86af16307bf7d42657db07600867c7c4bbc (patch)
tree5d0dfddea221c91545a9bd57ac7face5842291d4 /docs/references/tasks.md
parent147cb7f0e67d1f3c3274effa5476607e24664182 (diff)
downloadavr-ioe-4e1ce86af16307bf7d42657db07600867c7c4bbc.tar.gz
avr-ioe-4e1ce86af16307bf7d42657db07600867c7c4bbc.tar.bz2
avr-ioe-4e1ce86af16307bf7d42657db07600867c7c4bbc.zip
Add some more progress and split non-core functionality to separate repo
More progress to implementation and some changes in project it self. This library will implement only drivers for features on chip but nothing else. Everything connected externally is now in separate repository.
Diffstat (limited to 'docs/references/tasks.md')
-rw-r--r--docs/references/tasks.md38
1 files changed, 38 insertions, 0 deletions
diff --git a/docs/references/tasks.md b/docs/references/tasks.md
new file mode 100644
index 0000000..e4f71df
--- /dev/null
+++ b/docs/references/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