Struct avr_device::atmega328p::Peripherals

source ·
pub struct Peripherals {
Show 17 fields pub AC: AC, pub ADC: ADC, pub CPU: CPU, pub EEPROM: EEPROM, pub EXINT: EXINT, pub FUSE: FUSE, pub LOCKBIT: LOCKBIT, pub PORTB: PORTB, pub PORTC: PORTC, pub PORTD: PORTD, pub SPI: SPI, pub TC0: TC0, pub TC1: TC1, pub TC2: TC2, pub TWI: TWI, pub USART0: USART0, pub WDT: WDT,
}
Expand description

All the peripherals.

Fields§

§AC: AC

AC

§ADC: ADC

ADC

§CPU: CPU

CPU

§EEPROM: EEPROM

EEPROM

§EXINT: EXINT

EXINT

§FUSE: FUSE

FUSE

§LOCKBIT: LOCKBIT

LOCKBIT

§PORTB: PORTB

PORTB

§PORTC: PORTC

PORTC

§PORTD: PORTD

PORTD

§SPI: SPI

SPI

§TC0: TC0

TC0

§TC1: TC1

TC1

§TC2: TC2

TC2

§TWI: TWI

TWI

§USART0: USART0

USART0

§WDT: WDT

WDT

Implementations§

source§

impl Peripherals

source

pub fn take() -> Option<Self>

Returns all the peripherals once.

source

pub unsafe fn steal() -> Self

Unchecked version of Peripherals::take.

§Safety

Each of the returned peripherals must be used at most once.

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for T
where T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for T
where T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

source§

impl<T, U> Into<U> for T
where U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

source§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.