Skip to content

Commit caf30a2

Browse files
authored
Update README.md
1 parent 3452c2d commit caf30a2

File tree

1 file changed

+8
-4
lines changed

1 file changed

+8
-4
lines changed

README.md

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -28,12 +28,12 @@ In the setup method, add an function callback that gets fired once in the future
2828

2929
```
3030
// Create a task scheduled once every 100 miliis
31-
taskManager.scheduleOnce(100, [] {
31+
taskid_t taskId = taskManager.scheduleOnce(100, [] {
3232
// some work to be done.
3333
});
3434
3535
// Create a task that's scheduled every second
36-
taskManager.scheduleFixedRate(1, [] {
36+
taskid_t taskId = taskManager.scheduleFixedRate(1, [] {
3737
// work to be done.
3838
}, TIME_SECONDS);
3939
```
@@ -91,9 +91,13 @@ Then add it to task manager during setup or as needed:
9191

9292
After this the callback (or event object) registered in the TmLongSchedule will be called whenever scheduled.
9393

94-
From 1.2.1 onwards reentrant locking has been added, if you have a shared resource that you need to lock around, you can do this in tasks. See the reentrantLocking example for more details.
94+
To enable or disable a task
9595

96-
As of V1.1 - Arduino Only - If you want to use the legacy interrupt marshalling support instead of building an event you must additionally include the following:
96+
taskManager.setTaskEnabled(taskId, enabled);
97+
98+
If you have a shared resource that you need to lock around, you can do this in tasks. See the reentrantLocking example for more details.
99+
100+
Arduino Only - If you want to use the legacy interrupt marshalling support instead of building an event you must additionally include the following:
97101

98102
#include <BasicInterruptAbstraction.h>
99103

0 commit comments

Comments
 (0)