Module rppal::gpio
[−]
[src]
Interface for the Raspberry Pi's BCM273x GPIO peripheral.
The GPIO peripheral interface accesses the appropriate memory registers
through either the /dev/gpiomem
device, or /dev/mem
for distributions
where the former isn't available.
On a typical up-to-date Raspbian installation, any user that's part of the
gpio
group can access /dev/gpiomem
, while /dev/mem
requires
superuser privileges.
Pins are addressed by their BCM GPIO pin numbers, rather than their physical location.
By default, all pins are reset to their original state when GPIO
goes out
of scope. Use set_clear_on_drop(false)
to disable this behavior. Note that
drop methods aren't called when a program is abnormally terminated (for
instance when a SIGINT isn't caught).
Structs
GPIO |
Provides access to the Raspberry Pi GPIO. |
Enums
Error |
Errors that can occur when accessing the GPIO peripheral. |
Level |
Pin logic levels. |
Mode |
Pin modes. |
PullUpDown |
Built-in pull-up/pull-down resistor states. |
Type Definitions
Result |
Result type returned from methods that can have |