Trait ReadWrite

Source
pub trait ReadWrite<T: UIntLike>: Read<T> + Write<T> {
    const REG_WIDTH: usize;

    // Required methods
    fn modify(&self, field: FieldValue<T, <Self as Read<T>>::Reg>);
    fn modify_no_read(
        &self,
        original: LocalRegisterCopy<T, <Self as Read<T>>::Reg>,
        field: FieldValue<T, <Self as Read<T>>::Reg>,
    );
}
Expand description

Readable and writable register

This interface is analogous to the methods supported on tock_registers::registers::ReadWrite types

It is automatically implemented for all types that are both BaseReadableRegister and BaseWriteableRegisters

Required Associated Constants§

Required Methods§

Source

fn modify(&self, field: FieldValue<T, <Self as Read<T>>::Reg>)

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

Source

fn modify_no_read( &self, original: LocalRegisterCopy<T, <Self as Read<T>>::Reg>, field: FieldValue<T, <Self as Read<T>>::Reg>, )

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

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementors§

Source§

impl<R, T: UIntLike> ReadWrite<T> for R
where R: Read<T> + Write<T>,