@@ -12,17 +12,17 @@ This document assumes familiarity with `uasyncio`. See [official docs](http://do
12
12
1 . [ An alternative to callbacks in uasyncio code] ( ./EVENTS.md#1-an-alternative-to-callbacks-in-uasyncio-code )
13
13
2 . [ Rationale] ( ./EVENTS.md#2-rationale )
14
14
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
18
18
4.3 [ Nesting] ( ./EVENTS.md#43-nesting )
19
19
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
21
21
5.2 [ Long and very long button press] ( ./EVENTS.md#52-long-and-very-long-button-press )
22
22
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
26
26
  ;  ;  ;  ;  ; 6.2.1 [ The suppress constructor argument] ( ./EVENTS.md#621-the-suppress-constructor-argument )
27
27
  ;  ;  ;  ;  ; 6.2.2 [ The sense constructor argument] ( ./EVENTS.md#622-the-sense-constructor-argument )
28
28
[ 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
68
68
need for callbacks is much reduced.
69
69
70
70
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.
73
74
74
75
###### [ Contents] ( ./EVENTS.md#0-contents )
75
76
@@ -110,8 +111,9 @@ because:
110
111
where they are small and spend most of the time paused waiting on queues.
111
112
112
113
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.
115
117
116
118
The ` Event ` class ` .clear ` method provides additional flexibility relative to
117
119
callbacks:
@@ -142,8 +144,8 @@ ELO examples are:
142
144
| [ ThreadSafeFlag] [ 3m ] | Y | N | Y | Self-clearing |
143
145
| [ Message] [ 7m ] | Y | N | Y | Subclass of above |
144
146
| [ 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 | |
147
149
148
150
Drivers exposing ` Event ` instances include:
149
151
0 commit comments