summaryrefslogtreecommitdiffstatshomepage
path: root/py/opmethods.c
diff options
context:
space:
mode:
authorDamien George <damien.p.george@gmail.com>2014-04-21 18:23:50 +0100
committerDamien George <damien.p.george@gmail.com>2014-04-21 18:23:50 +0100
commit6125ba4a7f9d757abd89f85745f458e52e2ef6fb (patch)
treeec19b9cef0fc8c4630f54816cc9466cb5c8e4cd6 /py/opmethods.c
parentaf797f476fe03b7c1f6c645f0e43df5ca3254bc3 (diff)
downloadmicropython-6125ba4a7f9d757abd89f85745f458e52e2ef6fb.tar.gz
micropython-6125ba4a7f9d757abd89f85745f458e52e2ef6fb.zip
stmhal: Make switch a class, to follow suit of all other modules.
Instead of pyb.switch() as a function, it's more consistent (with respect to all the other modules and peripherals) to have pyb.Switch() create a switch object. This then generalises to having multiple switches. Call the object to get its state. Use sw.callback to set the callback function for when the switch is pressed.
Diffstat (limited to 'py/opmethods.c')
0 files changed, 0 insertions, 0 deletions