breadboard v0.0.5 Breadboard.GPIO.StubHalGPIO View Source
Manage the pinout of gpio in "stub" hardware abstraction layer for platforms without GPIO support.
Handle the GPIOs as defined in Circuits.GPIO
.
There are 64 GPIOs where:
- pin 0 is GPIO0, pin 1 is GPIO1, pin 2 is GPIO2 ...
- sysfs pin number is mapped to the same pin number
and the complete pinout map is in the form:
%{
{:pin, 0} => [pin: 0, sysfs: 0, pin_key: :pin0, pin_label: :gpio0, pin_name: "GPIO0"],
{:sysfs, 0} => [pin: 0, sysfs: 0, pin_key: :pin0, pin_label: :gpio0, pin_name: "GPIO0"],
{:pin_key, :pin0} => [pin: 0, sysfs: 0, pin_key: :pin0, pin_label: :gpio0, pin_name: "GPIO0"],
{:pin_label, :gpio0} => [pin: 0, sysfs: 0, pin_key: :pin0, pin_label: :gpio0, pin_name: "GPIO0"],
{:pin_name, "GPIO0"} => [pin: 0, sysfs: 0, pin_key: :pin0, pin_label: :gpio0, pin_name: "GPIO0"],
...
{:pin, 31} => [pin: 31, sysfs: 31, pin_key: :pin31, pin_label: :gpio31, pin_name: "GPIO31"],
{...} => ...
...
{:pin, 63} => [pin: 63, sysfs: 63, pin_key: :pin63, pin_label: :gpio63, pin_name: "GPIO63"],
{...} => ...
}
Link to this section Summary
Functions
Get real pin reference from 'pinout label'.
Get pinout label from the pinout number.
Return the complete pinout map for a specific platform
Link to this section Functions
Get real pin reference from 'pinout label'.
Returns the real pin number (default for sysfs
user space)
Get pinout label from the pinout number.
Returns the pin label as atom.
Return the complete pinout map for a specific platform
Callback implementation for Breadboard.GPIO.BaseGPIO.pinout_map/0
.