Skip to content

Commit 2b05b39

Browse files
committed
EVENTS.md: Add TOC.
1 parent f9bed07 commit 2b05b39

File tree

1 file changed

+27
-0
lines changed

1 file changed

+27
-0
lines changed

v3/docs/EVENTS.md

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,30 @@
1+
# Synopsis
2+
3+
Using `Event` instances rather than callbacks in `uasyncio` device drivers can
4+
simplify their design and standardise their APIs. It can also simplify
5+
application logic.
6+
7+
This document assumes familiarity with `uasyncio`. See [official docs](http://docs.micropython.org/en/latest/library/uasyncio.html) and
8+
[unofficial tutorial](https://github.com/peterhinch/micropython-async/blob/master/v3/docs/TUTORIAL.md).
9+
10+
1. [An alternative to callbacks in uasyncio code](./EVENTS.md#1-an-alternative-to-callbacks-in-uasyncio-code)
11+
2. [Rationale](./EVENTS.md#2-rationale)
12+
3. [Device driver design](./EVENTS.md#3-device-driver-design)
13+
4. [Primitives](./EVENTS.md#4-primitives)
14+
4.1 [WaitAny](./EVENTS.md#41-waitany)
15+
4.2 [WaitAll](./EVENTS.md#42-waitall)
16+
4.3 [Nesting](./EVENTS.md#43-nesting)
17+
5. [Event based programming](./EVENTS.md#5-event-based-programming)
18+
5.1 [Use of Delay_ms](./EVENTS.md#51-use-of-delay_ms)
19+
5.2 [Long and very long button press](./EVENTS.md#52-long-and-very-long-button-press)
20+
5.3 [Application example](./EVENTS.md#53-application-example)
21+
6. [Drivers](./EVENTS.md#6-drivers)
22+
6.1 [ESwitch](./EVENTS.md#61-eswitch)
23+
6.2 [EButton](./EVENTS.md#62-ebutton)
24+
     6.2.1 [The suppress constructor argument](./EVENTS.md#621-the-suppress-constructor-argument)
25+
     6.2.2 [The sense constructor argument](./EVENTS.md#622-the-sense-constructor-argument)
26+
[Appendix 1 Polling](./EVENTS.md-appendix-1-polling)
27+
128
# 1. An alternative to callbacks in uasyncio code
229

330
A hardware device like a pushbutton or a software object like an MQTT client

0 commit comments

Comments
 (0)