Struct drone_svd::Peripheral [−][src]
A peripheral of a device.
Fields (Non-exhaustive)
Struct {{ .. }} syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.derived_from: Option<String>The peripheral name from which to inherit data.
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: StringThe string identifies the peripheral.
description: Option<String>The string provides an overview of the purpose and functionality of the peripheral.
alternate_peripheral: Option<String>A peripheral redefining an address block needs to specify the name of the peripheral that is listed first in the description.
base_address: u32Lowest address reserved or used by the peripheral.
size: Option<u32>Default bit-width of any register contained in the peripheral.
reset_value: Option<u32>Default value for all registers in the peripheral at RESET.
access: Option<Access>Default access rights for all registers in the peripheral.
Implementations
impl Peripheral[src]
pub fn reg(&mut self, path: &str) -> &mut Register[src]
Returns a mutable reference to the register at the path path.
pub fn add_reg(&mut self, register: Register)[src]
Adds a new register register.
pub fn new_reg(&mut self, f: impl FnOnce(&mut Register))[src]
Adds a new register initialized by f.
pub fn remove_reg(&mut self, path: &str) -> Register[src]
Removes the register at the path path.
Trait Implementations
impl Clone for Peripheral[src]
fn clone(&self) -> Peripheral[src]
pub fn clone_from(&mut self, source: &Self)1.0.0[src]
impl Debug for Peripheral[src]
impl Default for Peripheral[src]
fn default() -> Peripheral[src]
impl<'de> Deserialize<'de> for Peripheral[src]
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error> where
__D: Deserializer<'de>, [src]
__D: Deserializer<'de>,
Auto Trait Implementations
impl RefUnwindSafe for Peripheral
impl Send for Peripheral
impl Sync for Peripheral
impl Unpin for Peripheral
impl UnwindSafe for Peripheral
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized, [src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized, [src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized, [src]
T: ?Sized,
pub fn borrow_mut(&mut self) -> &mut T[src]
impl<T> DeserializeOwned for T where
T: for<'de> Deserialize<'de>, [src]
T: for<'de> Deserialize<'de>,
impl<T> From<T> for T[src]
impl<T, U> Into<U> for T where
U: From<T>, [src]
U: From<T>,
impl<T> ToOwned for T where
T: Clone, [src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
pub fn to_owned(&self) -> T[src]
pub fn clone_into(&self, target: &mut T)[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>, [src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>, [src]
U: TryFrom<T>,