#[non_exhaustive]pub struct SoftwareInterrupt<'d, const NUM: u8> { /* private fields */ }
Available on crate feature
unstable
only.Expand description
A software interrupt can be triggered by software.
Implementations§
Source§impl<const NUM: u8> SoftwareInterrupt<'_, NUM>
impl<const NUM: u8> SoftwareInterrupt<'_, NUM>
Sourcepub unsafe fn steal() -> Self
pub unsafe fn steal() -> Self
Unsafely create an instance of this peripheral out of thin air.
§Safety
You must ensure that you’re only using one instance of this type at a time.
Sourcepub fn reborrow(&mut self) -> SoftwareInterrupt<'_, NUM>
pub fn reborrow(&mut self) -> SoftwareInterrupt<'_, NUM>
Creates a new peripheral reference with a shorter lifetime.
Use this method if you would like to keep working with the peripheral after you dropped the driver that consumes this.
Sourcepub fn set_interrupt_handler(&mut self, handler: InterruptHandler)
pub fn set_interrupt_handler(&mut self, handler: InterruptHandler)
Sets the interrupt handler for this software-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.
Trait Implementations§
Source§impl<const NUM: u8> InterruptConfigurable for SoftwareInterrupt<'_, NUM>
impl<const NUM: u8> InterruptConfigurable for SoftwareInterrupt<'_, NUM>
Source§fn set_interrupt_handler(&mut self, handler: InterruptHandler)
fn set_interrupt_handler(&mut self, handler: InterruptHandler)
Registers an interrupt handler for the peripheral on the current core. Read more