esp_wifi::wifi

Struct WifiDevice

Source
pub struct WifiDevice<'d, MODE: WifiDeviceMode> { /* private fields */ }
Expand description

A wifi device implementing smoltcp’s Device trait.

Implementations§

Source§

impl<'d, MODE: WifiDeviceMode> WifiDevice<'d, MODE>

Source

pub fn mac_address(&self) -> [u8; 6]

Retrieves the MAC address of the Wi-Fi device.

Trait Implementations§

Source§

impl<MODE: WifiDeviceMode> Device for WifiDevice<'_, MODE>

Source§

type RxToken<'a> = WifiRxToken<MODE> where Self: 'a

Source§

type TxToken<'a> = WifiTxToken<MODE> where Self: 'a

Source§

fn receive( &mut self, _instant: Instant, ) -> Option<(Self::RxToken<'_>, Self::TxToken<'_>)>

Construct a token pair consisting of one receive token and one transmit token. Read more
Source§

fn transmit(&mut self, _instant: Instant) -> Option<Self::TxToken<'_>>

Construct a transmit token. Read more
Source§

fn capabilities(&self) -> DeviceCapabilities

Get a description of device capabilities.
Source§

impl<MODE: WifiDeviceMode> Driver for WifiDevice<'_, MODE>

Source§

type RxToken<'a> = WifiRxToken<MODE> where Self: 'a

A token to receive a single network packet.
Source§

type TxToken<'a> = WifiTxToken<MODE> where Self: 'a

A token to transmit a single network packet.
Source§

fn receive( &mut self, cx: &mut Context<'_>, ) -> Option<(Self::RxToken<'_>, Self::TxToken<'_>)>

Construct a token pair consisting of one receive token and one transmit token. Read more
Source§

fn transmit(&mut self, cx: &mut Context<'_>) -> Option<Self::TxToken<'_>>

Construct a transmit token. Read more
Get the link state. Read more
Source§

fn capabilities(&self) -> Capabilities

Get a description of device capabilities.
Source§

fn hardware_address(&self) -> HardwareAddress

Get the device’s hardware address. Read more

Auto Trait Implementations§

§

impl<'d, MODE> Freeze for WifiDevice<'d, MODE>
where MODE: Freeze,

§

impl<'d, MODE> RefUnwindSafe for WifiDevice<'d, MODE>
where MODE: RefUnwindSafe,

§

impl<'d, MODE> Send for WifiDevice<'d, MODE>
where MODE: Send,

§

impl<'d, MODE> Sync for WifiDevice<'d, MODE>
where MODE: Sync,

§

impl<'d, MODE> Unpin for WifiDevice<'d, MODE>
where MODE: Unpin,

§

impl<'d, MODE> !UnwindSafe for WifiDevice<'d, MODE>

Blanket Implementations§

§

impl<T> Any for T
where T: 'static + ?Sized,

§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
§

impl<T> Borrow<T> for T
where T: ?Sized,

§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
§

impl<T> BorrowMut<T> for T
where T: ?Sized,

§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
§

impl<T> From<T> for T

§

fn from(t: T) -> T

Returns the argument unchanged.

§

impl<T, U> Into<U> for T
where U: From<T>,

§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of [From]<T> for U chooses to do.

§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.