summaryrefslogtreecommitdiff
path: root/src/main.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/main.rs')
-rw-r--r--src/main.rs15
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();
}