Add IEEE802.15.4 address to embassy net Stack
This commit is contained in:
parent
c52d1d11f9
commit
c3ba08ffb6
1 changed files with 8 additions and 1 deletions
|
@ -247,7 +247,7 @@ impl<D: Driver + 'static> Stack<D> {
|
|||
#[cfg(feature = "medium-ip")]
|
||||
Medium::Ip => HardwareAddress::Ip,
|
||||
#[cfg(feature = "medium-ieee802154")]
|
||||
Medium::Ieee802154 => HardwareAddress::Ieee802154(Ieee802154Address::Absent),
|
||||
Medium::Ieee802154 => HardwareAddress::Ieee802154(Ieee802154Address::Extended(device.ieee802154_address())),
|
||||
#[allow(unreachable_patterns)]
|
||||
_ => panic!(
|
||||
"Unsupported medium {:?}. Make sure to enable it in embassy-net's Cargo features.",
|
||||
|
@ -747,6 +747,13 @@ impl<D: Driver + 'static> Inner<D> {
|
|||
)));
|
||||
}
|
||||
|
||||
#[cfg(feature = "medium-ieee802154")]
|
||||
if self.device.capabilities().medium == Medium::Ieee802154 {
|
||||
s.iface.set_hardware_addr(HardwareAddress::Ieee802154(Ieee802154Address::Extended(
|
||||
self.device.ieee802154_address(),
|
||||
)));
|
||||
}
|
||||
|
||||
let timestamp = instant_to_smoltcp(Instant::now());
|
||||
let mut smoldev = DriverAdapter {
|
||||
cx: Some(cx),
|
||||
|
|
Loading…
Reference in a new issue