summaryrefslogtreecommitdiff
path: root/examples
diff options
context:
space:
mode:
authorTim Radvan <tim@tjvr.org>2021-04-02 19:35:18 +0100
committerDamien George <damien@micropython.org>2021-04-17 00:45:38 +1000
commitf842a40df4d26bd74b92a3903096fc6b1709222d (patch)
tree5941eceda408a5ba00862e29f49248a80c308fa8 /examples
parente5d2ddde25351f1ede7d0d1b00be632301962fb0 (diff)
rp2/rp2_pio: Add fifo_join support for PIO.
The PIO state machines on the RP2040 have 4 word deep TX and RX FIFOs. If you only need one direction, you can "merge" them into either a single 8 word deep TX or RX FIFO. We simply add constants to the PIO object, and set the appropriate bits in `shiftctrl`. Resolves #6854. Signed-off-by: Tim Radvan <tim@tjvr.org>
Diffstat (limited to 'examples')
-rw-r--r--examples/rp2/pio_uart_rx.py1
1 files changed, 1 insertions, 0 deletions
diff --git a/examples/rp2/pio_uart_rx.py b/examples/rp2/pio_uart_rx.py
index 41dfde3da..080b6bd63 100644
--- a/examples/rp2/pio_uart_rx.py
+++ b/examples/rp2/pio_uart_rx.py
@@ -22,6 +22,7 @@ PIO_RX_PIN = Pin(3, Pin.IN, Pin.PULL_UP)
autopush=True,
push_thresh=8,
in_shiftdir=rp2.PIO.SHIFT_RIGHT,
+ fifo_join=PIO.JOIN_RX,
)
def uart_rx_mini():
# fmt: off