Packages
circuits_gpio
2.0.0-pre.1
2.3.0
2.2.0
2.1.3
2.1.2
retired
2.1.1
retired
2.1.0
retired
2.0.2
retired
2.0.1
retired
2.0.0
retired
2.0.0-pre.6
retired
2.0.0-pre.5
retired
2.0.0-pre.4
retired
2.0.0-pre.3
retired
2.0.0-pre.2
retired
2.0.0-pre.1
retired
2.0.0-pre.0
retired
1.2.2
1.2.1
1.2.0
1.1.0
1.0.1
1.0.0
0.4.8
0.4.7
0.4.6
0.4.5
0.4.4
0.4.3
0.4.2
0.4.1
0.4.0
0.3.1
0.3.0
0.2.0
0.1.0
Use GPIOs in Elixir
Retired package: Release invalid - Use v2.0.0 or later
Current section
Files
Jump to
Current section
Files
lib/gpio/line.ex
# SPDX-FileCopyrightText: 2023 Frank Hunleth
#
# SPDX-License-Identifier: Apache-2.0
defmodule Circuits.GPIO.Line do
@moduledoc """
Information about a GPIO line returned from `GPIO.enumerate/0`
"""
alias Circuits.GPIO
defstruct [:gpio_spec, :label, :controller]
@typedoc """
Line information
* `:gpio_spec` - the gpio spec to pass to `GPIO.open/3` to use the GPIO
* `:controller` - the GPIO controller name or an empty string if unnamed
* `:label` - a controller label, line label tuple. Could have empty strings if no labels
"""
@type t() :: %__MODULE__{
gpio_spec: GPIO.gpio_spec(),
controller: GPIO.controller(),
label: {GPIO.label(), GPIO.label()}
}
end