[][src]Struct avr_mcu::Mcu

pub struct Mcu {
    pub device: Device,
    pub variants: Vec<Variant>,
    pub modules: Vec<Module>,
    pub architecture: Architecture,
    pub c_preprocessor_name: String,
}

A microcontroller with one or more variants.

Fields

device: Device

Information about the microcontroller itself.

variants: Vec<Variant>

The different variants the mcu can come in.

modules: Vec<Module>

The modules built into the mcu package.

architecture: Architecture

The family that the mcu belongs to.

c_preprocessor_name: String

The C preprocessor name.

Implementations

impl Mcu[src]

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

Gets a peripheral module by name.

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

Gets a module by name.

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

Gets an iterator over all register groups.

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

Gets an iterator over all registers.

pub fn port(&self, letter: char) -> Port<'_>[src]

Gets a port by letter.

pub fn port_peripheral(&self) -> &Peripheral[src]

Gets the port peripheral.

pub fn port_module(&self) -> &Module[src]

Gets the port module.

Trait Implementations

impl Clone for Mcu[src]

impl Debug for Mcu[src]

impl PartialEq<Mcu> for Mcu[src]

impl PartialOrd<Mcu> for Mcu[src]

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