Skip to main content

Peripherals

Struct Peripherals 

Source
pub struct Peripherals {
Show 53 fields pub PFIC: Peri<'static, PFIC>, pub SYSTICK: Peri<'static, SYSTICK>, pub FLASH: Peri<'static, FLASH>, pub MCO: Peri<'static, MCO>, pub RCC: Peri<'static, RCC>, pub DMA1: Peri<'static, DMA1>, pub AFIO: Peri<'static, AFIO>, pub PA0: Peri<'static, PA0>, pub PA1: Peri<'static, PA1>, pub PA2: Peri<'static, PA2>, pub PA3: Peri<'static, PA3>, pub PA4: Peri<'static, PA4>, pub PA5: Peri<'static, PA5>, pub PA6: Peri<'static, PA6>, pub PA7: Peri<'static, PA7>, pub PC0: Peri<'static, PC0>, pub PC1: Peri<'static, PC1>, pub PC2: Peri<'static, PC2>, pub PC3: Peri<'static, PC3>, pub PC4: Peri<'static, PC4>, pub PC5: Peri<'static, PC5>, pub PC6: Peri<'static, PC6>, pub PC7: Peri<'static, PC7>, pub PD0: Peri<'static, PD0>, pub PD1: Peri<'static, PD1>, pub PD2: Peri<'static, PD2>, pub PD3: Peri<'static, PD3>, pub PD4: Peri<'static, PD4>, pub PD5: Peri<'static, PD5>, pub PD6: Peri<'static, PD6>, pub PD7: Peri<'static, PD7>, pub TIM1: Peri<'static, TIM1>, pub TIM2: Peri<'static, TIM2>, pub USART1: Peri<'static, USART1>, pub I2C1: Peri<'static, I2C1>, pub SPI1: Peri<'static, SPI1>, pub ADC1: Peri<'static, ADC1>, pub OPA: Peri<'static, OPA>, pub EXTI0: Peri<'static, EXTI0>, pub EXTI1: Peri<'static, EXTI1>, pub EXTI2: Peri<'static, EXTI2>, pub EXTI3: Peri<'static, EXTI3>, pub EXTI4: Peri<'static, EXTI4>, pub EXTI5: Peri<'static, EXTI5>, pub EXTI6: Peri<'static, EXTI6>, pub EXTI7: Peri<'static, EXTI7>, pub DMA1_CH1: Peri<'static, DMA1_CH1>, pub DMA1_CH2: Peri<'static, DMA1_CH2>, pub DMA1_CH3: Peri<'static, DMA1_CH3>, pub DMA1_CH4: Peri<'static, DMA1_CH4>, pub DMA1_CH5: Peri<'static, DMA1_CH5>, pub DMA1_CH6: Peri<'static, DMA1_CH6>, pub DMA1_CH7: Peri<'static, DMA1_CH7>,
}
Expand description

Struct containing all the peripheral singletons.

To obtain the peripherals, you must initialize the HAL, by calling crate::init.

Fields§

§PFIC: Peri<'static, PFIC>

PFIC peripheral

§SYSTICK: Peri<'static, SYSTICK>

SYSTICK peripheral

§FLASH: Peri<'static, FLASH>

FLASH peripheral

§MCO: Peri<'static, MCO>

MCO peripheral

§RCC: Peri<'static, RCC>

RCC peripheral

§DMA1: Peri<'static, DMA1>

DMA1 peripheral

§AFIO: Peri<'static, AFIO>

AFIO peripheral

§PA0: Peri<'static, PA0>

PA0 peripheral

§PA1: Peri<'static, PA1>

PA1 peripheral

§PA2: Peri<'static, PA2>

PA2 peripheral

§PA3: Peri<'static, PA3>

PA3 peripheral

§PA4: Peri<'static, PA4>

PA4 peripheral

§PA5: Peri<'static, PA5>

PA5 peripheral

§PA6: Peri<'static, PA6>

PA6 peripheral

