| 89 | } |
| 90 | |
| 91 | pub fn create_interface(device: &mut esp_radio::wifi::WifiDevice) -> smoltcp::iface::Interface { |
| 92 | // users could create multiple instances but since they only have one WifiDevice |
| 93 | // they probably can't do anything bad with that |
| 94 | smoltcp::iface::Interface::new( |
| 95 | smoltcp::iface::Config::new(smoltcp::wire::HardwareAddress::Ethernet( |
| 96 | smoltcp::wire::EthernetAddress::from_bytes(&device.mac_address()), |
| 97 | )), |
| 98 | device, |
| 99 | timestamp(), |
| 100 | ) |
| 101 | } |
| 102 | |
| 103 | // some smoltcp boilerplate |
| 104 | fn timestamp() -> smoltcp::time::Instant { |