diff options
author | Damien George <damien.p.george@gmail.com> | 2014-04-21 18:23:50 +0100 |
---|---|---|
committer | Damien George <damien.p.george@gmail.com> | 2014-04-21 18:23:50 +0100 |
commit | 6125ba4a7f9d757abd89f85745f458e52e2ef6fb (patch) | |
tree | ec19b9cef0fc8c4630f54816cc9466cb5c8e4cd6 /py/opmethods.c | |
parent | af797f476fe03b7c1f6c645f0e43df5ca3254bc3 (diff) | |
download | micropython-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