CircuitsFT232H (circuits_ft232h v0.1.0)
Copy MarkdownUse an Adafruit FT232H breakout as an
I2C master, SPI master, or GPIO controller from your host machine, via the
circuits_i2c,
circuits_spi, and
circuits_gpio APIs.
Plug the FT232H into a USB port, point one or more of the Circuits libraries at the backends supplied by this package, and your existing drivers run unchanged against real hardware on your laptop.
# config/config.exs
import Config
config :circuits_i2c, default_backend: CircuitsFT232H.I2C.Backend
config :circuits_spi, default_backend: CircuitsFT232H.SPI.Backend
config :circuits_gpio, default_backend: CircuitsFT232H.GPIO.BackendA single chip can act as either an I2C or an SPI master at any one time
(first-open wins), and as a GPIO controller alongside whichever protocol is
active — the CircuitsFT232H.Device GenServer enforces this and rejects
open requests that would conflict.
See the README for wiring diagrams, Linux/macOS setup, and per-backend caveats.