summaryrefslogtreecommitdiff
path: root/src/devices/mod.rs
blob: a48531d7e8776a384b9ce131d418f0681ec499a3 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
pub mod fc0013;
pub mod r820t;

pub struct DeviceInfo {
    pub id: &'static str,
    pub name: &'static str,
    pub i2c_addr: u8,
    pub check_addr: u8,
    pub check_val: u8,
}

pub trait Device {
    fn init(&self);
    fn exit(&self);
    fn set_freq(&self, freq: u32);
    fn set_bw(&self, bw: u32);
    fn set_gain(&self, gain: u32);
    fn set_if_gain(&self, if_gain: u32);
    fn set_gain_mode(&self, mode: bool);
}