#linux #hal

dev linux-embedded-hal

Implementation of the embedded-hal traits for Linux devices

9 releases

0.4.0-alpha.1 Oct 7, 2021
0.4.0-alpha.0 Nov 29, 2020
0.3.1 Sep 27, 2021
0.3.0 Dec 3, 2019
0.1.1 Feb 13, 2018

#27 in Embedded development

Download history 551/week @ 2021-07-01 610/week @ 2021-07-08 428/week @ 2021-07-15 427/week @ 2021-07-22 504/week @ 2021-07-29 643/week @ 2021-08-05 411/week @ 2021-08-12 750/week @ 2021-08-19 381/week @ 2021-08-26 544/week @ 2021-09-02 794/week @ 2021-09-09 515/week @ 2021-09-16 470/week @ 2021-09-23 634/week @ 2021-09-30 946/week @ 2021-10-07 613/week @ 2021-10-14

2,334 downloads per month
Used in less than 112 crates

MIT/Apache

27KB
573 lines

linux-embedded-hal

Implementation of the embedded-hal traits for Linux devices

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

Documentation

Note that current v0.4.0-alpha.X releases track the unstable ['embedded-hal'] v1.0.0-alpha.Y. For bugfixes or backports please open PRs against the v0.3.x branch.

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.3", features = ["gpio_cdev"] }

SysfsPin can be still used with feature flag gpio_sysfs.

Minimum Supported Rust Version (MSRV)

This crate is guaranteed to compile on stable Rust 1.46.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

~1.5MB
~25K SLoC