Skip to content

Commit bd16d67

Browse files
committed
Merge branch 'main' of https://github.com/glutio/Taskfun into main
2 parents 8abef5c + 62ab2f9 commit bd16d67

2 files changed

Lines changed: 3 additions & 2 deletions

File tree

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,12 +2,12 @@
22

33
Taskfun is a library designed to introduce preemptive multitasking capabilities to your Arduino AVR and SAMD21 projects. Unlike cooperative multitasking, preemptive multitasking in Taskfun ensures automatic time-sharing between tasks, enhancing CPU utilization by allowing simultaneous execution of multiple tasks. Taskfun gives you the ability to run multiple operations concurrently, providing your Arduino with an extra layer of responsiveness.
44

5-
Simply `#include "Taskfun.h"`, add `setupTasks()` to the `setup()` function of the sketch and you can use `runTask()` to start a task. For synchronized access to shared variables across tasks use `SyncVar<>` class which overloads all operators and wraps each operation in a critical section (temporarily disables task switching).
5+
Simply `#include <Taskfun.h>`, add `setupTasks()` to the `setup()` function of the sketch and you can use `runTask()` to start a task. For synchronized access to shared variables across tasks use `SyncVar<>` class which overloads all operators and wraps each operation in a critical section (temporarily disables task switching).
66

77
The primary advantage of using Taskfun is its ability to handle multiple operations concurrently without the risk of task monopolization. This is particularly useful for larger or more complex projects. Below is a standard Arduino blink example implemented as two independent tasks and a synchronization variable.
88

99
```
10-
#include "Taskfun.h"
10+
#include <Taskfun.h>
1111
1212
// synchronize access to this shared global variable
1313
SyncVar<bool> _on;

examples/README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+

0 commit comments

Comments
 (0)