Skip to content

Commit

Permalink
update to newer libusb interface (#17)
Browse files Browse the repository at this point in the history
  • Loading branch information
davidjmeyer authored Oct 17, 2024
1 parent 7152e5f commit 10346dd
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions src/lab_bench.rs
Original file line number Diff line number Diff line change
Expand Up @@ -174,7 +174,7 @@ impl NscopeLink {

if vendor_id == 0x0483 && product_id == 0xA4AA {
let mut available = false;
if let Ok(mut dev) = device.open() {
if let Ok(dev) = device.open() {
if let Ok(()) = dev.claim_interface(0) {
available = true;
}
Expand Down Expand Up @@ -290,7 +290,7 @@ impl NscopeLink {
}
NscopeDevice::RusbDevice(device) => {
let out_buffer = [0u8, 6u8];
let mut device_handle = device.open()?;
let device_handle = device.open()?;
device_handle.claim_interface(0)?;
device_handle.write_bulk(0x01, &out_buffer, Duration::from_millis(100))?;
}
Expand Down
2 changes: 1 addition & 1 deletion src/scope.rs
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@ impl Nscope {
Nscope::run_v1(hid_device, backend_command_tx, command_rx, backend_fw_version, backend_power_status);
}).ok()
}
NscopeHandle::Nscope(mut usb_device) => {
NscopeHandle::Nscope(usb_device) => {
usb_device.claim_interface(0)?;
communication_thread.spawn(move || {
Nscope::run_v2(usb_device, backend_command_tx, command_rx, backend_fw_version, backend_power_status);
Expand Down

0 comments on commit 10346dd

Please sign in to comment.