pub trait ProtectedModify<T: Copy> {
// Required method
fn protected_modify(&self, f: impl FnOnce(&mut T));
// Provided method
fn is_protected(&self) -> bool { ... }
}Expand description
Provides a function to disable write protection for a single modify operation on a register.
Required Methods§
Sourcefn protected_modify(&self, f: impl FnOnce(&mut T))
fn protected_modify(&self, f: impl FnOnce(&mut T))
Performs a modify operation on a register, disabling WP before and enabling it after.
Provided Methods§
Sourcefn is_protected(&self) -> bool
fn is_protected(&self) -> bool
§Returns
trueif this register is currently write protected.
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 ProtectedModify<Icmr3> for Reg<Icmr3, RW>
Available on iic only.
impl ProtectedModify<Icmr3> for Reg<Icmr3, RW>
Available on
iic only.