Struct svd_rs::peripheral::Peripheral[][src]

#[non_exhaustive]
pub struct Peripheral { pub name: String, pub display_name: Option<String>, pub version: Option<String>, pub description: Option<String>, pub group_name: Option<String>, pub base_address: u64, pub default_register_properties: RegisterProperties, pub address_block: Option<Vec<AddressBlock>>, pub interrupt: Vec<Interrupt>, pub registers: Option<Vec<RegisterCluster>>, pub derived_from: Option<String>, }
Expand description

A description of a peripheral in the device, describing, for example, the memory mappings.

Fields (Non-exhaustive)

This struct is marked as 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.
name: String

The string identifies the peripheral. Peripheral names are required to be unique for a device

display_name: Option<String>

Specifies a register name without the restrictions of an ANSI C identifier.

version: Option<String>

The string specifies the version of this peripheral description

description: Option<String>

The string provides an overview of the purpose and functionality of the peripheral

group_name: Option<String>

Assigns this peripheral to a group of peripherals. This is only used bye the System View

base_address: u64

Lowest address reserved or used by the peripheral

default_register_properties: RegisterProperties

Default properties for all registers

address_block: Option<Vec<AddressBlock>>

Specify an address range uniquely mapped to this peripheral

interrupt: Vec<Interrupt>

A peripheral can have multiple associated interrupts

registers: Option<Vec<RegisterCluster>>

Group to enclose register definitions. None indicates that the <registers> node is not present

derived_from: Option<String>

Specify the peripheral name from which to inherit data. Elements specified subsequently override inherited values

Implementations

Make a builder for Peripheral

Modify an existing Peripheral based on a builder.

Validate the Peripheral

returns iterator over all registers peripheral contains

returns mutable iterator over all registers peripheral contains

Trait Implementations

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

Formats the value using the given formatter. Read more

Performs the conversion.

This method tests for self and other values to be equal, and is used by ==. Read more

This method tests for !=.

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Performs the conversion.

Performs the conversion.

The resulting type after obtaining ownership.

Creates owned data from borrowed data, usually by cloning. Read more

🔬 This is a nightly-only experimental API. (toowned_clone_into)

recently added

Uses borrowed data to replace owned data, usually by cloning. Read more

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.