[][src]Struct svd_expander::RegisterSpec

pub struct RegisterSpec {
    pub name: String,
    pub description: Option<String>,
    pub address_offset: u32,
    pub size: Option<u32>,
    pub reset_value: Option<u32>,
    pub reset_mask: Option<u32>,
    pub access: Option<AccessSpec>,
    pub fields: Vec<FieldSpec>,
    pub default_field_write_constraint: Option<WriteConstraintSpec>,
    pub default_field_modified_write_values: Option<ModifiedWriteValuesSpec>,
    // some fields omitted
}

Describes a register. Registers may be top-level constructs of a peripheral or may be nested within register clusters.

Fields

name: String

Name that identifies the register. Must be unique within the scope of its parent.

description: Option<String>

Description of the details of the register. May describe its purpose, operation, and effects on other parts of the device.

address_offset: u32

Register's starting address relative to its parent.

size: Option<u32>

The bit width of the register.

reset_value: Option<u32>

The value of the register after reset.

reset_mask: Option<u32>

The bits of the register that have a defined reset value.

access: Option<AccessSpec>

The access rights of the register.

fields: Vec<FieldSpec>

The fields that exist on the register.

default_field_write_constraint: Option<WriteConstraintSpec>

Default write constraints for fields on this register

default_field_modified_write_values: Option<ModifiedWriteValuesSpec>

Default modified write values for fields on this register

Implementations

impl RegisterSpec[src]

pub fn derived_from_path(&self) -> Option<String>[src]

The full path to the register that this register inherits from (if any).

pub fn path(&self) -> String[src]

The full path to this register.

pub fn iter_enumerated_value_sets<'a>(
    &'a self
) -> Box<dyn Iterator<Item = &EnumeratedValueSetSpec> + 'a>
[src]

Iterates all the enumerated value sets on all the fields in this register.

Trait Implementations

impl Clone for RegisterSpec[src]

impl Debug for RegisterSpec[src]

impl PartialEq<RegisterSpec> for RegisterSpec[src]

impl StructuralPartialEq for RegisterSpec[src]

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.