C/EmbeddedSystems 1780 11.3k
C FreeRTOS Multitasking Sensor Telemetry & Queue System
Hard real-time C firmware architecture using FreeRTOS. Configures prioritized sensor sampling tasks, IPC message queues, and hardware watchdog reset tasks.
Thread-safe xQueueHandle message passing
Hardware watchdog timer task
Interactive Prompt & Options
Fully Editable
Appended directly to the LLM system prompt for tailored code output.
✨ OpenRouter LLM Engine (Llama-3.3-70B) Active
Generated Code
⚡ Instant Boilerplatec-embedded-freertos-task-queue.ts
| 1 | #include "FreeRTOS.h" |
| 2 | #include "task.h" |
| 3 | #include "queue.h" |
| 4 | |
| 5 | QueueHandle_t telemetryQueue; |
| 6 | |
| 7 | void SensorTask(void *pvParameters) { |
| 8 | uint32_t val = 42; |
| 9 | for (;;) { |
| 10 | xQueueSend(telemetryQueue, &val, portMAX_DELAY); |
| 11 | vTaskDelay(pdMS_TO_TICKS(100)); |
| 12 | } |
| 13 | } |
| 14 |
14 lines • 272 bytesc/embedded
Automated Sandbox
Deploy this boilerplate automatically in 1 click.
Related Generators
View AllC/Embedded
C/C++ Embedded STM32 Non-Blocking Bare-Metal USART DMA Driver
Low-level C driver for STM32 microcontrollers. Implements DMA ring buffers, non-blocking USART transmission, and hardware interrupt handlers.
C/EmbeddedC/C++ Hardware SPI NOR Flash Memory Driver (W25Q64)
Bare-metal C driver for W25Q64/W25Q128 SPI NOR Flash memory chips. Implements sector erase, page programming, and SPI register status polling.
C/EmbeddedC/C++ Hardware I2C Sensor Driver for BME280 Environmental Sensor
Non-blocking C I2C driver for BME280 temperature, humidity, and pressure sensors with hardware calibration formula calculation.