aboutsummaryrefslogtreecommitdiff
path: root/embassy-net-driver/src
diff options
context:
space:
mode:
Diffstat (limited to 'embassy-net-driver/src')
-rw-r--r--embassy-net-driver/src/lib.rs16
1 files changed, 6 insertions, 10 deletions
diff --git a/embassy-net-driver/src/lib.rs b/embassy-net-driver/src/lib.rs
index beb1a1c79..93a02e46c 100644
--- a/embassy-net-driver/src/lib.rs
+++ b/embassy-net-driver/src/lib.rs
@@ -4,6 +4,8 @@
4 4
5use core::task::Context; 5use core::task::Context;
6 6
7use smoltcp::wire::HardwareAddress;
8
7/// Main `embassy-net` driver API. 9/// Main `embassy-net` driver API.
8/// 10///
9/// This is essentially an interface for sending and receiving raw network frames. 11/// This is essentially an interface for sending and receiving raw network frames.
@@ -51,11 +53,8 @@ pub trait Driver {
51 /// Get a description of device capabilities. 53 /// Get a description of device capabilities.
52 fn capabilities(&self) -> Capabilities; 54 fn capabilities(&self) -> Capabilities;
53 55
54 /// Get the device's Ethernet address. 56 /// Get the device's hardware address.
55 fn ethernet_address(&self) -> [u8; 6]; 57 fn hardware_address(&self) -> HardwareAddress;
56
57 /// Get the device's IEEE 802.15.4 address.
58 fn ieee802154_address(&self) -> [u8; 8];
59} 58}
60 59
61impl<T: ?Sized + Driver> Driver for &mut T { 60impl<T: ?Sized + Driver> Driver for &mut T {
@@ -78,11 +77,8 @@ impl<T: ?Sized + Driver> Driver for &mut T {
78 fn link_state(&mut self, cx: &mut Context) -> LinkState { 77 fn link_state(&mut self, cx: &mut Context) -> LinkState {
79 T::link_state(self, cx) 78 T::link_state(self, cx)
80 } 79 }
81 fn ethernet_address(&self) -> [u8; 6] { 80 fn hardware_address(&self) -> HardwareAddress {
82 T::ethernet_address(self) 81 T::hardware_address(self)
83 }
84 fn ieee802154_address(&self) -> [u8; 8] {
85 T::ieee802154_address(self)
86 } 82 }
87} 83}
88 84