kernel::utilities::registers::interfaces

Trait ReadWriteable

Source
pub trait ReadWriteable {
    type T: UIntLike;
    type R: RegisterLongName;

    // Required method
    fn modify(&self, field: FieldValue<Self::T, Self::R>);
}
Expand description

Readable and Writeable register, over the same RegisterLongName

Register which supports both reading and setting a value.

This trait does not have to be implemented manually! It is automatically implemented for every type that is both Readable and Writeable, as long as Readable::R == Writeable::R (i.e. not for Aliased registers).

Required Associated Types§

Required Methods§

Source

fn modify(&self, field: FieldValue<Self::T, Self::R>)

Write the value of one or more fields, leaving the other fields unchanged

Implementors§

Source§

impl<T, R, S> ReadWriteable for S
where R: RegisterLongName, S: Readable<T = T, R = R> + Writeable<T = T, R = R>, T: UIntLike,

Source§

type T = T

Source§

type R = R