§PA7: Peri<'static, PA7>

PA7 peripheral

§PC0: Peri<'static, PC0>

PC0 peripheral

§PC1: Peri<'static, PC1>

PC1 peripheral

§PC2: Peri<'static, PC2>

PC2 peripheral

§PC3: Peri<'static, PC3>

PC3 peripheral

§PC4: Peri<'static, PC4>

PC4 peripheral

§PC5: Peri<'static, PC5>

PC5 peripheral

§PC6: Peri<'static, PC6>

PC6 peripheral

§PC7: Peri<'static, PC7>

PC7 peripheral

§PD0: Peri<'static, PD0>

PD0 peripheral

§PD1: Peri<'static, PD1>

PD1 peripheral

§PD2: Peri<'static, PD2>

PD2 peripheral

§PD3: Peri<'static, PD3>

PD3 peripheral

§PD4: Peri<'static, PD4>

PD4 peripheral

§PD5: Peri<'static, PD5>

PD5 peripheral

§PD6: Peri<'static, PD6>

PD6 peripheral

§PD7: Peri<'static, PD7>

PD7 peripheral

§TIM1: Peri<'static, TIM1>

TIM1 peripheral

§TIM2: Peri<'static, TIM2>

TIM2 peripheral

§USART1: Peri<'static, USART1>

USART1 peripheral

§I2C1: Peri<'static, I2C1>

I2C1 peripheral

§SPI1: Peri<'static, SPI1>

SPI1 peripheral

§ADC1: Peri<'static, ADC1>

ADC1 peripheral

§OPA: Peri<'static, OPA>

OPA peripheral

§EXTI0: Peri<'static, EXTI0>

EXTI0 peripheral

§EXTI1: Peri<'static, EXTI1>

EXTI1 peripheral

§EXTI2: Peri<'static, EXTI2>

EXTI2 peripheral

§EXTI3: Peri<'static, EXTI3>

EXTI3 peripheral

§EXTI4: Peri<'static, EXTI4>

EXTI4 peripheral

§EXTI5: Peri<'static, EXTI5>

EXTI5 peripheral

§EXTI6: Peri<'static, EXTI6>

EXTI6 peripheral

§EXTI7: Peri<'static, EXTI7>

EXTI7 peripheral

§DMA1_CH1: Peri<'static, DMA1_CH1>

DMA1_CH1 peripheral

§DMA1_CH2: Peri<'static, DMA1_CH2>

DMA1_CH2 peripheral

§DMA1_CH3: Peri<'static, DMA1_CH3>

DMA1_CH3 peripheral

§DMA1_CH4: Peri<'static, DMA1_CH4>

DMA1_CH4 peripheral

§DMA1_CH5: Peri<'static, DMA1_CH5>

DMA1_CH5 peripheral

§DMA1_CH6: Peri<'static, DMA1_CH6>

DMA1_CH6 peripheral

§DMA1_CH7: Peri<'static, DMA1_CH7>

DMA1_CH7 peripheral

Implementations§

Source§

impl Peripherals

Source

pub unsafe fn steal() -> Self

Unsafely create an instance of this peripheral out of thin air.

§Safety

You must ensure that you’re only using one instance of this type at a time.

Auto Trait Implementations§

§

impl !UnwindSafe for Peripherals

§

impl Freeze for Peripherals

§

impl RefUnwindSafe for Peripherals

§

impl Send for Peripherals

§

impl Sync for Peripherals

§

impl Unpin for Peripherals

§

impl UnsafeUnpin for Peripherals

Blanket Implementations§

§

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

§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
§

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

§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
§

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

§

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

Mutably borrows from an owned value. Read more
§

impl<T> From<T> for T

§

fn from(t: T) -> T

Returns the argument unchanged.

§

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

§

fn into(self) -> U

Calls U::from(self).

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

§

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

§

type Error = Infallible

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

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

Performs the conversion.
§

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

§

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

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

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

Performs the conversion.