Bird
0
0

Which of the following is the correct way to create an event group in FreeRTOS?

easy📝 Syntax Q12 of 15
FreeRTOS - Design Patterns for RTOS
Which of the following is the correct way to create an event group in FreeRTOS?
AEventGroup xEventGroup = xCreateEventGroup();
BEventGroupHandle_t xEventGroup = xEventGroupCreate();
CxEventGroup = EventGroupCreate();
DEventGroupHandle_t xEventGroup = createEventGroup();
Step-by-Step Solution
Solution:
  1. Step 1: Recall FreeRTOS event group creation syntax

    The official FreeRTOS function to create an event group is xEventGroupCreate(), returning EventGroupHandle_t.
  2. Step 2: Match the correct syntax

    EventGroupHandle_t xEventGroup = xEventGroupCreate(); uses the correct function name and type: EventGroupHandle_t xEventGroup = xEventGroupCreate();
  3. Final Answer:

    EventGroupHandle_t xEventGroup = xEventGroupCreate(); -> Option B
  4. Quick Check:

    Correct function and type = EventGroupHandle_t xEventGroup = xEventGroupCreate(); [OK]
Quick Trick: FreeRTOS event groups use xEventGroupCreate() function [OK]
Common Mistakes:
  • Using wrong function names like createEventGroup()
  • Missing the correct handle type EventGroupHandle_t
  • Incorrect capitalization or function syntax

Want More Practice?

15+ quiz questions · All difficulty levels · Free

Free Signup - Practice All Questions
More FreeRTOS Quizzes