libconfig: remove "no_i2c" feature, opt-level 's'
This commit is contained in:
parent
6d828bb348
commit
20bb50931c
@ -14,7 +14,7 @@ members = [
|
||||
panic = "abort"
|
||||
debug = true
|
||||
codegen-units = 1
|
||||
opt-level = 'z'
|
||||
opt-level = 's'
|
||||
lto = true
|
||||
debug-assertions = false
|
||||
overflow-checks = false
|
||||
|
@ -15,5 +15,4 @@ target_zc706 = []
|
||||
target_coraz7 = []
|
||||
target_redpitaya = []
|
||||
target_kasli_soc = []
|
||||
no_i2c = []
|
||||
ipv6 = []
|
||||
|
@ -30,7 +30,7 @@ impl fmt::Display for NetAddresses {
|
||||
}
|
||||
}
|
||||
|
||||
#[cfg(all(feature = "target_kasli_soc", not(feature = "no_i2c")))]
|
||||
#[cfg(feature = "target_kasli_soc")]
|
||||
fn get_address_from_eeprom() -> EthernetAddress {
|
||||
use libboard_zynq::i2c::{I2c, eeprom};
|
||||
|
||||
@ -55,10 +55,8 @@ pub fn get_addresses(cfg: &Config) -> NetAddresses {
|
||||
let mut hardware_addr = EthernetAddress([0x02, 0x00, 0x00, 0x00, 0x00, 0x55]);
|
||||
#[cfg(feature = "target_redpitaya")]
|
||||
let mut ipv4_addr = IpAddress::v4(192, 168, 1, 55);
|
||||
#[cfg(all(feature = "target_kasli_soc", not(feature = "no_i2c")))]
|
||||
#[cfg(feature = "target_kasli_soc")]
|
||||
let mut hardware_addr = get_address_from_eeprom();
|
||||
#[cfg(all(feature = "target_kasli_soc", feature = "no_i2c"))]
|
||||
let mut hardware_addr = EthernetAddress([0x02, 0x00, 0x00, 0x00, 0x00, 0x56]);
|
||||
#[cfg(feature = "target_kasli_soc")]
|
||||
let mut ipv4_addr = IpAddress::v4(192, 168, 1, 56);
|
||||
|
||||
|
@ -21,4 +21,4 @@ libboard_zynq = { path = "../libboard_zynq" }
|
||||
libsupport_zynq = { path = "../libsupport_zynq" }
|
||||
libcortex_a9 = { path = "../libcortex_a9" }
|
||||
libregister = { path = "../libregister" }
|
||||
libconfig = { path = "../libconfig", features = ["no_i2c"] }
|
||||
libconfig = { path = "../libconfig" }
|
||||
|
Loading…
Reference in New Issue
Block a user