Update pio_spi.py

Missing import, see comments in raspberrypi/pico-micropython-examples#14
This commit is contained in:
Alasdair Allan 2021-02-04 11:13:40 +00:00 committed by GitHub
parent 16c0439da6
commit c873588693
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 1 deletions

View File

@ -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
return rdata