From 11089d8a64d26cb7cfb873ecc0ed2bfca566148b Mon Sep 17 00:00:00 2001 From: Harry Ho Date: Wed, 12 Aug 2020 16:51:25 +0800 Subject: [PATCH] i2c: delete dead code --- libboard_zynq/src/i2c/mod.rs | 4 ---- libboard_zynq/src/i2c/regs.rs | 2 -- 2 files changed, 6 deletions(-) diff --git a/libboard_zynq/src/i2c/mod.rs b/libboard_zynq/src/i2c/mod.rs index a1e1ca2..989efa0 100644 --- a/libboard_zynq/src/i2c/mod.rs +++ b/libboard_zynq/src/i2c/mod.rs @@ -2,14 +2,11 @@ mod regs; pub mod eeprom; -use super::clocks::Clocks; use super::slcr; use super::time::Microseconds; use embedded_hal::timer::CountDown; use libregister::{RegisterR, RegisterRW, RegisterW}; -const INVALID_BUS: &'static str = "Invalid I2C bus"; - pub struct I2C { regs: regs::RegisterWrapper, count_down: super::timer::global::CountDown @@ -45,7 +42,6 @@ impl I2C { fn ctor_common(gpio_output_mask: u16) -> Self { // Setup register block - let clocks = Clocks::get(); let self_ = Self { regs: regs::RegisterWrapper::new(), count_down: unsafe { super::timer::GlobalTimer::get() }.countdown() diff --git a/libboard_zynq/src/i2c/regs.rs b/libboard_zynq/src/i2c/regs.rs index 601b874..d2a59e6 100644 --- a/libboard_zynq/src/i2c/regs.rs +++ b/libboard_zynq/src/i2c/regs.rs @@ -1,5 +1,3 @@ -use volatile_register::{RO, WO, RW}; - use libregister::{ register, register_at, register_bit, register_bits