Skip to content

Commit

Permalink
From smoltcp mac address impls
Browse files Browse the repository at this point in the history
  • Loading branch information
datdenkikniet committed Dec 19, 2022
1 parent 57cb8c9 commit b7bafef
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions src/mac/frame_filtering/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -315,6 +315,20 @@ impl defmt::Format for Mac {
}
}

#[cfg(feature = "smoltcp-phy")]
impl From<smoltcp::wire::EthernetAddress> for Mac {
fn from(value: smoltcp::wire::EthernetAddress) -> Self {
Self::new(value.0)
}
}

#[cfg(feature = "smoltcp-phy")]
impl From<Mac> for smoltcp::wire::EthernetAddress {
fn from(value: Mac) -> Self {
smoltcp::wire::EthernetAddress::from_bytes(&value.0)
}
}

#[derive(Debug, Clone, Copy)]
/// The type of an address filter.
pub enum AddressFilterType {
Expand Down

0 comments on commit b7bafef

Please sign in to comment.