Registry / other / sysfs-gpio

sysfs-gpio

JSON →
library0.6.2rscratesunverified

Provides access to GPIO pins using the Linux sysfs interface.

# Cargo.toml [dependencies] sysfs_gpio = "0.6.2"
INSTALL
IMPORT
SIG · SYSFS-GPIO
S
sysfs-gpio
otherrustv0.6.2
harness data pending
Install & Compatibility
Where this runs

No compatibility data collected yet for this library.

Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

Pin
use sysfs_gpio::Pin;

Exports GPIO pin 17, sets it as output, and writes a high value.

use sysfs_gpio::Pin; fn main() { let pin = Pin::new(17); pin.export().unwrap(); pin.set_direction(sysfs_gpio::Direction::Out).unwrap(); pin.set_value(1).unwrap(); println!("GPIO 17 set high"); }
Debug
Known issues
gotchaRequires Linux sysfs GPIO support; may be deprecated in newer kernels.
fix
Consider using the gpiochip character device interface instead.
affects: >=0.6.0
Upgrade
Version history
0.6.2latest on crates.io
Audit
Dependencies

No dependency data recorded yet.

Agent activity
9 hits · last 30 days
node
8
Resources
sysfs-gpio — cargo add sysfs-gpio · libregistry