# `EtherCAT.Slave.Sync.Config`
[🔗](https://github.com/sid2baker/ethercat/blob/main/lib/ethercat/slave/sync/config.ex#L1)

Declarative per-slave sync and latch configuration.

This models user-facing sync intent. Master-wide Distributed Clocks still live
under `EtherCAT.DC.Config`; this struct only describes how one slave should
use SYNC0/SYNC1 and which latch edges should be surfaced by name.

# `latch_ref`

```elixir
@type latch_ref() :: {0 | 1, :pos | :neg}
```

# `mode`

```elixir
@type mode() :: :free_run | :sync0 | :sync1 | nil
```

# `sync0`

```elixir
@type sync0() :: %{pulse_ns: pos_integer(), shift_ns: integer()}
```

# `sync1`

```elixir
@type sync1() :: %{offset_ns: non_neg_integer()}
```

# `t`

```elixir
@type t() :: %EtherCAT.Slave.Sync.Config{
  latches: %{optional(atom()) =&gt; latch_ref()},
  mode: mode(),
  sync0: sync0() | nil,
  sync1: sync1() | nil
}
```

---

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