Circuits.GPIO.Chip.set_values
You're seeing just the function
set_values
, go back to Circuits.GPIO.Chip module for more information.
Specs
set_values(Circuits.GPIO.Chip.LineHandle.t(), [offset_value()]) :: :ok | {:error, atom()}
Set values of the GPIOs
{:ok, line_handle} = Circuits.GPIO.Chip.request_lines(my_gpio_chip, [17, 24, 22])
{:ok, [0, 0, 0]} = Circuits.GPIO.Chip.read_value(line_handle)
:ok = Circuits.GPIO.Chip.set_value(line_handle, [1, 0, 1])
{:ok, [1, 0, 1]} = Circuits.GPIO.Chip.read_value(line_handle)
Note that the order of the values that were sent matches the order by which the GPIO offsets where requested. In the example above offset 17 was set to 1, offset 24 was stayed at 0, offset 22 was set to 1.