#linux #hal

dev linux-embedded-hal

Implementation of the embedded-hal traits for Linux devices

13 releases

0.4.0 Jan 12, 2024
0.4.0-alpha.3 Aug 5, 2022
0.4.0-alpha.2 Feb 14, 2022
0.4.0-alpha.1 Oct 7, 2021
0.1.1 Feb 13, 2018

#15 in Embedded development

Download history 2724/week @ 2023-11-03 2434/week @ 2023-11-10 3298/week @ 2023-11-17 2125/week @ 2023-11-24 1801/week @ 2023-12-01 1913/week @ 2023-12-08 2171/week @ 2023-12-15 1214/week @ 2023-12-22 1126/week @ 2023-12-29 2196/week @ 2024-01-05 2515/week @ 2024-01-12 2672/week @ 2024-01-19 2607/week @ 2024-01-26 2676/week @ 2024-02-02 3469/week @ 2024-02-09 2378/week @ 2024-02-16

11,453 downloads per month
Used in 151 crates (148 directly)

MIT/Apache

42KB
795 lines

crates.io crates.io Documentation Minimum Supported Rust Version

linux-embedded-hal

Implementation of the embedded-hal traits for Linux devices

This project is developed and maintained by the Embedded Linux team.

Documentation

GPIO character device

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.

Minimum Supported Rust Version (MSRV)

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.

License

Licensed under either of

at your option.

Contribution

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.

Code of Conduct

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.

Dependencies

~2–13MB
~126K SLoC