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