libboard_zynq: dead code, peripheral & regblock ctor names consistency #63

Manually merged
astro merged 3 commits from harry/zynq-rs:cleanup into master 2020-08-17 23:38:22 +08:00
2 changed files with 0 additions and 6 deletions
Showing only changes of commit 11089d8a64 - Show all commits

View File

@ -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()

View File

@ -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