# `Circuits.I2C.Backend`
[🔗](https://github.com/elixir-circuits/circuits_i2c/blob/v2.1.0/lib/i2c/backend.ex#L5)

Backends provide the connection to the real or virtual I2C controller

# `transfer_options`

```elixir
@type transfer_options() :: keyword()
```

I2C transfer options

Support for options is backend-specific. Backends are encouraged to
implement the following:

* `:retries` - the number of retries for this transaction

# `bus_names`

```elixir
@callback bus_names(options :: keyword()) :: [binary()]
```

Return the I2C bus names on this system

See backend documentation for options.

# `info`

```elixir
@callback info() :: map()
```

Return information about this backend

# `open`

```elixir
@callback open(bus_name :: String.t(), options :: keyword()) ::
  {:ok, Circuits.I2C.Bus.t()} | {:error, term()}
```

Open an I2C bus

Bus names are typically of the form `"i2c-n"` and available buses may be
found by calling `bus_names/1`.

See `t:Circuits.I2C.open_options/0` for guidance on options.

---

*Consult [api-reference.md](api-reference.md) for complete listing*
