Struct volatile_register::RW
[−]
[src]
pub struct RW<T> where
T: Copy, { /* fields omitted */ }
Read-Write register
Methods
impl<T> RW<T> where
T: Copy,
[src]
T: Copy,
pub unsafe fn modify<F>(&self, f: F) where
F: FnOnce(T) -> T,
[src]
F: FnOnce(T) -> T,
Performs a read-modify-write operation
NOTE: unsafe
because writes to a register are side effectful
pub fn read(&self) -> T
[src]
Reads the value of the register
pub unsafe fn write(&self, value: T)
[src]
Writes a value
into the register
NOTE: unsafe
because writes to a register are side effectful