[−][src]Trait drone_cortex_m::reg::RwRegAtomic
Atomic operations for read-write register.
Required methods
fn modify<F>(&'a self, f: F) where
F: for<'b> Fn(&'b mut Self::Hold) -> &'b mut Self::Hold,
[−]
F: for<'b> Fn(&'b mut Self::Hold) -> &'b mut Self::Hold,
Reads the value from the register memory, then passes the value to the
closure f
, then writes the result of the closure back to the register
memory.
This operation is atomic, it repeats itself in case it was interrupted
in the middle. Thus the closure f
may be called multiple times.