[−][src]Trait drone_core::reg::RwRegUnsync
Non-atomic operations for read-write register.
Required methods
pub fn modify<F>(&'a mut self, f: F) where
F: for<'b> FnOnce(&'b mut Self::Hold) -> &'b mut Self::Hold,
[src]
F: for<'b> FnOnce(&'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 non-atomic, thus it requires a mutable reference to the token.
See also modify_reg
.
pub fn modify_reg<F>(&'a mut self, f: F) where
F: for<'b> FnOnce(&'b Self, &'b mut Self::Val),
[src]
F: for<'b> FnOnce(&'b Self, &'b mut Self::Val),
Reads the value from the register memory, then passes a reference to
this register token and the value to the closure f
, then writes the
modified value into the register memory.
This operation is non-atomic, thus it requires a mutable reference to the token.
See also modify
.