Chapter 2. API Reference
//
group has already been created
EventGroupHandle_t xEventBits;
void vTask0( void *pvParameters )
{
EventBits_t uxReturn;
TickType_t xTicksToWait
for( ;; )
{
//
Perform task functionality
//
Set bit
//
sync
point.
//
by
ALL_SYNC_BITS.
//
point when
//
for
this to
uxReturn
=
xTicksToWait );
→
if( ( uxReturn
{
//
All three tasks reached the synchronisation point before the call
//
to xEventGroupSync() timed
}
}
}
void vTask1( void *pvParameters )
{
for( ;; )
{
//
Perform task functionality
//
Set bit
//
synchronisation
//
bits defined by
//
synchronisation point when
//
indefinitely
xEventGroupSync( xEventBits, TASK_1_BIT, ALL_SYNC_BITS, portMAX_DELAY );
//
xEventGroupSync() was called
//
this task will only reach here
//
three tasks, so there
}
}
void vTask2( void *pvParameters )
{
for( ;; )
{
//
Perform task functionality
//
Set bit
//
synchronisation
//
bits defined by
//
synchronisation point when
//
indefinitely
xEventGroupSync( xEventBits, TASK_2_BIT, ALL_SYNC_BITS, portMAX_DELAY );
//
xEventGroupSync() was called
Espressif Systems
elsewhere.
=
100
/
portTICK_PERIOD_MS;
here.
0
in
the event flag to note this task has reached the
The other two tasks will
All three tasks have reached the synchronisation
all
the ALL_SYNC_BITS are
happen.
xEventGroupSync( xEventBits, TASK_0_BIT,
&
ALL_SYNC_BITS )
here.
1
in
the event flag to note this task has reached the
point.
The other two tasks will
ALL_SYNC_BITS.
all
for
this to
happen.
is
no need to test the
here.
2
in
the event flag to note this task has reached the
point.
The other two tasks will
ALL_SYNC_BITS.
all
for
this to
happen.
Submit Document Feedback
set
the other two bits defined
set.
Wait a maximum of 100ms
==
ALL_SYNC_BITS )
out.
All three tasks have reached the
the ALL_SYNC_BITS are
with
an indefinite block time, so
if
the synchronisation was made by
return
All three tasks have reached the
the ALL_SYNC_BITS are
with
an indefinite block time, so
936
(continued from previous page)
ALL_SYNC_BITS,␣
set
the other two
set.
Wait
all
value.
set
the other two
set.
Wait
(continues on next page)
Release v4.4
Need help?
Do you have a question about the ESP32-S2 and is the answer not in the manual?
Questions and answers