Trait tock_registers::interfaces::Writeable [−][src]
pub trait Writeable { type T: UIntLike; type R: RegisterLongName; fn set(&self, value: Self::T); fn write(&self, field: FieldValue<Self::T, Self::R>) { ... } fn modify_no_read(
&self,
original: LocalRegisterCopy<Self::T, Self::R>,
field: FieldValue<Self::T, Self::R>
) { ... } }
Expand description
Writeable register
Register which at least supports setting a value. Only
Writeable::set
must be implemented, as for other methods a
default implementation is provided.
A register that is both Readable
and Writeable
will also
automatically be ReadWriteable
, if the RegisterLongName
of
Readable
is the same as that of Writeable
(i.e. not for
Aliased
registers).
Associated Types
Required methods
Provided methods
fn write(&self, field: FieldValue<Self::T, Self::R>)
fn write(&self, field: FieldValue<Self::T, Self::R>)
Write the value of one or more fields, overwriting the other fields with zero
fn modify_no_read(
&self,
original: LocalRegisterCopy<Self::T, Self::R>,
field: FieldValue<Self::T, Self::R>
)
fn modify_no_read(
&self,
original: LocalRegisterCopy<Self::T, Self::R>,
field: FieldValue<Self::T, Self::R>
)
Write the value of one or more fields, maintaining the value of unchanged fields via a provided original value, rather than a register read.