Struct drone_svd::Register[][src]

#[non_exhaustive]pub struct Register {
    pub dim: Option<u32>,
    pub dim_increment: Option<u32>,
    pub name: String,
    pub description: String,
    pub alternate_register: Option<String>,
    pub address_offset: u32,
    pub size: Option<u32>,
    pub access: Option<Access>,
    pub reset_value: Option<u32>,
    // some fields omitted
}

The description of a register.

Fields (Non-exhaustive)

Non-exhaustive structs could have additional fields added in future. Therefore, non-exhaustive structs cannot be constructed in external crates using the traditional Struct {{ .. }} syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.
dim: Option<u32>

Define the number of elements in an array.

dim_increment: Option<u32>

Specify the address increment, in Bytes, between two neighboring array members in the address map.

name: String

String to identify the register.

description: String

String describing the details of the register.

alternate_register: Option<String>

This tag can reference a register that has been defined above to current location in the description and that describes the memory location already.

address_offset: u32

The address offset relative to the enclosing element.

size: Option<u32>

The bit-width of the register.

access: Option<Access>

The access rights for the register.

reset_value: Option<u32>

The default value for the register at RESET.

Implementations

impl Register[src]

pub fn field(&mut self, name: &str) -> &mut Field[src]

Returns a mutable reference to the field with name name.

pub fn add_field(&mut self, field: Field)[src]

Adds a new field field.

pub fn new_field(&mut self, f: impl FnOnce(&mut Field))[src]

Adds a new field initialized by f.

pub fn remove_field(&mut self, name: &str) -> Field[src]

Removes the field with name name.

Trait Implementations

impl Clone for Register[src]

impl Debug for Register[src]

impl Default for Register[src]

impl<'de> Deserialize<'de> for Register[src]

Auto Trait Implementations

impl RefUnwindSafe for Register

impl Send for Register

impl Sync for Register

impl Unpin for Register

impl UnwindSafe for Register

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> DeserializeOwned for T where
    T: for<'de> Deserialize<'de>, 
[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.