diff --git a/pio/pio_spi.py b/pio/pio_spi.py index 30f02c3..cfdc697 100644 --- a/pio/pio_spi.py +++ b/pio/pio_spi.py @@ -27,7 +27,7 @@ class PIOSPI: def __init__(self, sm_id, pin_mosi, pin_miso, pin_sck, cpha=False, cpol=False, freq=1000000): assert(not(cpol or cpha)) - self._sm = rp2.StateMachine(sm_id, spi_cpha0, freq=4*freq, sideset_base=Pin(pin_sck), out_base=Pin(pin_mosi), in_base=Pin(pin_sck)) + self._sm = rp2.StateMachine(sm_id, spi_cpha0, freq=4*freq, sideset_base=Pin(pin_sck), out_base=Pin(pin_mosi), in_base=Pin(pin_miso)) self._sm.active(1) # Note this code will die spectacularly cause we're not draining the RX FIFO