BodgeUSB.DeviceRef (BodgeUSB v0.1.1)

Copy Markdown View Source

A discovered usbfs device node and its parsed descriptors, as returned by BodgeUSB.list_devices/0. Pass it to BodgeUSB.open/1.

Devices that could not be opened or parsed carry the error in :descriptor rather than breaking enumeration.

Summary

Types

t()

@type t() :: %BodgeUSB.DeviceRef{
  address: pos_integer() | nil,
  bus: pos_integer() | nil,
  descriptor: {:ok, BodgeUSB.Descriptor.Device.t()} | {:error, term()},
  path: String.t()
}