Files
micropython/ports/rp2/rp2_pio.c
Anson Mansfield 2db2f536ac rp2/rp2_pio: Fix support for pin wrapping and RP2350B upper-bank pins.
On RP2350B where there are more than 32 pins, using
`pio_sm_set_pins_with_mask()` and `pio_sm_set_pindirs_with_mask()` is not
correct because their arguments are `uint32_t` and higher bits get lost
when `pio.gpio_base(16)` is used.

This commit fixes the issue by using the 64-bit API functions on RP2350B.
It also makes sure pin wrapping is supported, i.e. using [30, 31, 0, 1] or
[46, 47, 16, 17] as contiguous pin ranges for a PIO program.

Fixes issue #16199.

Signed-off-by: Anson Mansfield <amansfield@mantaro.com>
2025-12-02 00:09:06 +11:00

40 KiB