Complete the code to create an event group using FreeRTOS.
EventGroupHandle_t xEventGroup = [1]();The function xEventGroupCreate() is used to create a new event group in FreeRTOS.
Complete the code to check if the event group was created successfully.
if (xEventGroup == [1]) { // Handle error }
The function xEventGroupCreate() returns NULL if the event group creation fails.
Fix the error in the code to correctly create an event group.
EventGroupHandle_t xEventGroup;
xEventGroup = [1]();The correct function to create an event group is xEventGroupCreate(). Other options are incorrect or do not exist.
Fill both blanks to create an event group and check if creation was successful.
EventGroupHandle_t xEventGroup = [1](); if (xEventGroup == [2]) { // Error handling }
First, create the event group with xEventGroupCreate(). Then check if the returned handle is NULL to detect failure.
Fill all three blanks to create an event group, check for success, and set bits.
EventGroupHandle_t xEventGroup = [1](); if (xEventGroup != [2]) { [3](xEventGroup, BIT_0); }
Create the event group with xEventGroupCreate(). Check that the handle is not NULL. Then set bits using xEventGroupSetBits().
