summaryrefslogtreecommitdiff
path: root/src/tuners
diff options
context:
space:
mode:
authorYuval Adam <_@yuv.al>2021-04-28 09:48:55 +0300
committerYuval Adam <_@yuv.al>2021-04-28 09:48:55 +0300
commit25db452b3fb9c83ff8600362467bcde63591d67f (patch)
tree80e35e5ec18c6559917829f810d64b1be0f66070 /src/tuners
parent5979051bd97b61762567fb4710de3dc8a69135c6 (diff)
WIP
Diffstat (limited to 'src/tuners')
-rw-r--r--src/tuners/fc0013.rs12
-rw-r--r--src/tuners/mod.rs12
-rw-r--r--src/tuners/r820t.rs16
3 files changed, 20 insertions, 20 deletions
diff --git a/src/tuners/fc0013.rs b/src/tuners/fc0013.rs
index b7d5398..b67b6c3 100644
--- a/src/tuners/fc0013.rs
+++ b/src/tuners/fc0013.rs
@@ -33,27 +33,27 @@ impl Tuner for FC0013 {
unimplemented!()
}
- fn exit(&self) {
+ fn exit(&self, handle: &RtlSdrDeviceHandle) {
unimplemented!()
}
- fn set_freq(&self, _freq: u32) {
+ fn set_frequency(&self, _freq: u32, handle: &RtlSdrDeviceHandle) {
unimplemented!()
}
- fn set_bandwidth(&mut self, _bw: u32, _rate: u32, _handle: &RtlSdrDeviceHandle) {
+ fn set_bandwidth(&mut self, _bw: u32, _handle: &RtlSdrDeviceHandle) {
unimplemented!()
}
- fn set_gain(&self, _gain: u32) {
+ fn set_gain(&self, _gain: u32, handle: &RtlSdrDeviceHandle) {
unimplemented!()
}
- fn set_if_gain(&self, _if_gain: u32) {
+ fn set_if_gain(&self, _if_gain: u32, handle: &RtlSdrDeviceHandle) {
unimplemented!()
}
- fn set_gain_mode(&self, _mode: bool) {
+ fn set_gain_mode(&self, _mode: bool, handle: &RtlSdrDeviceHandle) {
unimplemented!()
}
diff --git a/src/tuners/mod.rs b/src/tuners/mod.rs
index ac354b1..7734126 100644
--- a/src/tuners/mod.rs
+++ b/src/tuners/mod.rs
@@ -16,12 +16,12 @@ pub struct TunerInfo {
pub trait Tuner {
fn init(&self, handle: &RtlSdrDeviceHandle);
- fn exit(&self);
- fn set_freq(&self, freq: u32);
- fn set_bandwidth(&mut self, bw: u32, rate: u32, handle: &RtlSdrDeviceHandle);
- fn set_gain(&self, gain: u32);
- fn set_if_gain(&self, if_gain: u32);
- fn set_gain_mode(&self, mode: bool);
+ fn exit(&self, handle: &RtlSdrDeviceHandle);
+ fn set_frequency(&self, freq: u32, handle: &RtlSdrDeviceHandle);
+ fn set_bandwidth(&mut self, rate: u32, handle: &RtlSdrDeviceHandle);
+ fn set_gain(&self, gain: u32, handle: &RtlSdrDeviceHandle);
+ fn set_if_gain(&self, if_gain: u32, handle: &RtlSdrDeviceHandle);
+ fn set_gain_mode(&self, mode: bool, handle: &RtlSdrDeviceHandle);
fn display(&self) -> &str;
}
diff --git a/src/tuners/r820t.rs b/src/tuners/r820t.rs
index 85f57ad..1c685ce 100644
--- a/src/tuners/r820t.rs
+++ b/src/tuners/r820t.rs
@@ -208,8 +208,8 @@ impl R820T {
handle.demod_write_reg(1, 0x15, 0x01, 1);
}
- fn shadow_store(&self, reg: u8, _val: u8, len: usize) {
- let r = reg as usize - REG_SHADOW_START;
+ fn shadow_store(&self, reg: u8, _val: u8, _len: usize) {
+ let _r = reg as usize - REG_SHADOW_START;
// if r < 0 {
// len = len + r;
// }
@@ -275,13 +275,13 @@ impl Tuner for R820T {
handle.demod_write_reg(1, 0x15, 0x01, 1);
}
- fn exit(&self) {}
+ fn exit(&self, _handle: &RtlSdrDeviceHandle) {}
- fn set_freq(&self, _freq: u32) {
+ fn set_frequency(&self, _freq: u32, _handle: &RtlSdrDeviceHandle) {
unimplemented!()
}
- fn set_bandwidth(&mut self, mut bw: u32, rate: u32, handle: &RtlSdrDeviceHandle) {
+ fn set_bandwidth(&mut self, mut bw: u32, _handle: &RtlSdrDeviceHandle) {
const FILT_HP_BW1: u32 = 350000;
const FILT_HP_BW2: u32 = 380000;
@@ -340,15 +340,15 @@ impl Tuner for R820T {
self.write_reg_mask(0x0b, reg_0b, 0xef);
}
- fn set_gain(&self, _gain: u32) {
+ fn set_gain(&self, _gain: u32, _handle: &RtlSdrDeviceHandle) {
unimplemented!()
}
- fn set_if_gain(&self, _if_gain: u32) {
+ fn set_if_gain(&self, _if_gain: u32, _handle: &RtlSdrDeviceHandle) {
unimplemented!()
}
- fn set_gain_mode(&self, _mode: bool) {
+ fn set_gain_mode(&self, _mode: bool, _handle: &RtlSdrDeviceHandle) {
unimplemented!()
}