circuitpython/tests/pyb/extint.py
2014-05-04 12:40:51 +01:00

9 lines
176 B
Python

import pyb
ext = pyb.ExtInt('X1', pyb.ExtInt.IRQ_RISING, pyb.Pin.PULL_DOWN, lambda l:print('line:', l))
ext.disable()
ext.enable()
print(ext.line())
ext.swint()
ext.disable()