pub struct Peripherals {
Show 18 fields pub MTB: MTB, pub WWDT: WWDT, pub MRT0: MRT0, pub WKT: WKT, pub SWM0: SWM0, pub PMU: PMU, pub ACOMP: ACOMP, pub FLASH_CTRL: FLASH_CTRL, pub IOCON: IOCON, pub SYSCON: SYSCON, pub I2C0: I2C0, pub SPI0: SPI0, pub USART0: USART0, pub USART1: USART1, pub CRC: CRC, pub SCT0: SCT0, pub GPIO: GPIO, pub PINT: PINT,
}
Expand description

All the peripherals

Fields§

§MTB: MTB

MTB

§WWDT: WWDT

WWDT

§MRT0: MRT0

MRT0

§WKT: WKT

WKT

§SWM0: SWM0

SWM0

§PMU: PMU

PMU

§ACOMP: ACOMP

ACOMP

§FLASH_CTRL: FLASH_CTRL

FLASH_CTRL

§IOCON: IOCON

IOCON

§SYSCON: SYSCON

SYSCON

§I2C0: I2C0

I2C0

§SPI0: SPI0

SPI0

§USART0: USART0

USART0

§USART1: USART1

USART1

§CRC: CRC

CRC

§SCT0: SCT0

SCT0

§GPIO: GPIO

GPIO

§PINT: PINT

PINT

Implementations§

Returns all the peripherals once

Unchecked version of Peripherals::take

Examples found in repository?
src/lpc810/mod.rs (line 669)
664
665
666
667
668
669
670
671
672
    pub fn take() -> Option<Self> {
        cortex_m::interrupt::free(|_| {
            if unsafe { DEVICE_PERIPHERALS } {
                None
            } else {
                Some(unsafe { Peripherals::steal() })
            }
        })
    }

Auto Trait Implementations§

Blanket Implementations§

Gets the TypeId of self. Read more
Immutably borrows from an owned value. Read more
Mutably borrows from an owned value. Read more

Returns the argument unchanged.

Calls U::from(self).

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

The type returned in the event of a conversion error.
Performs the conversion.
The type returned in the event of a conversion error.
Performs the conversion.