# `CircuitsSim.Device.MCP23008`
[🔗](https://github.com/elixir-circuits/circuits_sim/blob/v0.1.2/lib/circuits_sim/device/mcp23008.ex#L1)

MCP23008 8-bit I/O Expander

This is a simple I2C GPIO Expander that's normally found at I2C addresses between 0x20 and 0x27.

See the [datasheet](https://www.microchip.com/en-us/product/MCP23008) for details.
Many features aren't implemented.

# `t`

```elixir
@type t() :: %CircuitsSim.Device.MCP23008{
  defval: byte(),
  gpinten: byte(),
  gpio: byte(),
  gppu: byte(),
  intcap: byte(),
  intcon: byte(),
  intf: byte(),
  iocon: byte(),
  iodir: byte(),
  ipol: byte(),
  olat: byte()
}
```

# `child_spec`

```elixir
@spec child_spec(keyword()) :: Supervisor.child_spec()
```

# `new`

```elixir
@spec new() :: %CircuitsSim.Device.MCP23008{
  defval: 0,
  gpinten: 0,
  gpio: 0,
  gppu: 0,
  intcap: 0,
  intcon: 0,
  intf: 0,
  iocon: 0,
  iodir: 255,
  ipol: 0,
  olat: 0
}
```

---

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