pub trait ProtectedPeripheral {
// Required methods
fn is_protected(&self) -> bool;
fn protected_write<F>(&self, func: F)
where F: Fn();
}Expand description
Manages write protection at the peripheral level.
Required Methods§
Sourcefn is_protected(&self) -> bool
fn is_protected(&self) -> bool
§Returns
trueif this peripheral is currently write protected.
Sourcefn protected_write<F>(&self, func: F)where
F: Fn(),
fn protected_write<F>(&self, func: F)where
F: Fn(),
Disables write protection for a peripheral for the duration of the closure.
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".
Implementations on Foreign Types§
Source§impl ProtectedPeripheral for Gpt
Available on gpt only.Note that write protection is disabled by default for timers.
impl ProtectedPeripheral for Gpt
Available on
gpt only.Note that write protection is disabled by default for timers.