Skip to main content

Write

Trait Write 

Source
pub trait Write<T: UIntLike> {
    type Reg: RegisterLongName;

    const REG_WIDTH: usize;

    // Required methods
    fn set(&self, value: T);
    fn write(&self, field: FieldValue<T, Self::Reg>);
}
Expand description

Writeable register

This interface is analogous to the methods supported on tock_registers::registers::{WriteOnly, ReadWrite} types

It is automatically implemented for all BaseWriteableRegisters

Required Associated Constants§

Required Associated Types§

Source

type Reg: RegisterLongName

Required Methods§

Source

fn set(&self, value: T)

Set the raw register value

Source

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

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

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§

Source§

impl<R, T: UIntLike> Write<T> for R

Source§

const REG_WIDTH: usize = R::REG_WIDTH

Source§

type Reg = <R as BaseWriteableRegister<T>>::Reg