Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/warthog618/gpiocdev-rs

A Rust library for accessing GPIO lines on Linux platforms using the GPIO character device
https://github.com/warthog618/gpiocdev-rs

gpio gpio-character-device gpio-library linux linux-gpio pins rust

Last synced: 4 days ago
JSON representation

A Rust library for accessing GPIO lines on Linux platforms using the GPIO character device

Awesome Lists containing this project

README

        

# gpiocdev-rs

[![Build Status](https://img.shields.io/github/actions/workflow/status/warthog618/gpiocdev-rs/rust.yml?logo=github&branch=master)](https://github.com/warthog618/gpiocdev-rs/actions/workflows/rust.yml)

A Rust library for accessing GPIO lines on Linux platforms using the GPIO character device.

This is the equivalent of [libgpiod](https://git.kernel.org/pub/scm/libs/libgpiod/libgpiod.git/), but in pure Rust.

## Crates

[gpiocdev](https://github.com/warthog618/gpiocdev-rs/tree/master/lib) provides a high level API for accessing GPIO lines from Rust applications.

You probably want this one.

[gpiocdev-embedded-hal](https://github.com/warthog618/gpiocdev-rs/tree/master/embedded-hal) provides
[embedded_hal](https://crates.io/crates/embedded-hal) traits for [gpiocdev](https://github.com/warthog618/gpiocdev-rs/tree/master/lib) Requests.

Also provides a simplified interface that may be useful for basic use cases.

[gpiocdev-cli](https://github.com/warthog618/gpiocdev-rs/tree/master/cli) provides a command line tool to access and control GPIO lines.

The tool can be useful for writing scripts accessing the GPIOs, and for debugging GPIO setups.

[gpiocdev-uapi](https://github.com/warthog618/gpiocdev-rs/tree/master/uapi) provides a thin safe Rust wrapper around the character device ioctls.

The [gpiocdev](https://github.com/warthog618/gpiocdev-rs/tree/master/lib) crate provides a higher level abstraction, so you should use that unless you have some particular interest in calling the Linux GPIO ioctls directly.

## License

Licensed under either of

- Apache License, Version 2.0 ([LICENSE-APACHE](LICENSES/Apache-2.0.txt) or
)
- MIT license ([LICENSE-MIT](LICENSES/MIT.txt) or )

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.