forked from M-Labs/zynq-rs
i2c: delete dead code
This commit is contained in:
parent
c69cd9951e
commit
11089d8a64
|
@ -2,14 +2,11 @@
|
||||||
|
|
||||||
mod regs;
|
mod regs;
|
||||||
pub mod eeprom;
|
pub mod eeprom;
|
||||||
use super::clocks::Clocks;
|
|
||||||
use super::slcr;
|
use super::slcr;
|
||||||
use super::time::Microseconds;
|
use super::time::Microseconds;
|
||||||
use embedded_hal::timer::CountDown;
|
use embedded_hal::timer::CountDown;
|
||||||
use libregister::{RegisterR, RegisterRW, RegisterW};
|
use libregister::{RegisterR, RegisterRW, RegisterW};
|
||||||
|
|
||||||
const INVALID_BUS: &'static str = "Invalid I2C bus";
|
|
||||||
|
|
||||||
pub struct I2C {
|
pub struct I2C {
|
||||||
regs: regs::RegisterWrapper,
|
regs: regs::RegisterWrapper,
|
||||||
count_down: super::timer::global::CountDown<Microseconds>
|
count_down: super::timer::global::CountDown<Microseconds>
|
||||||
|
@ -45,7 +42,6 @@ impl I2C {
|
||||||
|
|
||||||
fn ctor_common(gpio_output_mask: u16) -> Self {
|
fn ctor_common(gpio_output_mask: u16) -> Self {
|
||||||
// Setup register block
|
// Setup register block
|
||||||
let clocks = Clocks::get();
|
|
||||||
let self_ = Self {
|
let self_ = Self {
|
||||||
regs: regs::RegisterWrapper::new(),
|
regs: regs::RegisterWrapper::new(),
|
||||||
count_down: unsafe { super::timer::GlobalTimer::get() }.countdown()
|
count_down: unsafe { super::timer::GlobalTimer::get() }.countdown()
|
||||||
|
|
|
@ -1,5 +1,3 @@
|
||||||
use volatile_register::{RO, WO, RW};
|
|
||||||
|
|
||||||
use libregister::{
|
use libregister::{
|
||||||
register, register_at,
|
register, register_at,
|
||||||
register_bit, register_bits
|
register_bit, register_bits
|
||||||
|
|
Loading…
Reference in New Issue