Expose IEEE802.15.4 address in Driver

This commit is contained in:
Ruben De Smet
2023-07-28 15:54:31 +02:00
parent d752a3f980
commit c52d1d11f9
2 changed files with 21 additions and 0 deletions

View File

@ -53,6 +53,9 @@ pub trait Driver {
/// Get the device's Ethernet address.
fn ethernet_address(&self) -> [u8; 6];
/// Get the device's IEEE 802.15.4 address.
fn ieee802154_address(&self) -> [u8; 8];
}
impl<T: ?Sized + Driver> Driver for &mut T {
@ -78,6 +81,9 @@ impl<T: ?Sized + Driver> Driver for &mut T {
fn ethernet_address(&self) -> [u8; 6] {
T::ethernet_address(self)
}
fn ieee802154_address(&self) -> [u8; 8] {
T::ieee802154_address(self)
}
}
/// A token to receive a single network packet.