summaryrefslogtreecommitdiffstatshomepage
path: root/docs/library/pyb.Switch.rst
diff options
context:
space:
mode:
Diffstat (limited to 'docs/library/pyb.Switch.rst')
-rw-r--r--docs/library/pyb.Switch.rst7
1 files changed, 4 insertions, 3 deletions
diff --git a/docs/library/pyb.Switch.rst b/docs/library/pyb.Switch.rst
index a9aef4e2ec..bc62b6eee9 100644
--- a/docs/library/pyb.Switch.rst
+++ b/docs/library/pyb.Switch.rst
@@ -29,11 +29,12 @@ Constructors
Methods
-------
-.. method:: switch()
+.. method:: Switch.__call__()
- Return the switch state: ``True`` if pressed down, ``False`` otherwise.
+ Call switch object directly to get its state: ``True`` if pressed down,
+ ``False`` otherwise.
-.. method:: switch.callback(fun)
+.. method:: Switch.callback(fun)
Register the given function to be called when the switch is pressed down.
If ``fun`` is ``None``, then it disables the callback.