current |= 1 << self.id
else:
current &= ~(1 << self.id)
+ # must mask out any input pins
Pin.ft232h_gpio.write(current & Pin.ft232h_gpio.direction)
# release the kraken
else:
SDA = Pin()
SCK = SCLK = Pin()
MOSI = Pin()
-MISO = Pin()
\ No newline at end of file
+MISO = Pin()
bits = 8
def __init__(self):
+ # change GPIO controller to SPI
from pyftdi.spi import SpiController
self._spi = SpiController(cs_count=1)
self._spi.configure('ftdi:///1')
result = port.exchange(buffer_out[out_start:out_end],
in_end-in_start)
for i, b in enumerate(result):
- buffer_in[in_start+i] = b
\ No newline at end of file
+ buffer_in[in_start+i] = b