2 FreeRTOS V7.6.0 - Copyright (C) 2013 Real Time Engineers Ltd.
\r
5 VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.
\r
7 ***************************************************************************
\r
9 * FreeRTOS provides completely free yet professionally developed, *
\r
10 * robust, strictly quality controlled, supported, and cross *
\r
11 * platform software that has become a de facto standard. *
\r
13 * Help yourself get started quickly and support the FreeRTOS *
\r
14 * project by purchasing a FreeRTOS tutorial book, reference *
\r
15 * manual, or both from: http://www.FreeRTOS.org/Documentation *
\r
19 ***************************************************************************
\r
21 This file is part of the FreeRTOS distribution.
\r
23 FreeRTOS is free software; you can redistribute it and/or modify it under
\r
24 the terms of the GNU General Public License (version 2) as published by the
\r
25 Free Software Foundation >>!AND MODIFIED BY!<< the FreeRTOS exception.
\r
27 >>! NOTE: The modification to the GPL is included to allow you to distribute
\r
28 >>! a combined work that includes FreeRTOS without being obliged to provide
\r
29 >>! the source code for proprietary components outside of the FreeRTOS
\r
32 FreeRTOS is distributed in the hope that it will be useful, but WITHOUT ANY
\r
33 WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
\r
34 FOR A PARTICULAR PURPOSE. Full license text is available from the following
\r
35 link: http://www.freertos.org/a00114.html
\r
39 ***************************************************************************
\r
41 * Having a problem? Start by reading the FAQ "My application does *
\r
42 * not run, what could be wrong?" *
\r
44 * http://www.FreeRTOS.org/FAQHelp.html *
\r
46 ***************************************************************************
\r
48 http://www.FreeRTOS.org - Documentation, books, training, latest versions,
\r
49 license and Real Time Engineers Ltd. contact details.
\r
51 http://www.FreeRTOS.org/plus - A selection of FreeRTOS ecosystem products,
\r
52 including FreeRTOS+Trace - an indispensable productivity tool, a DOS
\r
53 compatible FAT file system, and our tiny thread aware UDP/IP stack.
\r
55 http://www.OpenRTOS.com - Real Time Engineers ltd license FreeRTOS to High
\r
56 Integrity Systems to sell under the OpenRTOS brand. Low cost OpenRTOS
\r
57 licenses offer ticketed support, indemnification and middleware.
\r
59 http://www.SafeRTOS.com - High Integrity Systems also provide a safety
\r
60 engineered and independently SIL3 certified version for use in safety and
\r
61 mission critical applications that require provable dependability.
\r
66 #ifndef EVENT_GROUPS_H
\r
67 #define EVENT_GROUPS_H
\r
69 #ifndef INC_FREERTOS_H
\r
70 #error "include FreeRTOS.h" must appear in source files before "include event_groups.h"
\r
80 * An event group is a collection of bits to which an application can assign a
\r
81 * meaning. For example, an application may create an event group to convey
\r
82 * the status of various CAN bus related events in which bit 0 might mean "A CAN
\r
83 * message has been received and is ready for processing", bit 1 might mean "The
\r
84 * application has queued a message that is ready for sending onto the CAN
\r
85 * network", and bit 2 might mean "It is time to send a SYNC message onto the
\r
86 * CAN network" etc. A task can then test the bit values to see which events
\r
87 * are active, and optionally enter the Blocked state to wait for a specified
\r
88 * bit or a group of specified bits to be active. To continue the CAN bus
\r
89 * example, a CAN controlling task can enter the Blocked state (and therefore
\r
90 * not consume any processing time) until either bit 0, bit 1 or bit 2 are
\r
91 * active, at which time the bit that was actually active would inform the task
\r
92 * which action it had to take (process a received message, send a message, or
\r
95 * The event groups implementation contains intelligence to avoid race
\r
96 * conditions that would otherwise occur were an application to use a simple
\r
97 * variable for the same purpose. This is particularly important with respect
\r
98 * to when a bit within an event group is to be cleared, and when bits have to
\r
99 * be set and then tested atomically - as is the case where event groups are
\r
100 * used to create a synchronisation point between multiple tasks (a
\r
103 * \defgroup EventGroup
\r
111 * Type by which event groups are referenced. For example, a call to
\r
112 * xEventGroupCreate() returns an xEventGroupHandle variable that can then
\r
113 * be used as a parameter to other event group functions.
\r
115 * \defgroup xEventGroupHandle xEventGroupHandle
\r
116 * \ingroup EventGroup
\r
118 typedef void * xEventGroupHandle;
\r
123 xEventGroupHandle xEventGroupCreate( void );
\r
126 * Create a new event group. This function cannot be called from an interrupt.
\r
128 * Although event groups are not related to ticks, for internal implementation
\r
129 * reasons the number of bits available for use in an event group is dependent
\r
130 * on the configUSE_16_BIT_TICKS setting in FreeRTOSConfig.h. If
\r
131 * configUSE_16_BIT_TICKS is 1 then each event group contains 8 usable bits (bit
\r
132 * 0 to bit 7). If configUSE_16_BIT_TICKS is set to 0 then each event group has
\r
133 * 24 usable bits (bit 0 to bit 23). The xEventBitsType type is used to store
\r
134 * event bits within an event group.
\r
136 * @return If the event group was created then a handle to the event group is
\r
137 * returned. If there was insufficient FreeRTOS heap available to create the
\r
138 * event group then NULL is returned. See http://www.freertos.org/a00111.html
\r
142 // Declare a variable to hold the created event group.
\r
143 xEventGroupHandle xCreatedEventGroup;
\r
145 // Attempt to create the event group.
\r
146 xCreatedEventGroup = xEventGroupCreate();
\r
148 // Was the event group created successfully?
\r
149 if( xCreatedEventGroup == NULL )
\r
151 // The event group was not created because there was insufficient
\r
152 // FreeRTOS heap available.
\r
156 // The event group was created.
\r
159 * \defgroup xEventGroupCreate xEventGroupCreate
\r
160 * \ingroup EventGroup
\r
162 xEventGroupHandle xEventGroupCreate( void ) PRIVILEGED_FUNCTION;
\r
167 xEventBitsType xEventGroupWaitBits( xEventGroupHandle xEventGroup,
\r
168 const xEventBitsType uxBitsToWaitFor,
\r
169 const portBASE_TYPE xClearOnExit,
\r
170 const portBASE_TYPE xWaitForAllBits,
\r
171 const portTickType xTicksToWait );
\r
174 * [Potentially] block to wait for one or more bits to be set within a
\r
175 * previously created event group.
\r
177 * This function cannot be called from an interrupt.
\r
179 * @param xEventGroup The event group in which the bits are being tested. The
\r
180 * event group must have previously been created using a call to
\r
181 * xEventGroupCreate().
\r
183 * @param uxBitsToWaitFor A bitwise value that indicates the bit or bits to test
\r
184 * inside the event group. For example, to wait for bit 0 and/or bit 2 set
\r
185 * uxBitsToWaitFor to 0x05. To wait for bits 0 and/or bit 1 and/or bit 2 set
\r
186 * uxBitsToWaitFor to 0x07. Etc.
\r
188 * @param xClearOnExit If xClearOnExit is set to pdTRUE then any bits within
\r
189 * uxBitsToWaitFor that are set within the event group will be cleared before
\r
190 * xEventGroupWaitBits() returns if the wait condition was met (if the function
\r
191 * returns for a reason other than a timeout). If xClearOnExit is set to
\r
192 * pdFALSE then the bits set in the event group are not altered when the call to
\r
193 * xEventGroupWaitBits() returns.
\r
195 * @param xWaitForAllBits If xWaitForAllBits is set to pdTRUE then
\r
196 * xEventGroupWaitBits() will return when either all the bits in uxBitsToWaitFor
\r
197 * are set or the specified block time expires. If xWaitForAllBits is set to
\r
198 * pdFALSE then xEventGroupWaitBits() will return when any one of the bits set
\r
199 * in uxBitsToWaitFor is set or the specified block time expires. The block
\r
200 * time is specified by the xTicksToWait parameter.
\r
202 * @param xTicksToWait The maximum amount of time (specified in 'ticks') to wait
\r
203 * for one/all (depending on the xWaitForAllBits value) of the bits specified by
\r
204 * uxBitsToWaitFor to become set.
\r
206 * @return The value of the event group at the time either the bits being waited
\r
207 * for became set, or the block time expired. Test the return value to know
\r
208 * which bits were set. If xEventGroupWaitBits() returned because its timeout
\r
209 * expired then not all the bits being waited for will be set. If
\r
210 * xEventGroupWaitBits() returned because the bits it was waiting for were set
\r
211 * then the returned value is the event group value before any bits were
\r
212 * automatically cleared in the case that xClearOnExit parameter was set to
\r
217 #define BIT_0 ( 1 << 0 )
\r
218 #define BIT_4 ( 1 << 4 )
\r
220 void aFunction( xEventGroupHandle xEventGroup )
\r
222 xEventBitsType uxBits;
\r
223 const portTickType xTicksToWait = 100 / portTICK_RATE_MS;
\r
225 // Wait a maximum of 100ms for either bit 0 or bit 4 to be set within
\r
226 // the event group. Clear the bits before exiting.
\r
227 uxBits = xEventGroupWaitBits(
\r
228 xEventGroup, // The event group being tested.
\r
229 BIT_0 | BIT_4, // The bits within the event group to wait for.
\r
230 pdTRUE, // BIT_0 and BIT_4 should be cleared before returning.
\r
231 pdFALSE, // Don't wait for both bits, either bit will do.
\r
232 xTicksToWait ); // Wait a maximum of 100ms for either bit to be set.
\r
234 if( ( uxBits & ( BIT_0 | BIT_4 ) ) == ( BIT_0 | BIT_4 ) )
\r
236 // xEventGroupWaitBits() returned because both bits were set.
\r
238 else if( ( uxBits & BIT_0 ) != 0 )
\r
240 // xEventGroupWaitBits() returned because just BIT_0 was set.
\r
242 else if( ( uxBits & BIT_4 ) != 0 )
\r
244 // xEventGroupWaitBits() returned because just BIT_4 was set.
\r
248 // xEventGroupWaitBits() returned because xTicksToWait ticks passed
\r
249 // without either BIT_0 or BIT_4 becoming set.
\r
253 * \defgroup xEventGroupWaitBits xEventGroupWaitBits
\r
254 * \ingroup EventGroup
\r
256 xEventBitsType xEventGroupWaitBits( xEventGroupHandle xEventGroup, const xEventBitsType uxBitsToWaitFor, const portBASE_TYPE xClearOnExit, const portBASE_TYPE xWaitForAllBits, portTickType xTicksToWait ) PRIVILEGED_FUNCTION;
\r
261 xEventBitsType xEventGroupClearBits( xEventGroupHandle xEventGroup, const xEventBitsType uxBitsToClear );
\r
264 * Clear bits within an event group. This function cannot be called from an
\r
267 * @param xEventGroup The event group in which the bits are to be cleared.
\r
269 * @param uxBitsToClear A bitwise value that indicates the bit or bits to clear
\r
270 * in the event group. For example, to clear bit 3 only, set uxBitsToClear to
\r
271 * 0x08. To clear bit 3 and bit 0 set uxBitsToClear to 0x09.
\r
273 * @return The value of the event group before the specified bits were cleared.
\r
277 #define BIT_0 ( 1 << 0 )
\r
278 #define BIT_4 ( 1 << 4 )
\r
280 void aFunction( xEventGroupHandle xEventGroup )
\r
282 xEventBitsType uxBits;
\r
284 // Clear bit 0 and bit 4 in xEventGroup.
\r
285 uxBits = xEventGroupClearBits(
\r
286 xEventGroup, // The event group being updated.
\r
287 BIT_0 | BIT_4 );// The bits being cleared.
\r
289 if( ( uxBits & ( BIT_0 | BIT_4 ) ) == ( BIT_0 | BIT_4 ) )
\r
291 // Both bit 0 and bit 4 were set before xEventGroupClearBits() was
\r
292 // called. Both will now be clear (not set).
\r
294 else if( ( uxBits & BIT_0 ) != 0 )
\r
296 // Bit 0 was set before xEventGroupClearBits() was called. It will
\r
299 else if( ( uxBits & BIT_4 ) != 0 )
\r
301 // Bit 4 was set before xEventGroupClearBits() was called. It will
\r
306 // Neither bit 0 nor bit 4 were set in the first place.
\r
310 * \defgroup xEventGroupClearBits xEventGroupClearBits
\r
311 * \ingroup EventGroup
\r
313 xEventBitsType xEventGroupClearBits( xEventGroupHandle xEventGroup, const xEventBitsType uxBitsToClear ) PRIVILEGED_FUNCTION;
\r
318 xEventBitsType xEventGroupSetBits( xEventGroupHandle xEventGroup, const xEventBitsType uxBitsToSet );
\r
321 * Set bits within an event group.
\r
322 * This function cannot be called from an interrupt. xEventGroupSetBitsFromISR()
\r
323 * is a version that can be called from an interrupt.
\r
325 * Setting bits in an event group will automatically unblock tasks that are
\r
326 * blocked waiting for the bits.
\r
328 * @param xEventGroup The event group in which the bits are to be set.
\r
330 * @param uxBitsToSet A bitwise value that indicates the bit or bits to set.
\r
331 * For example, to set bit 3 only, set uxBitsToSet to 0x08. To set bit 3
\r
332 * and bit 0 set uxBitsToSet to 0x09.
\r
334 * @return The value of the event group at the time the call to
\r
335 * xEventGroupSetBits() returns. There are two reasons why the returned value
\r
336 * might have the bits specified by the uxBitsToSet parameter cleared. First,
\r
337 * if setting a bit results in a task that was waiting for the bit leaving the
\r
338 * blocked state then it is possible the bit will be cleared automatically
\r
339 * (see the xClearBitOnExit parameter of xEventGroupWaitBits()). Second, any
\r
340 * unblocked (or otherwise Ready state) task that has a priority above that of
\r
341 * the task that called xEventGroupSetBits() will execute and may change the
\r
342 * event group value before the call to xEventGroupSetBits() returns.
\r
346 #define BIT_0 ( 1 << 0 )
\r
347 #define BIT_4 ( 1 << 4 )
\r
349 void aFunction( xEventGroupHandle xEventGroup )
\r
351 xEventBitsType uxBits;
\r
353 // Set bit 0 and bit 4 in xEventGroup.
\r
354 uxBits = xEventGroupSetBits(
\r
355 xEventGroup, // The event group being updated.
\r
356 BIT_0 | BIT_4 );// The bits being set.
\r
358 if( ( uxBits & ( BIT_0 | BIT_4 ) ) == ( BIT_0 | BIT_4 ) )
\r
360 // Both bit 0 and bit 4 remained set when the function returned.
\r
362 else if( ( uxBits & BIT_0 ) != 0 )
\r
364 // Bit 0 remained set when the function returned, but bit 4 was
\r
365 // cleared. It might be that bit 4 was cleared automatically as a
\r
366 // task that was waiting for bit 4 was removed from the Blocked
\r
369 else if( ( uxBits & BIT_4 ) != 0 )
\r
371 // Bit 4 remained set when the function returned, but bit 0 was
\r
372 // cleared. It might be that bit 0 was cleared automatically as a
\r
373 // task that was waiting for bit 0 was removed from the Blocked
\r
378 // Neither bit 0 nor bit 4 remained set. It might be that a task
\r
379 // was waiting for both of the bits to be set, and the bits were
\r
380 // cleared as the task left the Blocked state.
\r
384 * \defgroup xEventGroupSetBits xEventGroupSetBits
\r
385 * \ingroup EventGroup
\r
387 xEventBitsType xEventGroupSetBits( xEventGroupHandle xEventGroup, const xEventBitsType uxBitsToSet ) PRIVILEGED_FUNCTION;
\r
392 xEventBitsType xEventGroupSetBitsFromISR( xEventGroupHandle xEventGroup, const xEventBitsType uxBitsToSet, portBASE_TYPE *pxHigherPriorityTaskWoken );
\r
395 * A version of xEventGroupSetBits() that can be called from an interrupt.
\r
397 * Setting bits in an event group is not a deterministic operation because there
\r
398 * are an unknown number of tasks that may be waiting for the bit or bits being
\r
399 * set. FreeRTOS does not allow nondeterministic operations to be performed in
\r
400 * interrupts or from critical sections. Therefore xEventGroupSetBitFromISR()
\r
401 * sends a message to the timer task to have the set operation performed in the
\r
402 * context of the timer task - where a scheduler lock is used in place of a
\r
403 * critical section.
\r
405 * @param xEventGroup The event group in which the bits are to be set.
\r
407 * @param uxBitsToSet A bitwise value that indicates the bit or bits to set.
\r
408 * For example, to set bit 3 only, set uxBitsToSet to 0x08. To set bit 3
\r
409 * and bit 0 set uxBitsToSet to 0x09.
\r
411 * @param pxHigherPriorityTaskWoken As mentioned above, calling this function
\r
412 * will result in a message being sent to the timer daemon task. If the
\r
413 * priority of the timer daemon task is higher than the priority of the
\r
414 * currently running task (the task the interrupt interrupted) then
\r
415 * *pxHigherPriorityTaskWoken will be set to pdTRUE by
\r
416 * xEventGroupSetBitsFromISR(), indicating that a context switch should be
\r
417 * requested before the interrupt exits. For that reason
\r
418 * *pxHigherPriorityTaskWoken must be initialised to pdFALSE. See the
\r
419 * example code below.
\r
421 * @return If the callback request was registered successfully then pdPASS is
\r
422 * returned, otherwise pdFALSE is returned. pdFALSE will be returned if the
\r
423 * timer service queue was full.
\r
427 #define BIT_0 ( 1 << 0 )
\r
428 #define BIT_4 ( 1 << 4 )
\r
430 // An event group which it is assumed has already been created by a call to
\r
431 // xEventGroupCreate().
\r
432 xEventGroupHandle xEventGroup;
\r
434 void anInterruptHandler( void )
\r
436 portBASE_TYPE xHigherPriorityTaskWoken;
\r
438 // xHigherPriorityTaskWoken must be initialised to pdFALSE.
\r
439 xHigherPriorityTaskWoken = pdFALSE;
\r
441 // Set bit 0 and bit 4 in xEventGroup.
\r
442 uxBits = xEventGroupSetBitsFromISR(
\r
443 xEventGroup, // The event group being updated.
\r
444 BIT_0 | BIT_4 // The bits being set.
\r
445 &xHigherPriorityTaskWoken );
\r
447 // If xHigherPriorityTaskWoken is now set to pdTRUE then a context
\r
448 // switch should be requested. The macro used is port specific and will
\r
449 // be either portYIELD_FROM_ISR() or portEND_SWITCHING_ISR() - refer to
\r
450 // the documentation page for the port being used.
\r
451 portYIELD_FROM_ISR( xHigherPriorityTaskWoken );
\r
454 * \defgroup xEventGroupSetBitsFromISR xEventGroupSetBitsFromISR
\r
455 * \ingroup EventGroup
\r
457 #define xEventGroupSetBitsFromISR( xEventGroup, uxBitsToSet, pxHigherPriorityTaskWoken ) xTimerPendCallbackFromISR( vEventGroupSetBitsCallback, ( void * ) xEventGroup, ( unsigned long ) uxBitsToSet, pxHigherPriorityTaskWoken )
\r
462 xEventBitsType xEventGroupSync( xEventGroupHandle xEventGroup,
\r
463 const xEventBitsType uxBitsToSet,
\r
464 const xEventBitsType uxBitsToWaitFor,
\r
465 portTickType xTicksToWait );
\r
468 * Atomically set bits within an event group, then wait for a combination of
\r
469 * bits to be set within the same event group. This functionality is typically
\r
470 * used to synchronise multiple tasks, where each task has to wait for the other
\r
471 * tasks to reach a synchronisation point before proceeding.
\r
473 * This function cannot be used from an interrupt.
\r
475 * The function will return before its block time expires if the bits specified
\r
476 * by the uxBitsToWait parameter are set, or become set within that time. In
\r
477 * this case all the bits specified by uxBitsToWait will be automatically
\r
478 * cleared before the function returns.
\r
480 * @param xEventGroup The event group in which the bits are being tested. The
\r
481 * event group must have previously been created using a call to
\r
482 * xEventGroupCreate().
\r
484 * @param uxBitsToSet The bits to set in the event group before determining
\r
485 * if, and possibly waiting for, all the bits specified by the uxBitsToWait
\r
486 * parameter are set.
\r
488 * @param uxBitsToWaitFor A bitwise value that indicates the bit or bits to test
\r
489 * inside the event group. For example, to wait for bit 0 and bit 2 set
\r
490 * uxBitsToWaitFor to 0x05. To wait for bits 0 and bit 1 and bit 2 set
\r
491 * uxBitsToWaitFor to 0x07. Etc.
\r
493 * @param xTicksToWait The maximum amount of time (specified in 'ticks') to wait
\r
494 * for all of the bits specified by uxBitsToWaitFor to become set.
\r
496 * @return The value of the event group at the time either the bits being waited
\r
497 * for became set, or the block time expired. Test the return value to know
\r
498 * which bits were set. If xEventGroupSync() returned because its timeout
\r
499 * expired then not all the bits being waited for will be set. If
\r
500 * xEventGroupSync() returned because all the bits it was waiting for were
\r
501 * set then the returned value is the event group value before any bits were
\r
502 * automatically cleared.
\r
506 // Bits used by the three tasks.
\r
507 #define TASK_0_BIT ( 1 << 0 )
\r
508 #define TASK_1_BIT ( 1 << 1 )
\r
509 #define TASK_2_BIT ( 1 << 2 )
\r
511 #define ALL_SYNC_BITS ( TASK_0_BIT | TASK_1_BIT | TASK_2_BIT )
\r
513 // Use an event group to synchronise three tasks. It is assumed this event
\r
514 // group has already been created elsewhere.
\r
515 xEventGroupHandle xEventBits;
\r
517 void vTask0( void *pvParameters )
\r
519 xEventBitsType uxReturn;
\r
520 portTickType xTicksToWait = 100 / portTICK_RATE_MS;
\r
524 // Perform task functionality here.
\r
526 // Set bit 0 in the event flag to note this task has reached the
\r
527 // sync point. The other two tasks will set the other two bits defined
\r
528 // by ALL_SYNC_BITS. All three tasks have reached the synchronisation
\r
529 // point when all the ALL_SYNC_BITS are set. Wait a maximum of 100ms
\r
530 // for this to happen.
\r
531 uxReturn = xEventGroupSync( xEventBits, TASK_0_BIT, ALL_SYNC_BITS, xTicksToWait );
\r
533 if( ( uxReturn & ALL_SYNC_BITS ) == ALL_SYNC_BITS )
\r
535 // All three tasks reached the synchronisation point before the call
\r
536 // to xEventGroupSync() timed out.
\r
541 void vTask1( void *pvParameters )
\r
545 // Perform task functionality here.
\r
547 // Set bit 1 in the event flag to note this task has reached the
\r
548 // synchronisation point. The other two tasks will set the other two
\r
549 // bits defined by ALL_SYNC_BITS. All three tasks have reached the
\r
550 // synchronisation point when all the ALL_SYNC_BITS are set. Wait
\r
551 // indefinitely for this to happen.
\r
552 xEventGroupSync( xEventBits, TASK_1_BIT, ALL_SYNC_BITS, portMAX_DELAY );
\r
554 // xEventGroupSync() was called with an indefinite block time, so
\r
555 // this task will only reach here if the syncrhonisation was made by all
\r
556 // three tasks, so there is no need to test the return value.
\r
560 void vTask2( void *pvParameters )
\r
564 // Perform task functionality here.
\r
566 // Set bit 2 in the event flag to note this task has reached the
\r
567 // synchronisation point. The other two tasks will set the other two
\r
568 // bits defined by ALL_SYNC_BITS. All three tasks have reached the
\r
569 // synchronisation point when all the ALL_SYNC_BITS are set. Wait
\r
570 // indefinitely for this to happen.
\r
571 xEventGroupSync( xEventBits, TASK_2_BIT, ALL_SYNC_BITS, portMAX_DELAY );
\r
573 // xEventGroupSync() was called with an indefinite block time, so
\r
574 // this task will only reach here if the syncrhonisation was made by all
\r
575 // three tasks, so there is no need to test the return value.
\r
580 * \defgroup xEventGroupSync xEventGroupSync
\r
581 * \ingroup EventGroup
\r
583 xEventBitsType xEventGroupSync( xEventGroupHandle xEventGroup, const xEventBitsType uxBitsToSet, const xEventBitsType uxBitsToWaitFor, portTickType xTicksToWait ) PRIVILEGED_FUNCTION;
\r
589 xEventBitsType xEventGroupGetBits( xEventGroupHandle xEventGroup );
\r
592 * Returns the current value of the bits in an event group. This function
\r
593 * cannot be used from an interrupt.
\r
595 * @param xEventGroup The event group being queried.
\r
597 * @return The event group bits at the time xEventGroupGetBits() was called.
\r
599 * \defgroup xEventGroupGetBits xEventGroupGetBits
\r
600 * \ingroup EventGroup
\r
602 #define xEventGroupGetBits( xEventGroup ) xEventGroupClearBits( xEventGroup, 0 )
\r
607 void xEventGroupDelete( xEventGroupHandle xEventGroup );
\r
610 * Delete an event group that was previously created by a call to
\r
611 * xEventGroupCreate(). Tasks that are blocked on the event group will be
\r
612 * unblocked and obtain 0 as the event group's value.
\r
614 * @param xEventGroup The event group being deleted.
\r
616 void vEventGroupDelete( xEventGroupHandle xEventGroup );
\r
618 /* For internal use only. */
\r
619 void vEventGroupSetBitsCallback( void *pvEventGroup, const unsigned long ulBitsToSet );
\r
626 #endif /* EVENT_GROUPS_H */
\r