#[non_exhaustive]pub struct Device {Show 17 fields
pub vendor: Option<String>,
pub vendor_id: Option<String>,
pub name: String,
pub series: Option<String>,
pub version: String,
pub description: String,
pub license_text: Option<String>,
pub cpu: Option<Cpu>,
pub header_system_filename: Option<String>,
pub header_definitions_prefix: Option<String>,
pub address_unit_bits: u32,
pub width: u32,
pub default_register_properties: RegisterProperties,
pub peripherals: Vec<Peripheral>,
pub xmlns_xs: String,
pub no_namespace_schema_location: String,
pub schema_version: String,
}
Expand description
The top element in a SVD file. Describes information specific to a device.
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Struct { .. }
syntax; cannot be matched against without a wildcard ..
; and struct update syntax will not work.vendor: Option<String>
Specify the vendor of the device using the full name
vendor_id: Option<String>
Specify the vendor abbreviation without spaces or special characters
name: String
The string identifies the device or device series. Device names are required to be unique
series: Option<String>
Specify the name of the device series
version: String
Define the version of the SVD file
description: String
Describe the main features of the device (for example CPU, clock frequency, peripheral overview)
license_text: Option<String>
The text will be copied into the header section of the generated device header file and shall contain the legal disclaimer
cpu: Option<Cpu>
Describe the processor included in the device
header_system_filename: Option<String>
Specify the file name (without extension) of the device-specific system include file
header_definitions_prefix: Option<String>
This string is prepended to all type definition names generated in the CMSIS-Core device header file
address_unit_bits: u32
Define the number of data bits uniquely selected by each address
width: u32
Define the number of data bit-width of the maximum single data transfer supported by the bus infrastructure
default_register_properties: RegisterProperties
Default properties for all registers
peripherals: Vec<Peripheral>
Group to define peripherals
xmlns_xs: String
Specify the underlying XML schema to which the CMSIS-SVD schema is compliant.
no_namespace_schema_location: String
Specify the file path and file name of the CMSIS-SVD Schema
schema_version: String
Specify the compliant CMSIS-SVD schema version
Implementations§
source§impl Device
impl Device
sourcepub fn builder() -> DeviceBuilder
pub fn builder() -> DeviceBuilder
Make a builder for Device
sourcepub fn modify_from(
&mut self,
builder: DeviceBuilder,
lvl: ValidateLevel
) -> Result<(), SvdError>
pub fn modify_from( &mut self, builder: DeviceBuilder, lvl: ValidateLevel ) -> Result<(), SvdError>
sourcepub fn validate_all(&self, lvl: ValidateLevel) -> Result<(), SvdError>
pub fn validate_all(&self, lvl: ValidateLevel) -> Result<(), SvdError>
Validate the Device
recursively
sourcepub fn get_peripheral(&self, name: &str) -> Option<&Peripheral>
pub fn get_peripheral(&self, name: &str) -> Option<&Peripheral>
Get peripheral by name
sourcepub fn get_mut_peripheral(&mut self, name: &str) -> Option<&mut Peripheral>
pub fn get_mut_peripheral(&mut self, name: &str) -> Option<&mut Peripheral>
Get mutable peripheral by name