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