From 01824ebaa3096d40a962b921ed239241f92e1076 Mon Sep 17 00:00:00 2001 From: Yuval Adam <_@yuv.al> Date: Fri, 16 Apr 2021 17:23:10 +0300 Subject: Implement search_tuner() --- src/devices/fc0013.rs | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) (limited to 'src/devices/fc0013.rs') diff --git a/src/devices/fc0013.rs b/src/devices/fc0013.rs index 3a26218..7c64758 100644 --- a/src/devices/fc0013.rs +++ b/src/devices/fc0013.rs @@ -1,12 +1,12 @@ -use super::{Device, DeviceInfo}; +use super::{Tuner, TunerInfo}; #[allow(dead_code)] pub struct FC0013 { - pub device: DeviceInfo, + pub device: TunerInfo, } #[allow(dead_code)] -pub const DEVICE_INFO: DeviceInfo = DeviceInfo { +pub const TUNER_INFO: TunerInfo = TunerInfo { id: "fc0013", name: "Fitipower FC0013", i2c_addr: 0xc6, @@ -17,13 +17,11 @@ pub const DEVICE_INFO: DeviceInfo = DeviceInfo { #[allow(dead_code)] impl FC0013 { pub fn new() -> FC0013 { - FC0013 { - device: DEVICE_INFO, - } + FC0013 { device: TUNER_INFO } } } -impl Device for FC0013 { +impl Tuner for FC0013 { fn init(&self) { println!("Init {}", self.device.name); } -- cgit v1.3.1