pub struct Mcu {
pub device: Device,
pub variants: Vec<Variant>,
pub modules: Vec<Module>,
pub architecture: Architecture,
pub c_preprocessor_name: String,
}
Expand description
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§
Source§impl Mcu
impl Mcu
Sourcepub fn peripheral(&self, name: &str) -> Option<&Peripheral>
pub fn peripheral(&self, name: &str) -> Option<&Peripheral>
Gets a peripheral module by name.
Sourcepub fn register_groups<'a>(&'a self) -> impl Iterator<Item = &'a RegisterGroup>
pub fn register_groups<'a>(&'a self) -> impl Iterator<Item = &'a RegisterGroup>
Gets an iterator over all register groups.
Sourcepub fn registers<'a>(&'a self) -> impl Iterator<Item = &'a Register>
pub fn registers<'a>(&'a self) -> impl Iterator<Item = &'a Register>
Gets an iterator over all registers.
Sourcepub fn port_peripheral(&self) -> &Peripheral
pub fn port_peripheral(&self) -> &Peripheral
Gets the port peripheral.
Sourcepub fn port_module(&self) -> &Module
pub fn port_module(&self) -> &Module
Gets the port module.
Trait Implementations§
Source§impl PartialOrd for Mcu
impl PartialOrd for Mcu
impl StructuralPartialEq for Mcu
Auto Trait Implementations§
impl Freeze for Mcu
impl RefUnwindSafe for Mcu
impl Send for Mcu
impl Sync for Mcu
impl Unpin for Mcu
impl UnwindSafe for Mcu
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more