Function esp_wifi::wifi::new_with_config
source ยท pub fn new_with_config<'d, MODE: WifiDeviceMode>(
inited: &'d EspWifiController<'d>,
device: impl Peripheral<P = WIFI> + 'd,
config: MODE::Config,
) -> Result<(WifiDevice<'d, MODE>, WifiController<'d>), WifiError>
Expand description
Creates a new WifiDevice and WifiController in either AP or STA mode with the given configuration.
This function will panic if the configuration is not
Configuration::Client
or Configuration::AccessPoint
.
If you want to use AP-STA mode, use [new_ap_sta]
.