Complete the code to wait for event bits using FreeRTOS API.
EventBits_t bits = xEventGroupWaitBits(eventGroup, [1], pdFALSE, pdTRUE, portMAX_DELAY);The mask 0x03 waits for bits 0 and 1 to be set.
Complete the code to clear bits automatically after waiting.
EventBits_t bits = xEventGroupWaitBits(eventGroup, 0x0F, [1], pdFALSE, 1000);
Setting clearOnExit to pdTRUE clears the bits after they are received.
Fix the error in the code to wait for any bit in the mask.
EventBits_t bits = xEventGroupWaitBits(eventGroup, 0x0F, pdTRUE, [1], portMAX_DELAY);
Setting waitForAllBits to pdFALSE waits for any bit in the mask.
Fill both blanks to wait for bits 0x05 and clear them after waiting.
EventBits_t bits = xEventGroupWaitBits(eventGroup, [1], [2], pdTRUE, portMAX_DELAY);
Mask 0x05 waits for bits 0 and 2. Setting clearOnExit to pdTRUE clears them after waiting.
Fill all three blanks to wait for bits 0x03, do not clear bits, and wait for all bits.
EventBits_t bits = xEventGroupWaitBits(eventGroup, [1], [2], [3], portMAX_DELAY);
Mask 0x03 waits for bits 0 and 1. clearOnExit pdFALSE means bits are not cleared. waitForAllBits pdTRUE waits for all bits.
