Registry / networking / gpio-cdev

gpio-cdev

JSON →
library0.6.0rscratesunverified

Linux GPIO Character Device Support (/dev/gpiochipN).

# Cargo.toml [dependencies] gpio-cdev = "0.6.0"
INSTALL
IMPORT
SIG · GPIO-CDEV
G
gpio-cdev
networkingrustv0.6.0
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.

Chip
use gpio_cdev::Chip;

Opens a GPIO chip and sets a line high.

use gpio_cdev::Chip; fn main() -> Result<(), gpio_cdev::Error> { let mut chip = Chip::new("/dev/gpiochip0")?; let line = chip.get_line(17)?; line.set_direction(gpio_cdev::LineDirection::Out)?; line.set_value(gpio_cdev::LineValue::High)?; Ok(()) }
Debug
Known issues
gotchaOnly works on Linux systems with GPIO character device support.
fix
Ensure the kernel has CONFIG_GPIO_CDEV enabled and /dev/gpiochip* exists.
affects: >=0.6.0
Upgrade
Version history
0.6.0latest on crates.io
Audit
Dependencies

No dependency data recorded yet.

Agent activity
4 hits · last 30 days
node
4
Resources
gpio-cdev — cargo add gpio-cdev · libregistry