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 5077b3e
Show file tree
Hide file tree
Showing 3 changed files with 11 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

/.cargo
/.vscode
1 change: 1 addition & 0 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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"
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#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);
}
}

Expand Down

0 comments on commit 5077b3e

Please sign in to comment.