summaryrefslogtreecommitdiff
path: root/tests/extmod/machine_timer.py
diff options
context:
space:
mode:
authorChris Webb <chris@arachsys.com>2025-08-25 14:32:33 +0100
committerDamien George <damien.p.george@gmail.com>2025-09-25 23:59:24 +1000
commit64fd2f5f360bfae4a231fc3db053139a4621e878 (patch)
tree5646f6091038d1e3d033d2991fa5a4cc3ba62a1c /tests/extmod/machine_timer.py
parente7aa2a523c518fc17b6e73a06c2ef15e1b4cb9c8 (diff)
esp32/machine_timer: Warn that hard timers are not implemented.
machine.Timer() has inconsistent behaviour between ports: some run callbacks in hard IRQ context whereas others schedule them like soft IRQs. Most ports now support a hard= argument to the machine.Timer constructor or initialiser to explicitly choose between these behaviours. However, esp32 does not support hardware interrupts because they are not delivered to the main thread, so the interrupt handler would need to acquire the GIL. Raise a ValueError if hard=True is requested for esp32 machine.Timer. Signed-off-by: Chris Webb <chris@arachsys.com>
Diffstat (limited to 'tests/extmod/machine_timer.py')
0 files changed, 0 insertions, 0 deletions