d3bb3e38df
A few tests still fail on PYBLITE, and that's due to differences in the available peripheral block numbers on the different MCUs (eg I2C(2) exists on one, but it's I2C(3) on the other).
18 lines
353 B
Python
18 lines
353 B
Python
import pyb
|
|
|
|
# test basic functionality
|
|
ext = pyb.ExtInt('Y1', pyb.ExtInt.IRQ_RISING, pyb.Pin.PULL_DOWN, lambda l:print('line:', l))
|
|
ext.disable()
|
|
ext.enable()
|
|
print(ext.line())
|
|
ext.swint()
|
|
|
|
# test swint while disabled, then again after re-enabled
|
|
ext.disable()
|
|
ext.swint()
|
|
ext.enable()
|
|
ext.swint()
|
|
|
|
# disable now that the test is finished
|
|
ext.disable()
|