forked from M-Labs/zynq-rs
1
0
Fork 0

i2c: disable its usage on Cora Z7-10

This commit is contained in:
Harry Ho 2020-08-10 11:49:21 +08:00
parent 4614ed1371
commit 76a4cac873
2 changed files with 31 additions and 27 deletions

View File

@ -205,6 +205,8 @@ pub fn main_core0() {
} }
// Test I2C // Test I2C
#[cfg(feature = "target_zc706")]
{
let mut i2c = zynq::i2c::I2C::i2c(); let mut i2c = zynq::i2c::I2C::i2c();
i2c.init(); i2c.init();
println!("I2C bit-banging enabled"); println!("I2C bit-banging enabled");
@ -233,6 +235,7 @@ pub fn main_core0() {
print!("{:02x} ", eeprom_buffer[i]); print!("{:02x} ", eeprom_buffer[i]);
} }
println!(""); println!("");
}
let eth = zynq::eth::Eth::default(HWADDR.clone()); let eth = zynq::eth::Eth::default(HWADDR.clone());
println!("Eth on"); println!("Eth on");

View File

@ -20,6 +20,7 @@ pub mod flash;
pub mod time; pub mod time;
pub mod timer; pub mod timer;
pub mod sdio; pub mod sdio;
#[cfg(feature = "target_zc706")]
pub mod i2c; pub mod i2c;
pub mod logger; pub mod logger;
pub mod ps7_init; pub mod ps7_init;