# `Kuroneko.Gadget.ACM`
[🔗](https://github.com/cocoa-xu/kuroneko_gadget/blob/v0.5.0/lib/kuroneko/gadget/acm.ex#L1)

The kernel's CDC ACM function: a serial port between the device and the
target computer.

    Kuroneko.Gadget.configure([:keyboard, :mouse, Kuroneko.Gadget.ACM])
    Kuroneko.Gadget.ACM.tty()
    #=> {:ok, "/dev/ttyGS0"}

The target sees a modem: `/dev/ttyACM0` on Linux, `/dev/cu.usbmodem...` on
macOS, a COM port on Windows. Each port takes two IN endpoints and one
OUT; more than one need names, such as `{Kuroneko.Gadget.ACM, name:
"console"}`. It takes no options.

Read the device's end with a port program such as `Circuits.UART`: a
`File` read blocks one of the VM's dirty I/O schedulers until data comes,
and nothing can call it off.

# `tty`

```elixir
@spec tty(keyword()) :: {:ok, Path.t()} | {:error, Kuroneko.Gadget.configfs_error()}
```

The device's end of a port, such as `"/dev/ttyGS0"`: the one `:name`
names, `"serial"` by default. Takes the `:gadget` option.

---

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