"""FT232H pin names"""
+from adafruit_blinka.microcontroller.ft232h.url import get_ftdi_url
+
class Pin:
"""A basic Pin class for use with FT232H."""
OUT = 1
LOW = 0
HIGH = 1
+ PULL_NONE = 0
+ PULL_UP = 1
+ PULL_DOWN = 2
ft232h_gpio = None
# pylint: enable=import-outside-toplevel
i2c = I2cController()
- i2c.configure("ftdi://ftdi:ft232h/1")
+ i2c.configure(get_ftdi_url())
Pin.ft232h_gpio = i2c.get_gpio()
# check if pin is valid
if pin_id:
raise RuntimeError("Can not init a None type pin.")
# FT232H does't have configurable internal pulls?
if pull:
- raise ValueError("Internal pull up/down not currently supported.")
+ raise NotImplementedError("Internal pull up/down not currently supported.")
pin_mask = Pin.ft232h_gpio.pins | 1 << self.id
current = Pin.ft232h_gpio.direction
if mode == self.OUT: