Skip to content

Commit 0abd141

Browse files
author
Bogdan Marinescu
committed
A few improvements to the events documentation
1 parent 8545bf1 commit 0abd141

File tree

1 file changed

+0
-5
lines changed

1 file changed

+0
-5
lines changed

docs/events.md

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -23,8 +23,6 @@ The event loop must be created and started manually. The simplest way to achieve
2323
#include "mbed.h"
2424
#include "mbed_events.h"
2525
26-
using events::EventQueue;
27-
2826
// Create a queue that can hold a maximum of 32 events
2927
Queue queue(32 * EVENTS_EVENT_SIZE);
3028
// Create a thread that'll run the event queue's dispatch function
@@ -47,8 +45,6 @@ Once the event loop is created, it can be used for posting events. Let's conside
4745
#include "mbed.h"
4846
#include "mbed_events.h"
4947
50-
using events::EventQueue;
51-
5248
DigitalOut led1(LED1);
5349
InterruptIn sw(SW2);
5450
EventQueue queue(32 * EVENTS_EVENT_SIZE);
@@ -74,7 +70,6 @@ int main() {
7470
sw.rise(rise_handler);
7571
// The 'fall' handler will execute in the context of thread 't'
7672
sw.fall(queue.event(fall_handler));
77-
Thread::wait(osWaitForever);
7873
}
7974
8075
```

0 commit comments

Comments
 (0)