#linux-gpio #gpio #gpio-pin #linux #ioctl #low-level #gpiochip

gpiocdev-uapi

A low level library to access GPIO lines on Linux using the GPIO character device

13 releases

0.6.3 Oct 3, 2024
0.6.2 May 23, 2024
0.6.1 Feb 20, 2024
0.6.0 Nov 22, 2023
0.3.1 Nov 21, 2022

#858 in Unix APIs

Download history 425/week @ 2024-07-02 418/week @ 2024-07-09 574/week @ 2024-07-16 486/week @ 2024-07-23 650/week @ 2024-07-30 471/week @ 2024-08-06 463/week @ 2024-08-13 382/week @ 2024-08-20 320/week @ 2024-08-27 318/week @ 2024-09-03 282/week @ 2024-09-10 487/week @ 2024-09-17 473/week @ 2024-09-24 841/week @ 2024-10-01 374/week @ 2024-10-08 385/week @ 2024-10-15

2,168 downloads per month
Used in 5 crates (via gpiocdev)

Apache-2.0 OR MIT

79KB
1.5K SLoC

gpiocdev-uapi

Build Status github crate LICENSE

A thin safe Rust wrapper around the Linux GPIO character device ioctls and file operations.

Rust structs corresponding to the C ABI types are provided, as are functions corresponding to each of the ABI ioctls and character device file reads. Essentially just the Rust version of gpio.h.

Both ABI versions v1 and v2 are supported, though new developments should use v2 unless it is unavailable on the target platform.

The gpiocdev crate provides a higher level abstraction, so you should use that unless you have some particular need to call the ioctls directly.

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.

Dependencies

~0.4–1MB
~22K SLoC