Complete the code to set an event bit in FreeRTOS.
xEventGroupSetBits([1], BIT_0);The function xEventGroupSetBits requires the event group handle as the first argument. Here, xEventGroup is the correct handle variable.
Complete the code to clear an event bit in FreeRTOS.
xEventGroupClearBits([1], BIT_1);The function xEventGroupClearBits requires the event group handle as the first argument. xEventGroup is the correct handle variable.
Fix the error in the code to set multiple event bits at once.
xEventGroupSetBits([1], BIT_0 | BIT_2);To set multiple bits, the event group handle must be passed as the first argument. xEventGroup is the correct handle variable.
Fill both blanks to create an event group and set BIT_3.
EventGroupHandle_t [1] = [2](); xEventGroupSetBits([1], BIT_3);
First, declare the event group handle variable xEventGroup. Then create the event group by calling xEventGroupCreate(). Finally, use the handle to set the bit.
Fill all three blanks to wait for BIT_0 and BIT_1 to be set, then clear them.
EventBits_t bits = xEventGroupWaitBits([1], [2], [3], pdTRUE, portMAX_DELAY);
pdFALSE instead of pdTRUE when bits should be cleared.Use the event group handle xEventGroup as the first argument. The bits to wait for are BIT_0 | BIT_1. The third argument pdTRUE clears the bits after they are received.
