Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
TASTE
uPython-mirror
Commits
eeb9d993
Commit
eeb9d993
authored
Sep 23, 2016
by
Damien George
Browse files
docs/library/machine: Update description of disable/enable IRQ funcs.
parent
7df9291b
Changes
1
Hide whitespace changes
Inline
Side-by-side
docs/library/machine.rst
View file @
eeb9d993
...
...
@@ -24,17 +24,15 @@ Interrupt related functions
.. function:: disable_irq()
Disable interrupt requests.
Returns the previous IRQ state
: ``False``/``True`` for disabled/enabled IRQs
respectively.
This return value
can
be passed to enable_irq to restore
the IRQ to its original state
.
Returns the previous IRQ state
which should be considered an opaque value.
This return value
should
be passed to
the ``
enable_irq
`` function
to restore
interrupts to their original state, before ``disable_irq`` was called
.
.. function:: enable_irq(state
=True
)
.. function:: enable_irq(state)
Enable interrupt requests.
If ``state`` is ``True`` (the default value) then IRQs are enabled.
If ``state`` is ``False`` then IRQs are disabled. The most common use of
this function is to pass it the value returned by ``disable_irq`` to
exit a critical section.
Re-enable interrupt requests.
The ``state`` parameter should be the value that was returned from the most
recent call to the ``disable_irq`` function.
Power related functions
-----------------------
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new 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