Circuits.I2C.discover_one
You're seeing just the function
discover_one
, go back to Circuits.I2C module for more information.
Specs
discover_one([address()], present?()) :: {:ok, {binary(), address()}} | {:error, :not_found | :multiple_possible_matches}
Scans all I2C buses for one specific device
This function and discover_one!/2
are convenience functions for the use
case of helping a user find a specific device. They both call discover/2
with
a list of possible I2C addresses and an optional function for checking whether
the device is present.
This function returns an :ok
or :error
tuple depending on whether one and
only one device was found. See discover_one!/2
for the raising version.