breadboard v0.0.5 Breadboard.GPIO.SunxiGPIO View Source

Manage the pinout of GPIOs in sunxi hardware layer for platforms ARM SoCs family from Allwinner Technology.

For this platform there isn't a simple mapping (ono to one) as explained in the linux-sunxi community, for example the pin number 3 (PA12) is classified as:

[pin: 3, sysfs: 12, pin_key: :pin3, pin_label: :pa12, pin_name: "PA12"]

so the complete pinout map is in the form:

%{
  {:pin, 3}           => [pin: 3, sysfs: 12, pin_key: :pin3, pin_label: :pa12, pin_name: "PA12"],
  {:sysfs, 3}         => [pin: 3, sysfs: 12, pin_key: :pin3, pin_label: :pa12, pin_name: "PA12"],
  {:pin_key, :pin3}   => [pin: 3, sysfs: 12, pin_key: :pin3, pin_label: :pa12, pin_name: "PA12"],
  {:pin_label, :pa12} => [pin: 3, sysfs: 12, pin_key: :pin3, pin_label: :pa12, pin_name: "PA12"],
  {:pin_name, "PA12"} => [pin: 3, sysfs: 12, pin_key: :pin3, pin_label: :pa12, pin_name: "PA12"],
  ...
  {:pin, 32}          => [pin: 32, sysfs: 200, pin_key: :pin32, pin_label: :pg8, pin_name: "PG8"],
  {...}               => ...
  ...
  {:pin, 40}          => [pin: 40, sysfs: 199, pin_key: :pin40, pin_label: :pg7, pin_name: "PG7"],
  {...}               => ...
}

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

Link to this function

label_to_pin(label, mode \\ :sysfs)

View Source

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.