Trait drone_core::reg::RwRegUnsync[][src]

pub trait RwRegUnsync<'a>: RReg<Urt> + WRegUnsync<'a> + RegRef<'a, Urt> {
    fn modify<F>(&'a mut self, f: F)
    where
        F: for<'b> FnOnce(&'b mut Self::Hold) -> &'b mut Self::Hold
;
fn modify_reg<F>(&'a mut self, f: F)
    where
        F: for<'b> FnOnce(&'b Self, &'b mut Self::Val)
; }

Non-atomic operations for read-write register.

Required methods

fn modify<F>(&'a mut self, f: F) where
    F: for<'b> FnOnce(&'b mut Self::Hold) -> &'b mut Self::Hold
[src]

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.

fn modify_reg<F>(&'a mut self, f: F) where
    F: for<'b> FnOnce(&'b Self, &'b mut Self::Val), 
[src]

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.

Loading content...

Implementors

impl<'a, R> RwRegUnsync<'a> for R where
    R: RReg<Urt> + WRegUnsync<'a> + RegRef<'a, Urt>, 
[src]

Loading content...