pub fn new_with_mode<'d, MODE: WifiDeviceMode>(
inited: &'d EspWifiController<'d>,
device: impl Peripheral<P = WIFI> + 'd,
_mode: MODE,
) -> Result<(WifiDevice<'d, MODE>, 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]
.