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 some data between different tasks in the system. This is where intertask communication comes into play.

In FreeRTOS, intertask communication can be achieved using queues and direct task notifications. In this chapter, we'll cover a few different use cases for queues using examples and discuss the pros and cons of each. We will look at all of the details regarding tasks that block while waiting for an item to appear in the queue, as well as timeouts. Once we have looked at queues, we'll move on to task notifications and learn why we should use them and when.

In a nutshell, we will be covering the following topics:

  • Passing data through queues by value
  • Passing data through queues by reference
  • Direct task notifications
..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
3.15.229.113