Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
TASTE
uPython-mirror
Commits
fa1a9bc9
Commit
fa1a9bc9
authored
Aug 25, 2014
by
Damien George
Browse files
tests: Add test for pyb.disable_irq and pyb.enable_irq.
parent
34e43c7e
Changes
2
Hide whitespace changes
Inline
Side-by-side
tests/pyb/irq.py
0 → 100644
View file @
fa1a9bc9
import
pyb
def
test_irq
():
# test basic disable/enable
i1
=
pyb
.
disable_irq
()
print
(
i1
)
pyb
.
enable_irq
()
# by default should enable IRQ
# check that interrupts are enabled by waiting for ticks
pyb
.
delay
(
10
)
# check nested disable/enable
i1
=
pyb
.
disable_irq
()
i2
=
pyb
.
disable_irq
()
print
(
i1
,
i2
)
pyb
.
enable_irq
(
i2
)
pyb
.
enable_irq
(
i1
)
# check that interrupts are enabled by waiting for ticks
pyb
.
delay
(
10
)
test_irq
()
tests/pyb/irq.py.exp
0 → 100644
View file @
fa1a9bc9
True
True False
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment