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§