diff options
author | Damien George <damien.p.george@gmail.com> | 2016-09-09 19:33:50 +1000 |
---|---|---|
committer | Damien George <damien.p.george@gmail.com> | 2016-09-09 19:36:09 +1000 |
commit | 2f02960607b75e74a757ded1e2472a5fb8585d4f (patch) | |
tree | 7d090d8f8b7f6cf7a0444a83534e280dbceb9684 /tests | |
parent | 1ba516f4758508f2657d1c68d31055c3c8e21b28 (diff) | |
download | micropython-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.py | 9 |
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() |