Skip to content

Commit 554f114

Browse files
AJMansfielddpgeorge
authored andcommitted
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 <[email protected]>
1 parent 0b698b8 commit 554f114

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

examples/rp2/pio_uart_rx.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@
2323
@asm_pio(
2424
autopush=True,
2525
push_thresh=8,
26-
in_shiftdir=rp2.PIO.SHIFT_RIGHT,
26+
in_shiftdir=PIO.SHIFT_RIGHT,
2727
fifo_join=PIO.JOIN_RX,
2828
)
2929
def uart_rx_mini():
@@ -42,7 +42,7 @@ def uart_rx_mini():
4242

4343

4444
@asm_pio(
45-
in_shiftdir=rp2.PIO.SHIFT_RIGHT,
45+
in_shiftdir=PIO.SHIFT_RIGHT,
4646
)
4747
def uart_rx():
4848
# fmt: off

0 commit comments

Comments
 (0)