mirror of
https://github.com/alexandrebobkov/ESP-Nodes.git
synced 2025-08-07 13:57:17 +00:00
FreeRTOS
This commit is contained in:
@@ -103,13 +103,13 @@ void task1(void *pvParameters) {
|
||||
if (xSemaphoreTake(xMutex, 1500)) {
|
||||
printf("Task 1 is running\n");
|
||||
|
||||
SensorsData data = {
|
||||
/*SensorsData data = {
|
||||
.num1 = x,
|
||||
.num2 = 0,
|
||||
.num3 = 0,
|
||||
};
|
||||
};*/
|
||||
s_data.num1 = x;
|
||||
xQueueSend(xQueue1, &data, 0);
|
||||
//xQueueSend(xQueue1, &data, 0);
|
||||
xQueueSend(xQueue1, &s_data, 0);
|
||||
printf("Task 1 sent x=%" PRIu32 "\n", x);
|
||||
x+=2;
|
||||
@@ -131,13 +131,13 @@ void task2(void *pvParameters) {
|
||||
if (xSemaphoreTake(xMutex, 1500)) {
|
||||
printf("Task 2 is running\n");
|
||||
|
||||
SensorsData data = {
|
||||
/*SensorsData data = {
|
||||
.num1 = 0,
|
||||
.num2 = y,
|
||||
.num3 = 0,
|
||||
};
|
||||
};*/
|
||||
s_data.num2 = y;
|
||||
xQueueSend(xQueue2, &data, 0);
|
||||
//xQueueSend(xQueue2, &data, 0);
|
||||
xQueueSend(xQueue2, &s_data, 0);
|
||||
printf("Task 2 sent y=%" PRIu32 "\n", y);
|
||||
y++;
|
||||
|
Reference in New Issue
Block a user