From c87358869359bf0647e32d5a2f551ab32ca68e97 Mon Sep 17 00:00:00 2001 From: Alasdair Allan Date: Thu, 4 Feb 2021 11:13:40 +0000 Subject: [PATCH] Update pio_spi.py Missing import, see comments in raspberrypi/pico-micropython-examples#14 --- pio/pio_spi.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/pio/pio_spi.py b/pio/pio_spi.py index eb5490a..3964061 100644 --- a/pio/pio_spi.py +++ b/pio/pio_spi.py @@ -1,3 +1,4 @@ +from rp2 import PIO, asm_pio from machine import Pin @rp2.asm_pio(out_shiftdir=0, autopull=True, pull_thresh=8, autopush=True, push_thresh=8, sideset_init=(rp2.PIO.OUT_LOW, rp2.PIO.OUT_HIGH), out_init=rp2.PIO.OUT_LOW) @@ -45,4 +46,4 @@ class PIOSPI: for b in wdata: self._sm.put(b << 24) rdata.append(self._sm.get() & 0xff) - return rdata \ No newline at end of file + return rdata