diff --git a/POC_in_rust/Cargo.toml b/POC_in_rust/Cargo.toml new file mode 100644 index 0000000..b977416 --- /dev/null +++ b/POC_in_rust/Cargo.toml @@ -0,0 +1,7 @@ +[package] +name = "POC_in_rust" +version = "0.1.0" +edition = "2024" + +[dependencies] +nusb = "0.1.13" diff --git a/POC_in_rust/src/main.rs b/POC_in_rust/src/main.rs new file mode 100644 index 0000000..28d439a --- /dev/null +++ b/POC_in_rust/src/main.rs @@ -0,0 +1,11 @@ +use nusb; + +static USB_VENDOR: u16 = 0xffff; +static USB_PRODUCT: u16 = 0x0035; + +fn main() { + let dev = nusb::list_devices().unwrap().find(|dev| dev.vendor_id() == USB_VENDOR && dev.product_id() == USB_PRODUCT).expect("Device not connected!"); + let device = dev.open().expect("failed to open device"); + let interface = device.claim_interface(0).expect("failed to claim interface"); + println!("Success") +} diff --git a/run.sh b/run.sh old mode 100755 new mode 100644