Skip to content

Commit d5fe719

Browse files
committed
Move the EventFlags example to an external repo
1 parent f0ba6cd commit d5fe719

File tree

1 file changed

+1
-30
lines changed

1 file changed

+1
-30
lines changed

docs/api/rtos/EventFlags.md

Lines changed: 1 addition & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -10,33 +10,4 @@ The EventFlags class provides a mechanism for setting and waiting for specific c
1010

1111
### EventFlags example
1212

13-
Below is an example of EventFlags usage, where one thread is generating events every 1s, and the second thread is waiting for the events and executing some action.
14-
15-
<span class="images">![](https://s3-us-west-2.amazonaws.com/mbed-os-docs-images//eventflags_usage.png)</span>
16-
17-
```
18-
#include "mbed.h"
19-
20-
EventFlags event;
21-
22-
void worker_f()
23-
{
24-
while (true) {
25-
event.wait_all(0x1);
26-
27-
printf("Got signal!\r\n");
28-
}
29-
}
30-
31-
int main()
32-
{
33-
Thread worker;
34-
35-
worker.start(callback(worker_f));
36-
37-
while (true) {
38-
wait(1);
39-
event.set(0x1);
40-
}
41-
}
42-
```
13+
[![View Example](https://www.mbed.com/embed/?url=https://github.com/ARMmbed/mbed-os-examples-docs_only)](https://github.com/ARMmbed/mbed-os-examples-docs_only/blob/master/EventFlags/main.cpp)

0 commit comments

Comments
 (0)