summaryrefslogtreecommitdiffstatshomepage
path: root/tests
diff options
context:
space:
mode:
authorDamien George <damien.p.george@gmail.com>2016-09-09 19:33:50 +1000
committerDamien George <damien.p.george@gmail.com>2016-09-09 19:36:09 +1000
commit2f02960607b75e74a757ded1e2472a5fb8585d4f (patch)
tree7d090d8f8b7f6cf7a0444a83534e280dbceb9684 /tests
parent1ba516f4758508f2657d1c68d31055c3c8e21b28 (diff)
downloadmicropython-2f02960607b75e74a757ded1e2472a5fb8585d4f.tar.gz
micropython-2f02960607b75e74a757ded1e2472a5fb8585d4f.zip
tests/pyb: Add test for ExtInt when doing swint while disabled.
Diffstat (limited to 'tests')
-rw-r--r--tests/pyb/extint.py9
1 files changed, 9 insertions, 0 deletions
diff --git a/tests/pyb/extint.py b/tests/pyb/extint.py
index 47d84c8b5e..a8ba484b1c 100644
--- a/tests/pyb/extint.py
+++ b/tests/pyb/extint.py
@@ -1,8 +1,17 @@
import pyb
+# test basic functionality
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()
+
+# 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()