This example shows how the FreeRTOS schedular handles two program executions using task and queue allocation.
Generally, the FreeRTOS queue is used as a thread FIFO buffer and for intertask communication.
By default, newlib-nano is used for this demo.
This example creates two tasks and one queue; the queue sends and receives traffic. The receive traffic (or receive queue) blocks the program execution until it receives a matching value from the send traffic (or send queue).
Tasks in the send queue sit in a loop that blocks execution for 1,000 miliseconds before sending the value 100 to the receive queue. Once the value is sent, the task loops, i.e., blocks for another 1,000 miliseconds.
When the receive queue receives the value 100, it begins executing its task, which sends the message Blink to the UART peripheral and toggles an LED on the development board.
When user run the application, it displays information similar to the following in a terminal: