diff --git a/.gitignore b/.gitignore index 143b1ca..be39b2f 100644 --- a/.gitignore +++ b/.gitignore @@ -1,4 +1,6 @@ - /target/ **/*.rs.bk Cargo.lock + +/.cargo +/.vscode diff --git a/Cargo.toml b/Cargo.toml index c7d44a9..0c10854 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -27,6 +27,7 @@ tokio = { version = "1", features = ["io-std", "net"], optional = true } futures = { version = "0.3", optional = true } [dev-dependencies] +ignore = "=0.4.20" # dep of `quicli`, make it compatible with rust 1.65.0 quicli = "0.4" structopt = "0.3" anyhow = "1.0" diff --git a/src/lib.rs b/src/lib.rs index b8b6506..9dab370 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -356,6 +356,13 @@ bitflags! { const ACTIVE_LOW = (1 << 2); const OPEN_DRAIN = (1 << 3); const OPEN_SOURCE = (1 << 4); + // https://elixir.bootlin.com/linux/v5.5/source/include/uapi/linux/gpio.h#L30 + /// Available since Linux Kernel 5.5 + const BIAS_PULL_UP = (1 << 5); + /// Available since Linux Kernel 5.5 + const BIAS_PULL_DOWN = (1 << 6); + /// Available since Linux Kernel 5.5 + const BIAS_PULL_DISABLE = (1 << 7); } }