pub fn new_with_mode<'d, Dm: WifiDeviceMode>(
inited: &'d EspWifiController<'d>,
device: impl Peripheral<P = WIFI> + 'd,
_mode: Dm,
) -> Result<(WifiDevice<'d, Dm>, WifiController<'d>), WifiError>
Expand description
Creates a new WifiDevice and WifiController in either AP or STA mode with a default configuration.
This function will panic if the mode is WifiMode::ApSta
.
If you want to use AP-STA mode, use [new_ap_sta]
.