Skip to content

Commit

Permalink
extend Linerequest flags
Browse files Browse the repository at this point in the history
add `BIAS_PULL_UP` `BIAS_PULL_DOWN` `BIAS_DISABLE` which available since 5.5

https://elixir.bootlin.com/linux/v5.5/source/include/uapi/linux/gpio.h#L62
  • Loading branch information
azureqaq committed May 17, 2024
1 parent cca3424 commit a5c4c29
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 1 deletion.
4 changes: 3 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@

/target/
**/*.rs.bk
Cargo.lock

/.vscode
/.cargo
2 changes: 2 additions & 0 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,8 @@ tokio = { version = "1", features = ["io-std", "net"], optional = true }
futures = { version = "0.3", optional = true }

[dev-dependencies]
# One of the dependencies of `quicli`, make it compatible with rust 1.65.0
ignore = "=0.4.20"
quicli = "0.4"
structopt = "0.3"
anyhow = "1.0"
Expand Down
7 changes: 7 additions & 0 deletions src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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#L62
/// 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_DISABLE = (1 << 7);
}
}

Expand Down

0 comments on commit a5c4c29

Please sign in to comment.