Analyze the following source code and then find the best description. void Task1(void *pvParameters)\{ for (;;) \{ if (x
-
answerhappygod
- Site Admin
- Posts: 899604
- Joined: Mon Aug 02, 2021 8:13 am
Analyze the following source code and then find the best description. void Task1(void *pvParameters)\{ for (;;) \{ if (x
Analyze the following source code and then find the best description. void Task1(void *pvParameters)\{ for (;;) \{ if (xSemaphoreTake(mutex, 10/portTICK_PERIOD_MS) = pdTRUE) Serial.println("TaskMutex"); xSemaphoreGive(mutex); \} vTaskDelay(10/portTICK_PERIOD_MS); (a) If the semaphore is not available, the system will wait 10 ticks to see if it becomes free. (b) If the semaphore is available within 10 ms, the system will send "TaskMutex" via serial communcation. (c) If the semaphore is not available after 10 ms, the system will send "TaskMutex" via serial communcation. (d) This task will be executed every 10 ms.
Join a community of subject matter experts. Register for FREE to view solutions, replies, and use search function. Request answer by replying!