Intertask Communication
Now that we’re able to create tasks, it’s time to start passing data between them. After all, you don’t often run into systems that have a bunch of parallel tasks operating completely independently of one another; normally, you will need to pass data between the system’s tasks.
In FreeRTOS, data can be sent between tasks by using queues and task notifications. First, we’ll describe queues conceptually. Next, we’ll show several ways queues can be used in FreeRTOS, and illustrate those uses with example-programs. We’ll then move on to task notifications and learn why we should use them, and when.
The chapter’s example-programs are in the IDE-project Chapter_09
. There are four example-programs, and each has its own build configuration.
We will be covering the following topics:
- Understanding RTOS queues
- Passing data through queues by value
- Passing data through queues by reference...