Skip to main content

ReadWrite

Trait ReadWrite 

pub trait ReadWrite<T>: Read<T> + Write<T>
where T: UIntLike,
{ const REG_WIDTH: usize; // Required methods fn modify(&self, field: FieldValue<T, Self::Reg>); fn modify_no_read( &self, original: LocalRegisterCopy<T, Self::Reg>, field: FieldValue<T, Self::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§

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

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

fn modify_no_read( &self, original: LocalRegisterCopy<T, Self::Reg>, field: FieldValue<T, Self::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".

Implementors§

§

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