Struct ruspiro_mmio_register::ReadWrite [−][src]
pub struct ReadWrite<T: RegisterType> { /* fields omitted */ }
This struct allows read/write access to a register.
Implementations
impl ReadWrite<u8>
[src]
impl ReadWrite<u8>
[src]pub const fn new(addr: usize) -> Self
[src]
Create a new instance of the register access struct.
pub fn get(&self) -> u8
[src]
Read raw content of a register.
pub fn read(&self, field: RegisterField<u8>) -> u8
[src]
Read the value of a specific register field
pub fn read_value(&self, field: RegisterField<u8>) -> RegisterFieldValue<u8>
[src]
Read the value of the register into a RegisterFieldValue structure
pub fn set(&self, value: u8)
[src]
Write raw content value to the register.
pub fn write(&self, field: RegisterField<u8>, value: u8)
[src]
Write the value of a specific register field, this will set all bits not coverd by this field to 0 !
pub fn write_value(&self, fieldvalue: RegisterFieldValue<u8>)
[src]
Write the value of a given RegisterFieldValue to the register, this will set all bits not coverd by this field to 0 !
pub fn modify(&self, field: RegisterField<u8>, value: u8) -> u8
[src]
Udate a register field with a given value. The bits outside of this field remains untouched. The function returns the register raw value set has been set with this update
pub fn modify_value(&self, fieldvalue: RegisterFieldValue<u8>) -> u8
[src]
Udate a register field with a given register field value. The bits outside of this field remains untouched. The function returns the register raw value set has been set with this update
impl ReadWrite<u16>
[src]
impl ReadWrite<u16>
[src]pub const fn new(addr: usize) -> Self
[src]
Create a new instance of the register access struct.
pub fn get(&self) -> u16
[src]
Read raw content of a register.
pub fn read(&self, field: RegisterField<u16>) -> u16
[src]
Read the value of a specific register field
pub fn read_value(&self, field: RegisterField<u16>) -> RegisterFieldValue<u16>
[src]
Read the value of the register into a RegisterFieldValue structure
pub fn set(&self, value: u16)
[src]
Write raw content value to the register.
pub fn write(&self, field: RegisterField<u16>, value: u16)
[src]
Write the value of a specific register field, this will set all bits not coverd by this field to 0 !
pub fn write_value(&self, fieldvalue: RegisterFieldValue<u16>)
[src]
Write the value of a given RegisterFieldValue to the register, this will set all bits not coverd by this field to 0 !
pub fn modify(&self, field: RegisterField<u16>, value: u16) -> u16
[src]
Udate a register field with a given value. The bits outside of this field remains untouched. The function returns the register raw value set has been set with this update
pub fn modify_value(&self, fieldvalue: RegisterFieldValue<u16>) -> u16
[src]
Udate a register field with a given register field value. The bits outside of this field remains untouched. The function returns the register raw value set has been set with this update
impl ReadWrite<u32>
[src]
impl ReadWrite<u32>
[src]pub const fn new(addr: usize) -> Self
[src]
Create a new instance of the register access struct.
pub fn get(&self) -> u32
[src]
Read raw content of a register.
pub fn read(&self, field: RegisterField<u32>) -> u32
[src]
Read the value of a specific register field
pub fn read_value(&self, field: RegisterField<u32>) -> RegisterFieldValue<u32>
[src]
Read the value of the register into a RegisterFieldValue structure
pub fn set(&self, value: u32)
[src]
Write raw content value to the register.
pub fn write(&self, field: RegisterField<u32>, value: u32)
[src]
Write the value of a specific register field, this will set all bits not coverd by this field to 0 !
pub fn write_value(&self, fieldvalue: RegisterFieldValue<u32>)
[src]
Write the value of a given RegisterFieldValue to the register, this will set all bits not coverd by this field to 0 !
pub fn modify(&self, field: RegisterField<u32>, value: u32) -> u32
[src]
Udate a register field with a given value. The bits outside of this field remains untouched. The function returns the register raw value set has been set with this update
pub fn modify_value(&self, fieldvalue: RegisterFieldValue<u32>) -> u32
[src]
Udate a register field with a given register field value. The bits outside of this field remains untouched. The function returns the register raw value set has been set with this update
impl ReadWrite<u64>
[src]
impl ReadWrite<u64>
[src]pub const fn new(addr: usize) -> Self
[src]
Create a new instance of the register access struct.
pub fn get(&self) -> u64
[src]
Read raw content of a register.
pub fn read(&self, field: RegisterField<u64>) -> u64
[src]
Read the value of a specific register field
pub fn read_value(&self, field: RegisterField<u64>) -> RegisterFieldValue<u64>
[src]
Read the value of the register into a RegisterFieldValue structure
pub fn set(&self, value: u64)
[src]
Write raw content value to the register.
pub fn write(&self, field: RegisterField<u64>, value: u64)
[src]
Write the value of a specific register field, this will set all bits not coverd by this field to 0 !
pub fn write_value(&self, fieldvalue: RegisterFieldValue<u64>)
[src]
Write the value of a given RegisterFieldValue to the register, this will set all bits not coverd by this field to 0 !
pub fn modify(&self, field: RegisterField<u64>, value: u64) -> u64
[src]
Udate a register field with a given value. The bits outside of this field remains untouched. The function returns the register raw value set has been set with this update
pub fn modify_value(&self, fieldvalue: RegisterFieldValue<u64>) -> u64
[src]
Udate a register field with a given register field value. The bits outside of this field remains untouched. The function returns the register raw value set has been set with this update
Trait Implementations
impl<T: Clone + RegisterType> Clone for ReadWrite<T>
[src]
impl<T: Clone + RegisterType> Clone for ReadWrite<T>
[src]