mirror of
https://github.com/micropython/micropython.git
synced 2025-07-20 20:41:10 +02:00
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:
committed by
Damien George
parent
0b698b8241
commit
554f114f18
@@ -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
|
||||
|
Reference in New Issue
Block a user