CircuitsFT232H. GPIO. Backend
(circuits_ft232h v0.1.0)
Copy Markdown
Circuits.GPIO.Backend implementation for the FT232H.
Configure with:
config :circuits_gpio, default_backend: CircuitsFT232H.GPIO.BackendEach connected FT232H is a GPIO controller named "ftdi-<id>", exposing
the 16 pins AD0..AD7 and AC0..AC7. The pins are addressable as
integers 0..15 or by their AD?/AC? labels — see
CircuitsFT232H.GPIO for the full mapping.
GPIO operations coexist with CircuitsFT232H.SPI.Backend and
CircuitsFT232H.I2C.Backend on the same chip — pins reserved by an
active protocol fail with {:error, {:pin_reserved_by_protocol, mode, pin}}
if you try to open them as GPIO.
Interrupts are emulated by polling
Circuits.GPIO.set_interrupts/3 is supported via a per-chip polling
GenServer (CircuitsFT232H.GPIO.Poller) that samples pin state at a
fixed interval — the FT232H has no hardware pin-change notifications,
so pulses shorter than the poll interval will be missed. Default
interval is 10 ms; configure via:
config :circuits_ft232h, gpio_poll_interval_ms: 5See CircuitsFT232H.GPIO.Poller for the full caveats.