Skip to content

Commit 6651918

Browse files
committed
EVENTS.md: Add TOC.
1 parent 5adc77e commit 6651918

File tree

1 file changed

+15
-13
lines changed

1 file changed

+15
-13
lines changed

v3/docs/EVENTS.md

Lines changed: 15 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -12,17 +12,17 @@ This document assumes familiarity with `uasyncio`. See [official docs](http://do
1212
1. [An alternative to callbacks in uasyncio code](./EVENTS.md#1-an-alternative-to-callbacks-in-uasyncio-code)
1313
2. [Rationale](./EVENTS.md#2-rationale)
1414
3. [Device driver design](./EVENTS.md#3-device-driver-design)
15-
4. [Primitives](./EVENTS.md#4-primitives)
16-
4.1 [WaitAny](./EVENTS.md#41-waitany)
17-
4.2 [WaitAll](./EVENTS.md#42-waitall)
15+
4. [Primitives](./EVENTS.md#4-primitives) Facilitating Event-based application logic
16+
4.1 [WaitAny](./EVENTS.md#41-waitany) Wait on any of a group of event-like objects
17+
4.2 [WaitAll](./EVENTS.md#42-waitall) Wait on all of a group of event-like objects
1818
4.3 [Nesting](./EVENTS.md#43-nesting)
1919
5. [Event based programming](./EVENTS.md#5-event-based-programming)
20-
5.1 [Use of Delay_ms](./EVENTS.md#51-use-of-delay_ms)
20+
5.1 [Use of Delay_ms](./EVENTS.md#51-use-of-delay_ms) A retriggerable delay
2121
5.2 [Long and very long button press](./EVENTS.md#52-long-and-very-long-button-press)
2222
5.3 [Application example](./EVENTS.md#53-application-example)
23-
6. [Drivers](./EVENTS.md#6-drivers)
24-
6.1 [ESwitch](./EVENTS.md#61-eswitch)
25-
6.2 [EButton](./EVENTS.md#62-ebutton)
23+
6. [Drivers](./EVENTS.md#6-drivers) Minimal Event-based drivers
24+
6.1 [ESwitch](./EVENTS.md#61-eswitch) Debounced switch
25+
6.2 [EButton](./EVENTS.md#62-ebutton) Debounced pushbutton with double and long press events
2626
     6.2.1 [The suppress constructor argument](./EVENTS.md#621-the-suppress-constructor-argument)
2727
     6.2.2 [The sense constructor argument](./EVENTS.md#622-the-sense-constructor-argument)
2828
[Appendix 1 Polling](./EVENTS.md#100-appendix-1-polling)
@@ -68,8 +68,9 @@ or task when the `Event` is set. With the design approach outlined below, the
6868
need for callbacks is much reduced.
6969

7070
Note the `Stream` mechanism provides another approach which works well with
71-
devices such as sockets and UARTs. It is less well suited to handling arbitrary
72-
events, partly because it relies on polling under the hood.
71+
devices such as sockets and UARTs. It is arguably less well suited to handling
72+
arbitrary events, partly because it relies on
73+
[polling](./EVENTS.md#100-appendix-1-polling) under the hood.
7374

7475
###### [Contents](./EVENTS.md#0-contents)
7576

@@ -110,8 +111,9 @@ because:
110111
where they are small and spend most of the time paused waiting on queues.
111112

112113
This contrasts with other schedulers (such as `uasyncio` V2) where there was no
113-
built-in `Event` class; typical `Event` implementations used polling and were
114-
convenience objects rather than performance solutions.
114+
built-in `Event` class; typical `Event` implementations used
115+
[polling](./EVENTS.md#100-appendix-1-polling) and were convenience objects
116+
rather than performance solutions.
115117

116118
The `Event` class `.clear` method provides additional flexibility relative to
117119
callbacks:
@@ -142,8 +144,8 @@ ELO examples are:
142144
| [ThreadSafeFlag][3m] | Y | N | Y | Self-clearing |
143145
| [Message][7m] | Y | N | Y | Subclass of above |
144146
| [Delay_ms][2m] | Y | Y | Y | Self-setting |
145-
| WaitAll | Y | Y | N | See below |
146-
| WaitAny | Y | Y | N | |
147+
| [WaitAll](./EVENTS.md#42-waitall) | Y | Y | N | See below |
148+
| [WaitAny](./EVENTS.md#41-waitany) | Y | Y | N | |
147149

148150
Drivers exposing `Event` instances include:
149151

0 commit comments

Comments
 (0)