[][src]Trait drone_cortex_m::reg::field::WRwRegFieldAtomic

pub trait WRwRegFieldAtomic<T: RegAtomic> where
    Self: WWRegField<T>,
    Self::Reg: RReg<T> + WReg<T>, 
{ fn modify<F>(&self, f: F)
    where
        F: Fn(&mut <Self::Reg as Reg<T>>::Val)
; }

Atomic operations for writable field of read-write register.

Required methods

fn modify<F>(&self, f: F) where
    F: Fn(&mut <Self::Reg as Reg<T>>::Val), 

Reads the value from the register memory, then passes the value to the closure f, then writes the modified value 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.

Loading content...

Implementors

impl<T, R> WRwRegFieldAtomic<T> for R where
    T: RegAtomic,
    R: WWRegField<T>,
    R::Reg: RReg<T> + WReg<T>,
    <<R::Reg as Reg<T>>::Val as Bitfield>::Bits: AtomicBits, 
[src]

Loading content...