@@ -37,73 +37,75 @@ namespace rtos {
37
37
* @{
38
38
*/
39
39
40
- /* * The EventFlags class is used to signal or wait for an arbitrary event or events.
40
+ /* * The EventFlags class is used to control event flags or wait for event flags other threads control.
41
+
41
42
@note
42
- EventFlags support 31 flags so the MSB flag is ignored, it is used to return an error code (@a osFlagsError)
43
+ EventFlags support 31 flags. The MSB flag is ignored. It is used to return an error code (@a osFlagsError).
44
+
43
45
@note
44
- Memory considerations: The EventFlags control structures will be created on current thread's stack, both for the mbed OS
46
+ Memory considerations: The EventFlags control structures will be created on current thread's stack, both for the Mbed OS
45
47
and underlying RTOS objects (static or dynamic RTOS memory pools are not being used).
46
48
*/
47
49
class EventFlags : private mbed ::NonCopyable<EventFlags> {
48
50
public:
49
- /* * Create and Initialize an EventFlags object
51
+ /* * Create and initialize an EventFlags object.
50
52
*
51
53
* @note You cannot call this function from ISR context.
52
54
*/
53
55
EventFlags ();
54
56
55
- /* * Create and Initialize a EventFlags object
57
+ /* * Create and initialize a EventFlags object.
56
58
57
59
@param name name to be used for this EventFlags. It has to stay allocated for the lifetime of the thread.
58
60
59
61
@note You cannot call this function from ISR context.
60
62
*/
61
63
EventFlags (const char *name);
62
64
63
- /* * Set the specified Event Flags .
64
- @param flags specifies the flags that shall be set.
65
- @return event flags after setting or error code if highest bit set (@a osFlagsError).
65
+ /* * Set the specified event flags .
66
+ @param flags the flags that shall be set.
67
+ @return event flags after setting or error code if highest bit set (see @a osFlagsError for details ).
66
68
67
69
@note This function may be called from ISR context.
68
70
*/
69
71
uint32_t set (uint32_t flags);
70
72
71
- /* * Clear the specified Event Flags .
72
- @param flags specifies the flags that shall be cleared. (default: 0x7fffffff - all flags)
73
- @return event flags before clearing or error code if highest bit set (@a osFlagsError).
73
+ /* * Clear the specified event flags .
74
+ @param flags the flags that shall be cleared (default: 0x7fffffff -- all flags).
75
+ @return event flags before clearing or error code if highest bit set (see @a osFlagsError for details ).
74
76
75
77
@note You may call this function from ISR context.
76
78
*/
77
79
uint32_t clear (uint32_t flags = 0x7fffffff );
78
80
79
- /* * Get the currently set Event Flags .
80
- @return set event flags.
81
+ /* * Get the currently set event flags .
82
+ @return current event flags.
81
83
82
84
@note You may call this function from ISR context.
83
85
*/
84
86
uint32_t get () const ;
85
87
86
88
/* * Wait for all of the specified event flags to become signaled.
87
- @param flags specifies the flags to wait for.
88
- @param timeout timeout value or 0 in case of no time-out. (default: osWaitForever)
89
- @param clear specifies wether to clear the flags after waiting for them. (default: true)
90
- @return event flags before clearing or error code if highest bit set (@a osFlagsError).
89
+ @param flags the flags to wait for (default: 0 -- no flags) .
90
+ @param timeout timeout value or 0 in case of no time-out (default: osWaitForever).
91
+ @param clear clear specified event flags after waiting for them (default: true).
92
+ @return event flags before clearing or error code if highest bit set (see @a osFlagsError for details ).
91
93
92
94
@note You may call this function from ISR context if the timeout parameter is set to 0.
93
95
*/
94
96
uint32_t wait_all (uint32_t flags = 0 , uint32_t timeout = osWaitForever, bool clear = true );
95
97
96
98
/* * Wait for any of the specified event flags to become signaled.
97
- @param flags specifies the flags to wait for. (default: 0)
98
- @param timeout timeout value or 0 in case of no time-out. (default: osWaitForever)
99
- @param clear specifies wether to clear the flags after waiting for them. (default: true)
100
- @return event flags before clearing or error code if highest bit set (@a osFlagsError).
99
+ @param flags the flags to wait for (default: 0 -- no flags).
100
+ @param timeout timeout value or 0 in case of no time-out (default: osWaitForever).
101
+ @param clear clear specified event flags after waiting for them (default: true).
102
+ @return event flags before clearing or error code if highest bit set (see @a osFlagsError for details ).
101
103
102
104
@note This function may be called from ISR context if the timeout parameter is set to 0.
103
105
*/
104
106
uint32_t wait_any (uint32_t flags = 0 , uint32_t timeout = osWaitForever, bool clear = true );
105
107
106
- /* * Event flags destructor
108
+ /* * EventFlags destructor.
107
109
108
110
@note You cannot call this function from ISR context.
109
111
*/
0 commit comments