8000 docs/library/machine: Update description of disable/enable IRQ funcs. · sparkfun/circuitpython@eeb9d99 · GitHub
[go: up one dir, main page]

Skip to content

Commit eeb9d99

Browse files
committed
docs/library/machine: Update description of disable/enable IRQ funcs.
1 parent 7df9291 commit eeb9d99

File tree

1 file changed

+7
-9
lines changed

1 file changed

+7
-9
lines changed

docs/library/machine.rst

Lines changed: 7 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -24,17 +24,15 @@ Interrupt related functions
2424
.. function:: disable_irq()
2525

2626
Disable interrupt requests.
27-
Returns the previous IRQ state: ``False``/``True`` for disabled/enabled IRQs
28-
respectively. This return value can be passed to enable_irq to restore
29-
the IRQ to its original state.
27+
Returns the previous IRQ state which should be considered an opaque value.
28+
This return value should be passed to the ``enable_irq`` function to restore
29+
interrupts to their original state, before ``disable_irq`` was called.
3030

31-
.. function:: enable_irq(state=True)
31+
.. function:: enable_irq(state)
3232

33-
Enable interrupt requests.
34-
If ``state`` is ``True`` (the default value) then IRQs are enabled.
35-
If ``state`` is ``False`` then IRQs are disabled. The most common use of
36-
this function is to pass it the value returned by ``disable_irq`` to
37-
exit a critical section.
33+
Re-enable interrupt requests.
34+
The ``state`` parameter should be the value that was returned from the most
35+
recent call to the ``disable_irq`` function.
3836

3937
Power related functions
4038
-----------------------

0 commit comments

Comments
 (0)
0