Skip to content

Commit 11cb3ed

Browse files
committed
DRIVERS.md Add note on timing.
1 parent 320ba4b commit 11cb3ed

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

DRIVERS.md

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,13 @@ The module `astests.py` provides examples of usage. In the following text the
3636
term **function** implies a Python `callable`: namely a function, bound method,
3737
coroutine or bound coroutine interchangeably.
3838

39+
### Timing
40+
41+
The `Switch` class relies on millisecond-level timing: callback functions must
42+
be designed to terminate rapidly. This applies to all functions in the
43+
application; coroutines should yield regularly. If these constraints are not
44+
met, switch events can be missed.
45+
3946
## 3.1 Switch class
4047

4148
This assumes a normally open switch connected between a pin and ground. The pin
@@ -100,6 +107,8 @@ implementation.
100107
click or long press events; where the **function** is a coroutine it will be
101108
scheduled for execution and will run asynchronously.
102109

110+
Please see the note on timing in section 3.
111+
103112
Constructor arguments:
104113

105114
1. `pin` Mandatory. The initialised Pin instance.

0 commit comments

Comments
 (0)