Queue Set Example (FreeRTOS) - Freertos Typing CST Test
Loading…
Queue Set Example (FreeRTOS) — Freertos Code
Demonstrates using a FreeRTOS queue set to manage multiple queues.
#include <FreeRTOS.h>
#include <task.h>
#include <queue.h>
#include <stdio.h>
QueueHandle_t xQueue1, xQueue2;
QueueSetHandle_t xQueueSet;
int main() {
xQueue1 = xQueueCreate(1, sizeof(int));
xQueue2 = xQueueCreate(1, sizeof(int));
xQueueSet = xQueueCreateSet(2);
xQueueAddToSet(xQueue1, xQueueSet);
xQueueAddToSet(xQueue2, xQueueSet);
vTaskStartScheduler();
return 0;
}Freertos Language Guide
FreeRTOS is a lightweight, open-source real-time operating system (RTOS) kernel for embedded devices. It provides multitasking, scheduling, and inter-task communication for microcontrollers and small processors.
Primary Use Cases
- ▸Task scheduling for embedded systems
- ▸IoT and sensor node software
- ▸Industrial automation control
- ▸Real-time motor and sensor management
- ▸Edge devices and microcontroller applications
Notable Features
- ▸Preemptive and cooperative multitasking
- ▸Task priorities and time slicing
- ▸Inter-task communication (queues, semaphores, mutexes)
- ▸Software timers and tickless idle mode
- ▸Memory management and dynamic allocation support
Origin & Creator
Created by Richard Barry in 2003, now maintained and extended by Amazon Web Services as Amazon FreeRTOS and FreeRTOS Kernel.
Industrial Note
Essential in embedded systems requiring predictable real-time behavior, small footprint, and multitasking support-commonly used in IoT sensors, motor control, and safety-related microcontroller applications.