There should be no change to these tests for existing PYBV1x and PYBD_SFx boards. Signed-off-by: Damien George <damien@micropython.org>
19 lines
374 B
Python
19 lines
374 B
Python
import pyb
|
|
|
|
# test basic functionality
|
|
pin = pyb.Pin.cpu.A4
|
|
ext = pyb.ExtInt(pin, 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()
|