new

Function new 

Source
pub fn new<'d>(
    device: WIFI<'d>,
    config: ControllerConfig,
) -> Result<(WifiController<'d>, Interfaces<'d>), WifiError>
Available on crate feature wifi only.
Expand description

Create a Wi-Fi controller and it’s associated interfaces. The default initial configuration is [Config::Station(StationConfig::default())].

Dropping the controller will deinitialize / stop Wi-Fi.

Make sure to not call this function while interrupts are disabled, or IEEE 802.15.4 is currently in use.

§Example

let (controller, interfaces) = esp_radio::wifi::new(peripherals.WIFI, Default::default())?;