[][src]Struct avr_mcu::Peripheral

pub struct Peripheral {
    pub name: String,
    pub instances: Vec<Instance>,
}

An on-board peripheral, such as an IO port.

Fields

name: String

The name of the peripheral, for example, PORT.

instances: Vec<Instance>

A list of instances where the peripheral is used.

As an example, if the peripheral is an IO port, then the instance list would list all PORT instances, such as PORTA and PORTB.

Implementations

impl Peripheral[src]

pub fn instance(&self, name: &str) -> Option<&Instance>[src]

Gets an instance by name.

pub fn signals<'a>(&'a self) -> impl Iterator<Item = &'a Signal>[src]

Gets an iterator over all signals that the peripheral uses.

pub fn instance_signal_with_pad(
    &self,
    pad: &str
) -> Option<(&Instance, &Signal)>
[src]

Trait Implementations

impl Clone for Peripheral[src]

impl Debug for Peripheral[src]

impl Eq for Peripheral[src]

impl Hash for Peripheral[src]

impl PartialEq<Peripheral> for Peripheral[src]

impl PartialOrd<Peripheral> for Peripheral[src]

impl StructuralEq for Peripheral[src]

impl StructuralPartialEq for Peripheral[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.