Skip to content

Commit 9bcbd1c

Browse files
committed
docs/rp2: Document the new rp2 Timer hard= option.
Signed-off-by: Chris Webb <chris@arachsys.com>
1 parent f0d23fa commit 9bcbd1c

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

docs/rp2/quickref.rst

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -135,6 +135,11 @@ Use the :mod:`machine.Timer` class::
135135
tim = Timer(period=5000, mode=Timer.ONE_SHOT, callback=lambda t:print(1))
136136
tim.init(period=2000, mode=Timer.PERIODIC, callback=lambda t:print(2))
137137

138+
By default, timer callbacks run as soft IRQs so they can allocate but
139+
are prone to GC jitter and delays. Pass ``hard=True`` to the ``Timer()``
140+
constructor or ``init()`` method to run the callback in hard-IRQ context
141+
instead.
142+
138143

139144
.. _rp2_Pins_and_GPIO:
140145

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy