gpiocdev_uapi/
lib.rs

1// SPDX-FileCopyrightText: 2021 Kent Gibson <warthog618@gmail.com>
2//
3// SPDX-License-Identifier: Apache-2.0 OR MIT
4
5//! A thin but safe Rust layer around the Linux GPIO uAPI.
6
7pub(crate) mod common;
8
9// move ops into v1/v2??
10pub use common::{
11    has_event, read_event, wait_event, Errno, Error, Name, Result, ValidationError, NAME_LEN_MAX,
12    NUM_LINES_MAX,
13};
14
15/// This module implements GPIO ABI v1 which was released in Linux v4.8.
16///
17/// This ABI version is deprecated.
18///
19/// ABI v2 adds features and overcomes a number of bugs and limitations present in v1.
20/// Use ABI v2 instead where possible.
21#[cfg(feature = "uapi_v1")]
22pub mod v1;
23
24/// This module implements GPIO ABI v2 which is the current version of the ABI,
25/// released in Linux v5.10.
26#[cfg(any(feature = "uapi_v2", not(feature = "uapi_v1")))]
27pub mod v2;