[][src]Trait ral::Register

pub trait Register {
    type RegisterType: Register;
    type ValueType: Copy + Not<Output = Self::ValueType> + BitAnd<Output = Self::ValueType> + BitOr<Output = Self::ValueType>;

    const MASK: Self::ValueType;
    const RESET_VALUE: Self::ValueType;

    fn get_bits(&self) -> Self::ValueType;
fn set_bits(&mut self, bits: Self::ValueType) -> &mut Self::RegisterType;
fn reset(&mut self) -> &mut Self::RegisterType;
fn read(&mut self) -> &mut Self::RegisterType;
fn write(&mut self) -> &mut Self::RegisterType; }

Associated Types

type RegisterType: Register

type ValueType: Copy + Not<Output = Self::ValueType> + BitAnd<Output = Self::ValueType> + BitOr<Output = Self::ValueType>

Loading content...

Associated Constants

const MASK: Self::ValueType

const RESET_VALUE: Self::ValueType

Loading content...

Required methods

fn get_bits(&self) -> Self::ValueType

Get value of the register as raw bits

fn set_bits(&mut self, bits: Self::ValueType) -> &mut Self::RegisterType

Set value of the register as raw bits

fn reset(&mut self) -> &mut Self::RegisterType

Reset value of the register to default

fn read(&mut self) -> &mut Self::RegisterType

Loads value from the register

fn write(&mut self) -> &mut Self::RegisterType

Writes value to the register

Loading content...

Implementors

Loading content...