File tree Expand file tree Collapse file tree 1 file changed +9
-0
lines changed Expand file tree Collapse file tree 1 file changed +9
-0
lines changed Original file line number Diff line number Diff line change @@ -36,6 +36,13 @@ The module `astests.py` provides examples of usage. In the following text the
36
36
term ** function** implies a Python ` callable ` : namely a function, bound method,
37
37
coroutine or bound coroutine interchangeably.
38
38
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
+
39
46
## 3.1 Switch class
40
47
41
48
This assumes a normally open switch connected between a pin and ground. The pin
@@ -100,6 +107,8 @@ implementation.
100
107
click or long press events; where the ** function** is a coroutine it will be
101
108
scheduled for execution and will run asynchronously.
102
109
110
+ Please see the note on timing in section 3.
111
+
103
112
Constructor arguments:
104
113
105
114
1 . ` pin ` Mandatory. The initialised Pin instance.
You can’t perform that action at this time.
0 commit comments