#linux #gpio #ioctl #library #embedded

gpiocdev-uapi

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

7 releases

new 0.3.3 May 27, 2023
0.3.2 Dec 18, 2022
0.3.1 Nov 21, 2022
0.3.0 Oct 31, 2022
0.1.1 Oct 11, 2022

#715 in Unix APIs

Download history 92/week @ 2023-02-04 54/week @ 2023-02-11 145/week @ 2023-02-18 139/week @ 2023-02-25 100/week @ 2023-03-04 107/week @ 2023-03-11 129/week @ 2023-03-18 171/week @ 2023-03-25 67/week @ 2023-04-01 96/week @ 2023-04-08 130/week @ 2023-04-15 185/week @ 2023-04-22 85/week @ 2023-04-29 108/week @ 2023-05-06 19/week @ 2023-05-13 77/week @ 2023-05-20

310 downloads per month
Used in 3 crates (via gpiocdev)

Apache-2.0 OR MIT

75KB
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

~2–6.5MB
~117K SLoC