#[non_exhaustive]pub struct WIFI<'a> { /* private fields */ }Expand description
WIFI peripheral singleton
Implementations§
Source§impl WIFI<'_>
impl WIFI<'_>
Sourcepub unsafe fn steal() -> Self
pub unsafe fn steal() -> Self
Unsafely creates an instance of this peripheral out of thin air.
§Safety
The caller must ensure that only one instance of this type is used at a time.
Sourcepub unsafe fn clone_unchecked(&self) -> Self
pub unsafe fn clone_unchecked(&self) -> Self
Unsafely clone this peripheral reference.
§Safety
The caller must ensure that only one instance of this type is used at a time.
Sourcepub fn reborrow(&mut self) -> WIFI<'_>
pub fn reborrow(&mut self) -> WIFI<'_>
Creates a new peripheral reference with a shorter lifetime.
Use this method to keep working with the peripheral after the driver that consumes it is dropped.
Sourcepub fn bind_bb_interrupt(&self, handler: InterruptHandler)
Available on crate feature unstable only.
pub fn bind_bb_interrupt(&self, handler: InterruptHandler)
unstable only.Binds an interrupt handler to the corresponding interrupt for this peripheral, and enables the interrupt.
§Stability
This API is marked as unstable and is only available when the unstable
crate feature is enabled. This comes with no stability guarantees, and could be changed
or removed at any time.
Sourcepub fn enable_bb_interrupt(&self, priority: Priority)
pub fn enable_bb_interrupt(&self, priority: Priority)
Enables the WIFI_BB peripheral interrupt on the given priority level.
A suitable interrupt handler must be set up before the first interrupt
is triggered; otherwise the default handler panics.
To set up an interrupt handler, use Self::bind_bb_interrupt or create a function that has the same (non-mangled) name as the interrupt to handle.
§Examples
use esp_hal::interrupt::Priority;
#[unsafe(no_mangle)]
unsafe extern "C" fn WIFI_BB() {
// do something
}
peripherals.WIFI.enable_bb_interrupt(Priority::Priority1);
peripherals.WIFI.disable_bb_interrupt_on_all_cores();Sourcepub fn disable_bb_interrupt(&self)
Available on crate feature unstable only.
pub fn disable_bb_interrupt(&self)
unstable only.Disables the WIFI_BB peripheral interrupt handler on the current CPU core.
This API is marked as unstable and is only available when the unstable
crate feature is enabled. This comes with no stability guarantees, and could be changed
or removed at any time.
Sourcepub fn disable_bb_interrupt_on_all_cores(&self)
pub fn disable_bb_interrupt_on_all_cores(&self)
Disables the WIFI_BB peripheral interrupt handler on all cores.
Sourcepub fn bind_mac_interrupt(&self, handler: InterruptHandler)
Available on crate feature unstable only.
pub fn bind_mac_interrupt(&self, handler: InterruptHandler)
unstable only.Binds an interrupt handler to the corresponding interrupt for this peripheral, and enables the interrupt.
§Stability
This API is marked as unstable and is only available when the unstable
crate feature is enabled. This comes with no stability guarantees, and could be changed
or removed at any time.
Sourcepub fn enable_mac_interrupt(&self, priority: Priority)
pub fn enable_mac_interrupt(&self, priority: Priority)
Enables the WIFI_MAC peripheral interrupt on the given priority level.
A suitable interrupt handler must be set up before the first interrupt
is triggered; otherwise the default handler panics.
To set up an interrupt handler, use Self::bind_mac_interrupt or create a function that has the same (non-mangled) name as the interrupt to handle.
§Examples
use esp_hal::interrupt::Priority;
#[unsafe(no_mangle)]
unsafe extern "C" fn WIFI_MAC() {
// do something
}
peripherals.WIFI.enable_mac_interrupt(Priority::Priority1);
peripherals.WIFI.disable_mac_interrupt_on_all_cores();Sourcepub fn disable_mac_interrupt(&self)
Available on crate feature unstable only.
pub fn disable_mac_interrupt(&self)
unstable only.Disables the WIFI_MAC peripheral interrupt handler on the current CPU core.
This API is marked as unstable and is only available when the unstable
crate feature is enabled. This comes with no stability guarantees, and could be changed
or removed at any time.
Sourcepub fn disable_mac_interrupt_on_all_cores(&self)
pub fn disable_mac_interrupt_on_all_cores(&self)
Disables the WIFI_MAC peripheral interrupt handler on all cores.
Sourcepub fn bind_modem_peri_timeout_interrupt(&self, handler: InterruptHandler)
Available on crate feature unstable only.
pub fn bind_modem_peri_timeout_interrupt(&self, handler: InterruptHandler)
unstable only.Binds an interrupt handler to the corresponding interrupt for this peripheral, and enables the interrupt.
§Stability
This API is marked as unstable and is only available when the unstable
crate feature is enabled. This comes with no stability guarantees, and could be changed
or removed at any time.
Sourcepub fn enable_modem_peri_timeout_interrupt(&self, priority: Priority)
pub fn enable_modem_peri_timeout_interrupt(&self, priority: Priority)
Enables the MODEM_PERI_TIMEOUT peripheral interrupt on the given priority level.
A suitable interrupt handler must be set up before the first interrupt
is triggered; otherwise the default handler panics.
To set up an interrupt handler, use Self::bind_modem_peri_timeout_interrupt or create a function that has the same (non-mangled) name as the interrupt to handle.
§Examples
use esp_hal::interrupt::Priority;
#[unsafe(no_mangle)]
unsafe extern "C" fn MODEM_PERI_TIMEOUT() {
// do something
}
peripherals.WIFI.enable_modem_peri_timeout_interrupt(Priority::Priority1);
peripherals.WIFI.disable_modem_peri_timeout_interrupt_on_all_cores();Sourcepub fn disable_modem_peri_timeout_interrupt(&self)
Available on crate feature unstable only.
pub fn disable_modem_peri_timeout_interrupt(&self)
unstable only.Disables the MODEM_PERI_TIMEOUT peripheral interrupt handler on the current CPU core.
This API is marked as unstable and is only available when the unstable
crate feature is enabled. This comes with no stability guarantees, and could be changed
or removed at any time.
Sourcepub fn disable_modem_peri_timeout_interrupt_on_all_cores(&self)
pub fn disable_modem_peri_timeout_interrupt_on_all_cores(&self)
Disables the MODEM_PERI_TIMEOUT peripheral interrupt handler on all cores.
Sourcepub fn bind_pwr_interrupt(&self, handler: InterruptHandler)
Available on crate feature unstable only.
pub fn bind_pwr_interrupt(&self, handler: InterruptHandler)
unstable only.Binds an interrupt handler to the corresponding interrupt for this peripheral, and enables the interrupt.
§Stability
This API is marked as unstable and is only available when the unstable
crate feature is enabled. This comes with no stability guarantees, and could be changed
or removed at any time.
Sourcepub fn enable_pwr_interrupt(&self, priority: Priority)
pub fn enable_pwr_interrupt(&self, priority: Priority)
Enables the WIFI_PWR peripheral interrupt on the given priority level.
A suitable interrupt handler must be set up before the first interrupt
is triggered; otherwise the default handler panics.
To set up an interrupt handler, use Self::bind_pwr_interrupt or create a function that has the same (non-mangled) name as the interrupt to handle.
§Examples
use esp_hal::interrupt::Priority;
#[unsafe(no_mangle)]
unsafe extern "C" fn WIFI_PWR() {
// do something
}
peripherals.WIFI.enable_pwr_interrupt(Priority::Priority1);
peripherals.WIFI.disable_pwr_interrupt_on_all_cores();Sourcepub fn disable_pwr_interrupt(&self)
Available on crate feature unstable only.
pub fn disable_pwr_interrupt(&self)
unstable only.Disables the WIFI_PWR peripheral interrupt handler on the current CPU core.
This API is marked as unstable and is only available when the unstable
crate feature is enabled. This comes with no stability guarantees, and could be changed
or removed at any time.
Sourcepub fn disable_pwr_interrupt_on_all_cores(&self)
pub fn disable_pwr_interrupt_on_all_cores(&self)
Disables the WIFI_PWR peripheral interrupt handler on all cores.