pub trait Control {
type Registers: Debug + Display;
// Required methods
unsafe fn disable(&mut self);
unsafe fn enable(&mut self);
fn is_enabled(&self) -> bool;
fn register_handlers<H>(&mut self) -> Result<(), RegistrationError>
where H: Handlers<Self::Registers>;
// Provided method
fn enter_critical(&mut self) -> CriticalGuard<'_, Self> { ... }
}
Expand description
An interrupt controller for a platform.
Required Associated Types§
Required Methods§
sourceunsafe fn disable(&mut self)
unsafe fn disable(&mut self)
Disable all interrupts.
Safety
This may cause a fault if called when interrupts are already disabled (depending on the platform). It does not guarantee that interrupts will ever be unmasked.
sourceunsafe fn enable(&mut self)
unsafe fn enable(&mut self)
Enable all interrupts.
Safety
This may cause a fault if called when interrupts are already enabled (depending on the platform).
sourcefn is_enabled(&self) -> bool
fn is_enabled(&self) -> bool
Returns true
if interrupts are enabled.
fn register_handlers<H>(&mut self) -> Result<(), RegistrationError>
Provided Methods§
sourcefn enter_critical(&mut self) -> CriticalGuard<'_, Self>
fn enter_critical(&mut self) -> CriticalGuard<'_, Self>
Enter a critical section, returning a guard.
Object Safety§
This trait is not object safe.