Skip to content

Commit

Permalink
update deps and remove depracted device info
Browse files Browse the repository at this point in the history
  • Loading branch information
nik012003 committed Feb 25, 2024
1 parent ae843cd commit e4ecefa
Show file tree
Hide file tree
Showing 3 changed files with 98 additions and 27 deletions.
115 changes: 94 additions & 21 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,6 @@ edition = "2018"
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html

[dependencies]
hidapi = { version = "2.4.1", default-features = false, features = ["linux-static-libusb"]}
pretty-hex = "0.3.0"
hidapi = { version = "2.6.0", default-features = false, features = ["linux-static-libusb"] }
pretty-hex = "0.4.1"
structopt = "0.3.26"
6 changes: 2 additions & 4 deletions src/annepro2.rs
Original file line number Diff line number Diff line change
Expand Up @@ -105,13 +105,11 @@ pub fn flash_firmware<R: std::io::Read>(
fn fetch_devices(api: &HidApi) -> (Vec<&hidapi::DeviceInfo>, Option<&hidapi::DeviceInfo>) {
for dev in api.device_list() {
println!(
"HID Dev: {:04x}:{:04x} usage #: {:02x} usage_page #: {:04x} {}",
"HID Dev: {:04x}:{:04x} {}",
dev.vendor_id(),
dev.product_id(),
dev.usage(),
dev.usage_page(),
dev.product_string()
.map(|it| format!("({:})", it.replace("\n", " - ")))
.map(|it| format!("({:})", it.replace('\n', " - ")))
.unwrap_or_default()
);
}
Expand Down

0 comments on commit e4ecefa

Please sign in to comment.