Enable

Trait Enable 

Source
pub trait Enable: RccBus {
    // Required methods
    fn enable(rcc: &mut RCC);
    fn disable(rcc: &mut RCC);
    fn is_enabled() -> bool;

    // Provided methods
    fn is_disabled() -> bool { ... }
    unsafe fn enable_unchecked() { ... }
    unsafe fn disable_unchecked() { ... }
}
Expand description

Enable/disable peripheral

Required Methods§

Source

fn enable(rcc: &mut RCC)

Enables peripheral

Source

fn disable(rcc: &mut RCC)

Disables peripheral

Source

fn is_enabled() -> bool

Check if peripheral enabled

Provided Methods§

Source

fn is_disabled() -> bool

Check if peripheral disabled

Source

unsafe fn enable_unchecked()

§Safety

Enables peripheral. Takes access to RCC internally

Source

unsafe fn disable_unchecked()

§Safety

Disables peripheral. Takes access to RCC internally

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementors§

Source§

impl Enable for ADC1

Source§

impl Enable for ADC2

Source§

impl Enable for ADC3

Source§

impl Enable for CAN1

Source§

impl Enable for CAN2

Source§

impl Enable for CRC

Source§

impl Enable for DAC

Source§

impl Enable for DMA1

Source§

impl Enable for DMA2

Source§

impl Enable for DMA2D

Source§

impl Enable for FMC

Source§

impl Enable for GPIOA

Source§

impl Enable for GPIOB

Source§

impl Enable for GPIOC

Source§

impl Enable for GPIOD

Source§

impl Enable for GPIOE

Source§

impl Enable for GPIOF

Source§

impl Enable for GPIOG

Source§

impl Enable for GPIOH

Source§

impl Enable for GPIOI

Source§

impl Enable for GPIOJ

Source§

impl Enable for GPIOK

Source§

impl Enable for I2C1

Source§

impl Enable for I2C2

Source§

impl Enable for I2C3

Source§

impl Enable for LTDC

Source§

impl Enable for OTG_FS_GLOBAL

Source§

impl Enable for OTG_HS_GLOBAL

Source§

impl Enable for PWR

Source§

impl Enable for RNG

Source§

impl Enable for SAI

Source§

impl Enable for SDIO

Source§

impl Enable for SPI1

Source§

impl Enable for SPI2

Source§

impl Enable for SPI3

Source§

impl Enable for SPI4

Source§

impl Enable for SPI5

Source§

impl Enable for SPI6

Source§

impl Enable for SYSCFG

Source§

impl Enable for TIM1

Source§

impl Enable for TIM2

Source§

impl Enable for TIM3

Source§

impl Enable for TIM4

Source§

impl Enable for TIM5

Source§

impl Enable for TIM6

Source§

impl Enable for TIM7

Source§

impl Enable for TIM8

Source§

impl Enable for TIM9

Source§

impl Enable for TIM10

Source§

impl Enable for TIM11

Source§

impl Enable for TIM12

Source§

impl Enable for TIM13

Source§

impl Enable for TIM14

Source§

impl Enable for UART4

Source§

impl Enable for UART5

Source§

impl Enable for UART7

Source§

impl Enable for UART8

Source§

impl Enable for USART1

Source§

impl Enable for USART2

Source§

impl Enable for USART3

Source§

impl Enable for USART6