mirror of
https://github.com/m-labs/artiq.git
synced 2024-12-25 03:08:27 +08:00
parent
1f82ceaa85
commit
80cbef0031
@ -158,11 +158,8 @@ fn network_boot() {
|
||||
|
||||
println!("Using MAC address {} and IP address {}", eth_addr, ip_addr);
|
||||
|
||||
#[allow(unused_mut)]
|
||||
let mut net_device = unsafe { ethmac::EthernetDevice::new() };
|
||||
|
||||
#[cfg(has_ethphy)]
|
||||
net_device.reset_phy();
|
||||
net_device.reset_phy_if_any();
|
||||
|
||||
let mut neighbor_map = [None; 2];
|
||||
let neighbor_cache =
|
||||
|
@ -57,6 +57,11 @@ impl EthernetDevice {
|
||||
clock::spin_us(2_000);
|
||||
}
|
||||
}
|
||||
|
||||
pub fn reset_phy_if_any(&mut self) {
|
||||
#[cfg(has_ethphy)]
|
||||
self.reset_phy();
|
||||
}
|
||||
}
|
||||
|
||||
impl<'a> Device<'a> for EthernetDevice {
|
||||
|
@ -150,7 +150,8 @@ fn startup_ethernet() {
|
||||
}
|
||||
}
|
||||
|
||||
let net_device = unsafe { ethmac::EthernetDevice::new() };
|
||||
let mut net_device = unsafe { ethmac::EthernetDevice::new() };
|
||||
net_device.reset_phy_if_any();
|
||||
|
||||
// fn _net_trace_writer<U>(timestamp: u64, printer: smoltcp::wire::PrettyPrinter<U>)
|
||||
// where U: smoltcp::wire::pretty_print::PrettyPrint {
|
||||
|
Loading…
Reference in New Issue
Block a user