Skip to content

Commit 6809164

Browse files
committed
Add documentation for the cdev feature
1 parent 1d0f368 commit 6809164

File tree

1 file changed

+13
-0
lines changed

1 file changed

+13
-0
lines changed

README.md

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,19 @@ This project is developed and maintained by the [Embedded Linux team][team].
88

99
## [Documentation](https://docs.rs/linux-embedded-hal)
1010

11+
## GPIO character device
12+
13+
Since Linux kernel v4.4 the use of sysfs GPIO was deprecated and replaced by the character device GPIO.
14+
See [gpio-cdev documentation](https://github.com/rust-embedded/gpio-cdev#sysfs-gpio-vs-gpio-character-device) for details.
15+
16+
This crate includes feature flag `gpio_cdev` that exposes `CdevPin` as wrapper around `LineHandle` from [gpio-cdev](https://crates.io/crates/gpio-cdev).
17+
To enable it update your Cargo.toml.
18+
```
19+
linux-embedded-hal = { version = "0.3", features = ["gpio_cdev"] }
20+
```
21+
22+
`SysfsPin` can be still used with feature flag `gpio_sysfs`.
23+
1124
## License
1225

1326
Licensed under either of

0 commit comments

Comments
 (0)