We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 34e43c7 commit fa1a9bcCopy full SHA for fa1a9bc
tests/pyb/irq.py
@@ -0,0 +1,22 @@
1
+import pyb
2
+
3
+def test_irq():
4
+ # test basic disable/enable
5
+ i1 = pyb.disable_irq()
6
+ print(i1)
7
+ pyb.enable_irq() # by default should enable IRQ
8
9
+ # check that interrupts are enabled by waiting for ticks
10
+ pyb.delay(10)
11
12
+ # check nested disable/enable
13
14
+ i2 = pyb.disable_irq()
15
+ print(i1, i2)
16
+ pyb.enable_irq(i2)
17
+ pyb.enable_irq(i1)
18
19
20
21
22
+test_irq()
tests/pyb/irq.py.exp
@@ -0,0 +1,2 @@
+True
+True False
0 commit comments