Crates.io | linux-embedded-hal |
lib.rs | linux-embedded-hal |
version | 0.4.0 |
source | src |
created_at | 2018-01-17 00:03:34.805849 |
updated_at | 2024-01-12 09:27:28.730244 |
description | Implementation of the `embedded-hal` traits for Linux devices |
homepage | |
repository | https://github.com/rust-embedded/linux-embedded-hal |
max_upload_size | |
id | 47111 |
size | 81,178 |
linux-embedded-hal
Implementation of the
embedded-hal
traits for Linux devices
This project is developed and maintained by the Embedded Linux team.
Since Linux kernel v4.4 the use of sysfs GPIO was deprecated and replaced by the character device GPIO. See gpio-cdev documentation for details.
This crate includes feature flag gpio_cdev
that exposes CdevPin
as wrapper around LineHandle
from gpio-cdev.
To enable it update your Cargo.toml. Please note that in order to prevent LineHandle
fd from closing you should
assign to a variable, see cdev issue for more details.
linux-embedded-hal = { version = "0.4", features = ["gpio_cdev"] }
SysfsPin
can be still used with feature flag gpio_sysfs
.
With default-features = false
you can enable the features gpio_cdev
, gpio_sysfs
, i2c
, and spi
as needed.
This crate is guaranteed to compile on stable Rust 1.65.0 and up. It might compile with older versions but that may change in any new patch release.
Licensed under either of
at your option.
Unless you explicitly state otherwise, any contribution intentionally submitted for inclusion in the work by you, as defined in the Apache-2.0 license, shall be dual licensed as above, without any additional terms or conditions.
Contribution to this crate is organized under the terms of the Rust Code of Conduct, the maintainer of this crate, the HAL team, promises to intervene to uphold that code of conduct.