firmware
IEM Firmware Documentation
|
Atomically set bits within an event group, then wait for a combination of bits to be set within the same event group. This functionality is typically used to synchronise multiple tasks, where each task has to wait for the other tasks to reach a synchronisation point before proceeding.
This function cannot be used from an interrupt.
The function will return before its block time expires if the bits specified by the uxBitsToWait parameter are set, or become set within that time. In this case all the bits specified by uxBitsToWait will be automatically cleared before the function returns.
The configUSE_EVENT_GROUPS configuration constant must be set to 1 for xEventGroupSync() to be available.
xEventGroup | The event group in which the bits are being tested. The event group must have previously been created using a call to xEventGroupCreate(). |
uxBitsToSet | The bits to set in the event group before determining if, and possibly waiting for, all the bits specified by the uxBitsToWait parameter are set. |
uxBitsToWaitFor | A bitwise value that indicates the bit or bits to test inside the event group. For example, to wait for bit 0 and bit 2 set uxBitsToWaitFor to 0x05. To wait for bits 0 and bit 1 and bit 2 set uxBitsToWaitFor to 0x07. Etc. |
xTicksToWait | The maximum amount of time (specified in 'ticks') to wait for all of the bits specified by uxBitsToWaitFor to become set. |
Example usage: