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).

Required Associated Types

Required Methods

Set the raw register value

Provided Methods

Write the value of one or more fields, overwriting the other fields with zero

Write the value of one or more fields, maintaining the value of unchanged fields via a provided original value, rather than a register read.

Implementors