diff options
| author | Yuval Adam <_@yuv.al> | 2018-07-23 19:56:08 +0300 |
|---|---|---|
| committer | Yuval Adam <_@yuv.al> | 2018-07-23 19:56:08 +0300 |
| commit | b19f35cbc702f3855db52824e26939093148f1b9 (patch) | |
| tree | 5cb946b1aceb1ce2e4e33cb2442638ea8813a969 /src/main.rs | |
| parent | 42b95915c11780a796f32ca9c35cb286155da7cc (diff) | |
Initial RtlSdr struct and impl
Diffstat (limited to 'src/main.rs')
| -rw-r--r-- | src/main.rs | 15 |
1 files changed, 6 insertions, 9 deletions
diff --git a/src/main.rs b/src/main.rs index 697912b..ce80d1b 100644 --- a/src/main.rs +++ b/src/main.rs @@ -1,14 +1,11 @@ extern crate libusb; +mod lib; + +use lib::RtlSdr; + fn main() { println!("Running"); - let ctx = libusb::Context::new().unwrap(); - for mut dev in ctx.devices().unwrap().iter() { - let desc = dev.device_descriptor().unwrap(); - println!("Bus {:03} Device {:03} ID {:04x}:{:04x}", - dev.bus_number(), - dev.address(), - desc.vendor_id(), - desc.product_id()); - } + let rtlsdr = RtlSdr::new(); + rtlsdr.find(); } |
