pub struct Wifi<B, C> { /* private fields */ }
Expand description
Base type for controlling an ESP32-WROOM NINA firmware-based WiFi board.
Implementations§
Source§impl<S, C> Wifi<S, C>
impl<S, C> Wifi<S, C>
Sourcepub fn init<D: DelayMs<u16>>(
spi: S,
esp32_control_pins: C,
delay: &mut D,
) -> Result<Wifi<S, C>, Error>
pub fn init<D: DelayMs<u16>>( spi: S, esp32_control_pins: C, delay: &mut D, ) -> Result<Wifi<S, C>, Error>
Initialize the ESP32-WROOM WiFi device. Call this function to put the connected ESP32-WROOM device in a known good state to accept commands.
Sourcepub fn firmware_version(&mut self) -> Result<FirmwareVersion, Error>
pub fn firmware_version(&mut self) -> Result<FirmwareVersion, Error>
Retrieve the NINA firmware version contained on the connected ESP32-WROOM device (e.g. 1.7.4).
Sourcepub fn join(&mut self, ssid: &str, passphrase: &str) -> Result<(), Error>
pub fn join(&mut self, ssid: &str, passphrase: &str) -> Result<(), Error>
Join a WiFi network given an SSID and a Passphrase.
Sourcepub fn get_connection_status(&mut self) -> Result<ConnectionStatus, Error>
pub fn get_connection_status(&mut self) -> Result<ConnectionStatus, Error>
Retrieve the current WiFi network ConnectionStatus
.
Sourcepub fn set_dns(
&mut self,
dns1: IpAddress,
dns2: Option<IpAddress>,
) -> Result<(), Error>
pub fn set_dns( &mut self, dns1: IpAddress, dns2: Option<IpAddress>, ) -> Result<(), Error>
Set 1 or 2 DNS servers that are used for network hostname resolution.
Trait Implementations§
Auto Trait Implementations§
impl<B, C> !Freeze for Wifi<B, C>
impl<B, C> !RefUnwindSafe for Wifi<B, C>
impl<B, C> Send for Wifi<B, C>
impl<B, C> !Sync for Wifi<B, C>
impl<B, C> Unpin for Wifi<B, C>
impl<B, C> UnwindSafe for Wifi<B, C>where
C: UnwindSafe,
B: UnwindSafe,
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more