firmware
IEM Firmware Documentation
|
Create a new event group.
Internally, within the FreeRTOS implementation, event groups use a [small] block of memory, in which the event group's structure is stored. If an event groups is created using xEventGroupCreate() then the required memory is automatically dynamically allocated inside the xEventGroupCreate() function. (see https://www.FreeRTOS.org/a00111.html). If an event group is created using xEventGroupCreateStatic() then the application writer must instead provide the memory that will get used by the event group. xEventGroupCreateStatic() therefore allows an event group to be created without using any dynamic memory allocation.
Although event groups are not related to ticks, for internal implementation reasons the number of bits available for use in an event group is dependent on the configTICK_TYPE_WIDTH_IN_BITS setting in FreeRTOSConfig.h. If configTICK_TYPE_WIDTH_IN_BITS is 0 then each event group contains 8 usable bits (bit 0 to bit 7). If configTICK_TYPE_WIDTH_IN_BITS is set to 1 then each event group has 24 usable bits (bit 0 to bit 23). If configTICK_TYPE_WIDTH_IN_BITS is set to 2 then each event group has 56 usable bits (bit 0 to bit 53). The EventBits_t type is used to store event bits within an event group.
The configUSE_EVENT_GROUPS configuration constant must be set to 1 for xEventGroupCreate() to be available.
Example usage: