circuitpython/ports
Phil Howard ad3552ae2c rp2/rp2_pio: Make PIO IRQ handlers have lazy initialisation.
This change has no impact on vanilla MicroPython builds, but is intended to
avoid RP2's PIO implementation from trampling PIO usage in USER_C_MODULES.

This is consistent with PIOs tracking of used state machines and managed
programs, and makes working with PIO in USER_C_MODULES much less of an
uphill battle.

Since PIO deinit runs before gc_sweep_all it's impossible to work around
this wrinkle otherwise.  A module finalizer does not get the opportunity to
put the PIOs back into a state which wont crash rp2_pio_deinit.

Changes are:
- init: Avoid exclusive handlers being added to all PIOs and add them only
  when needed.
- deinit: Only remove handlers we have set.
- rp2_pio_irq: Add the exlusive handler if needed.
- rp2_state_machine_irq: Add the exclusive handler if needed.

Signed-off-by: Phil Howard <phil@gadgetoid.com>
2024-08-02 16:27:42 +10:00
..
bare-arm shared/libc/string0: Don't deref args for n==0 case. 2023-11-07 16:01:50 +11:00
cc3200 all: Use new mp_obj_new_str_from_cstr() function. 2024-07-04 15:55:03 +10:00
embed all: Prune trailing whitespace. 2024-03-07 16:25:17 +11:00
esp32 esp32/machine_i2s: Ensure 2 DMA buffers and improve I2S error handling. 2024-08-02 10:30:14 +10:00
esp8266 esp32,esp8266: Use new mp_obj_new_str_from_cstr() function. 2024-07-05 11:27:25 +10:00
mimxrt shared/tinyusb: Buffer startup CDC data to send to host on connection. 2024-06-04 17:49:19 +10:00
minimal minimal: Use printf instead of echo -e. 2024-02-15 16:36:22 +11:00
nrf nrf/Makefile: Fix GCC_VERSION check. 2024-07-31 12:44:16 +10:00
pic16bit all: Remove the "STATIC" macro and just use "static" instead. 2024-03-07 14:20:42 +11:00
powerpc py/mpconfig: Disable qstr hashing at minimum feature level. 2024-01-25 16:38:17 +11:00
qemu-arm shared/runtime/pyexec: Make a raised SystemExit always do a forced exit. 2024-07-20 12:13:14 +10:00
qemu-riscv qemu-riscv: Enable native code generation by default. 2024-06-21 15:07:03 +10:00
renesas-ra extmod/modos: Include os.sep entry if MICROPY_VFS is enabled. 2024-07-20 12:32:31 +10:00
rp2 rp2/rp2_pio: Make PIO IRQ handlers have lazy initialisation. 2024-08-02 16:27:42 +10:00
samd samd/mphalport: Refactor to use shared TinyUSB CDC functions. 2024-05-31 19:47:55 +10:00
stm32 stm32/boards: Swap FMC banks on ARDUINO_GIGA and ARDUINO_PORTENTA_H7. 2024-07-31 16:47:32 +10:00
unix unix/main: Fix GCC builds for RISC-V 64 bits. 2024-07-23 15:51:50 +10:00
webassembly webassembly: Reuse PyProxy objects when they are the same Python object. 2024-07-19 11:55:24 +10:00
windows github/workflows: Improve MSYS2-based CI builds. 2024-07-25 16:22:21 +10:00
zephyr all: Use new mp_obj_new_str_from_cstr() function. 2024-07-04 15:55:03 +10:00