examples/rp2/pio_uart_rx.py: Fix use of PIO constants.

Running the unmodified `pio_uart_rx.py` example by uploading the file and
importing it doesn't succeed, and instead emits a NameError at line 26.

Signed-off-by: Anson Mansfield <amansfield@mantaro.com>
This commit is contained in:
Anson Mansfield
2025-07-14 12:45:42 -04:00
committed by Damien George
parent 0b698b8241
commit 554f114f18

View File

@@ -23,7 +23,7 @@ PIO_RX_PIN = Pin(3, Pin.IN, Pin.PULL_UP)
@asm_pio(
autopush=True,
push_thresh=8,
in_shiftdir=rp2.PIO.SHIFT_RIGHT,
in_shiftdir=PIO.SHIFT_RIGHT,
fifo_join=PIO.JOIN_RX,
)
def uart_rx_mini():
@@ -42,7 +42,7 @@ def uart_rx_mini():
@asm_pio(
in_shiftdir=rp2.PIO.SHIFT_RIGHT,
in_shiftdir=PIO.SHIFT_RIGHT,
)
def uart_rx():
# fmt: off