Skip to content

Commit 48af6fd

Browse files
Amanda Butleradbridge
authored andcommitted
Edit README.md
Edit file, mostly for active voice.
1 parent eaad4d0 commit 48af6fd

File tree

1 file changed

+16
-16
lines changed

1 file changed

+16
-16
lines changed

events/README.md

Lines changed: 16 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1-
## The mbed-events library ##
1+
## The `mbed-events` library ##
22

3-
The mbed-events library provides a flexible queue for scheduling events.
3+
The `mbed-events` library provides a flexible queue for scheduling events.
44

55
``` cpp
66
#include "mbed_events.h"
@@ -20,18 +20,18 @@ int main() {
2020
}
2121
```
2222

23-
The mbed-events library can be used as a normal event loop, or it can be
24-
backgrounded on a single hardware timer or even another event loop. It is
25-
both thread and irq safe, and provides functions for easily composing
23+
You can use the `mbed-events library` as a normal event loop, or you can
24+
background it on a single hardware timer or even another event loop. It is
25+
both thread and IRQ safe and provides functions for easily composing
2626
independent event queues.
2727

28-
The mbed-events library can act as a drop-in scheduler, provide synchronization
29-
between multiple threads, or just act as a mechanism for moving events out of
28+
The `mbed-events` library can act as a drop-in scheduler, provide synchronization
29+
between multiple threads or act as a mechanism for moving events out of
3030
interrupt contexts.
3131

3232
### Usage ###
3333

34-
The core of the mbed-events library is the [EventQueue](EventQueue.h) class,
34+
The core of the `mbed-events library` is the [EventQueue](EventQueue.h) class,
3535
which represents a single event queue. The `EventQueue::dispatch` function
3636
runs the queue, providing the context for executing events.
3737

@@ -53,8 +53,8 @@ queue.dispatch();
5353
```
5454
5555
The EventQueue class provides several call functions for posting events
56-
to the underlying event queue. The call functions are thread and irq safe,
57-
don't need the underlying loop to be running, and provide an easy mechanism
56+
to the underlying event queue. The call functions are thread and IRQ safe,
57+
don't need the underlying loop to be running and provide a mechanism
5858
for moving events out of interrupt contexts.
5959
6060
``` cpp
@@ -73,8 +73,8 @@ queue.call_every(2000, doit_every_two_seconds);
7373
queue.call_every(400, printf, "called every 0.4 seconds\n");
7474
```
7575

76-
The call functions return an id that uniquely represents the event in the
77-
the event queue. This id can be passed to `EventQueue::cancel` to cancel
76+
The call functions return an ID that uniquely represents the event in the
77+
the event queue. You can pass this ID to `EventQueue::cancel` to cancel
7878
an in-flight event.
7979

8080
``` cpp
@@ -92,9 +92,9 @@ if (id) {
9292
queue.cancel(id);
9393
```
9494

95-
For a more fine-grain control of event dispatch, the `Event` class can be
96-
manually instantiated and configured. An `Event` represents an event as
97-
a C++ style function object and can be directly passed to other APIs that
95+
For a more detailed control of event dispatch, you can manually instantiate
96+
and configure the `Event` class. An `Event` represents an event as
97+
a C++ style function object, and you can directly pass it to other APIs that
9898
expect a callback.
9999

100100
``` cpp
@@ -126,7 +126,7 @@ queue.dispatch();
126126
127127
Event queues easily align with module boundaries, where internal state can
128128
be implicitly synchronized through event dispatch. Multiple modules can
129-
use independent event queues, but still be composed through the
129+
use independent event queues but still be composed through the
130130
`EventQueue::chain` function.
131131
132132
``` cpp

0 commit comments

Comments
 (0)