Peripherals

Struct Peripherals 

Source
pub struct Peripherals {
Show 37 fields pub adc: Adc, pub anactrl: Anactrl, pub casper: Casper, pub ctimer: Ctimers, pub dma: Dma, pub flash: Flash, pub flexcomm: Flexcomm, pub gint: Gint, pub gpio: Gpio, pub hashcrypt: Hashcrypt, pub inputmux: InputMux, pub iocon: Iocon, pub pint: Pint, pub pfr: Pfr, pub pmc: Pmc, pub prince: Prince, pub puf: Puf, pub rng: Rng, pub rtc: Rtc, pub syscon: Syscon, pub usbfs: Usbfs, pub usbhs: Usbhs, pub utick: Utick, pub CRC_ENGINE: CRC_ENGINE, pub FLASH_CMPA: FLASH_CMPA, pub FLASH_CFPA0: FLASH_CFPA0, pub SCT0: SCT0, pub SAU: SAU, pub AHB_SECURE_CTRL: AHB_SECURE_CTRL, pub CPUID: CPUID, pub DCB: DCB, pub DWT: DWT, pub MPU: MPU, pub NVIC: NVIC, pub SCB: SCB, pub wwdt: WWDT, pub SYST: SYST,
}
Expand description

This is the entry point to the HAL API.

Before you can do anything else, you need to get an instance of this struct, via hal::new or hal::steal.

Fields§

§adc: Adc

Analog-to-Digital Converter (ADC)

§anactrl: Anactrl

Analog control

§casper: Casper

Cryptographic Accelerator and Signal Processing Engine with RAM sharing

§ctimer: Ctimers

Standard counter/timer (CTIMER)

§dma: Dma

Direct memory access

§flash: Flash

Flash

§flexcomm: Flexcomm

Flexcomm Interface Serial Communication

§gint: Gint

Group GPIO Input Interrupt

§gpio: Gpio

General-purpose I/O (GPIO)

§hashcrypt: Hashcrypt

SHA and AES Engine

§inputmux: InputMux

Input multiplexer

§iocon: Iocon

I/O configuration

§pint: Pint

Pin Interrupt and Pattern Match

§pfr: Pfr

Protect flash region controller

§pmc: Pmc

Power configuration

§prince: Prince§puf: Puf§rng: Rng

Random number generator

§rtc: Rtc

Real time clock

§syscon: Syscon

System configuration

§usbfs: Usbfs

USB full-speed device or, not implemented, host

§usbhs: Usbhs

USB high-speed device or, not implemented, host

§utick: Utick

Micro-Tick Timer

§CRC_ENGINE: CRC_ENGINE

CRC engine - not HAL-ified.

§FLASH_CMPA: FLASH_CMPA§FLASH_CFPA0: FLASH_CFPA0§SCT0: SCT0

Stateful counter/timer (SCTIMER) - not HAL-ified.

§SAU: SAU

SAU - not HAL-ified.

§AHB_SECURE_CTRL: AHB_SECURE_CTRL

AHB_SECURE_CTRL - not HAL-ified.

§CPUID: CPUID

CPUID - core peripheral

§DCB: DCB

Debug Control Block (DCB) - core peripheral

§DWT: DWT

Data Watchpoint and Trace unit (DWT) - core peripheral

§MPU: MPU

Memory Protection Unit (MPU) - core peripheral

§NVIC: NVIC

Nested Vector Interrupt Controller (NVIC) - core peripheral

§SCB: SCB

System Control Block (SCB) - core peripheral

§wwdt: WWDT

Watchdog

§SYST: SYST

SysTick: System Timer - core peripheral

Implementations§

Source§

impl Peripherals

Source

pub fn take() -> Option<Self>

Source

pub unsafe fn steal() -> Self

§Safety

Steals peripherals, must not be used if one of the peripherals is already owned

Trait Implementations§

Source§

impl From<(Peripherals, Peripherals)> for Peripherals

Source§

fn from(raw: (Peripherals, CorePeripherals)) -> Self

Converts to this type from the input type.

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> Same for T

Source§

type Output = T

Should always be Self
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.