Skip to content

Commit ff7efaa

Browse files
committed
update example for compatibility with smoltcp 0.10.x
1 parent 8f57225 commit ff7efaa

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

examples/ethernet-rtic-nucleo-h723zg.rs

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -69,10 +69,9 @@ impl<'a> Net<'a> {
6969
mut ethdev: ethernet::EthernetDMA<4, 4>,
7070
ethernet_addr: HardwareAddress,
7171
) -> Self {
72-
let mut config = Config::new();
73-
config.hardware_addr = Some(ethernet_addr);
72+
let config = Config::new(ethernet_addr);
7473

75-
let mut iface = Interface::new(config, &mut ethdev);
74+
let mut iface = Interface::new(config, &mut ethdev, Instant::ZERO);
7675
// Set IP address
7776
iface.update_ip_addrs(|addrs| {
7877
let _ = addrs.push(IpCidr::new(IpAddress::v4(192, 168, 1, 99), 0));

0 commit comments

Comments
 (0)