mirror of
https://github.com/alexandrebobkov/ESP-Nodes.git
synced 2025-08-07 13:57:17 +00:00
FreeRTOS
This commit is contained in:
@@ -21,9 +21,7 @@
|
||||
#include "esp_system.h"
|
||||
|
||||
SemaphoreHandle_t xMutex;
|
||||
QueueHandle_t xQueue1;
|
||||
QueueHandle_t xQueue2;
|
||||
|
||||
QueueHandle_t xQueue, xQueue1, xQueue2;
|
||||
typedef struct {
|
||||
uint32_t num1;
|
||||
uint32_t num2;
|
||||
@@ -154,6 +152,10 @@ void display_task(void *pvParameters) {
|
||||
if (xQueueReceive(xQueue2, &s_data, 500)) {
|
||||
printf("Display Task received sensors_data from Task 2: num1=%" PRIu32 ", num2=%" PRIu32 ", num3=%" PRIu32 "\n", s_data.num1, s_data.num2, s_data.num3);
|
||||
}
|
||||
if (xQueueReceive(xQueue, &s_data, 500)) {
|
||||
printf("Display Task received sensors_data from Task 1:\nnum1=%" PRIu32 "\nnum2=%" PRIu32 "\nnum3=%" PRIu32 "\n",
|
||||
s_data.num1, s_data.num2, s_data.num3);
|
||||
}
|
||||
vTaskDelay(50);
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user