From b19f35cbc702f3855db52824e26939093148f1b9 Mon Sep 17 00:00:00 2001 From: Yuval Adam <_@yuv.al> Date: Mon, 23 Jul 2018 19:56:08 +0300 Subject: Initial RtlSdr struct and impl --- src/main.rs | 15 ++++++--------- 1 file changed, 6 insertions(+), 9 deletions(-) (limited to 'src/main.rs') 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(); } -- cgit v1.3.1