]> Repositories - Adafruit_Blinka-hackapet.git/blobdiff - src/adafruit_blinka/microcontroller/ft232h/pin.py
Remove SpiDev from requirements
[Adafruit_Blinka-hackapet.git] / src / adafruit_blinka / microcontroller / ft232h / pin.py
index d9763d225a25e11bc004d83fbd8255142e7b3dbe..c768ffdc98c6aa353dbfd48b208f80713a9f3a41 100644 (file)
@@ -14,7 +14,7 @@ class Pin:
         if not Pin.ft232h_gpio:
             from pyftdi.i2c import I2cController
             i2c = I2cController()
         if not Pin.ft232h_gpio:
             from pyftdi.i2c import I2cController
             i2c = I2cController()
-            i2c.configure("ftdi:///1")
+            i2c.configure("ftdi://ftdi:ft232h/1")
             Pin.ft232h_gpio = i2c.get_gpio()
         # check if pin is valid
         if pin_id:
             Pin.ft232h_gpio = i2c.get_gpio()
         # check if pin is valid
         if pin_id:
@@ -50,6 +50,7 @@ class Pin:
                 current |= 1 << self.id
             else:
                 current &= ~(1 << self.id)
                 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:
             Pin.ft232h_gpio.write(current & Pin.ft232h_gpio.direction)
         # release the kraken
         else:
@@ -76,4 +77,4 @@ SCL = Pin()
 SDA = Pin()
 SCK = SCLK = Pin()
 MOSI = Pin()
 SDA = Pin()
 SCK = SCLK = Pin()
 MOSI = Pin()
-MISO = Pin()
\ No newline at end of file
+MISO = Pin()