A few improvements to the events documentation

pull/2860/head
Bogdan Marinescu 2016-09-29 20:48:21 +03:00
parent 8545bf1212
commit 0abd141bf9
1 changed files with 0 additions and 5 deletions

View File

@ -23,8 +23,6 @@ The event loop must be created and started manually. The simplest way to achieve
#include "mbed.h"
#include "mbed_events.h"
using events::EventQueue;
// Create a queue that can hold a maximum of 32 events
Queue queue(32 * EVENTS_EVENT_SIZE);
// 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
#include "mbed.h"
#include "mbed_events.h"
using events::EventQueue;
DigitalOut led1(LED1);
InterruptIn sw(SW2);
EventQueue queue(32 * EVENTS_EVENT_SIZE);
@ -74,7 +70,6 @@ int main() {
sw.rise(rise_handler);
// The 'fall' handler will execute in the context of thread 't'
sw.fall(queue.event(fall_handler));
Thread::wait(osWaitForever);
}
```