Skip to main content

ProtectedPeripheral

Trait ProtectedPeripheral 

Source
pub trait ProtectedPeripheral {
    // Required methods
    fn is_protected(&self) -> bool;
    fn protected_write<F>(&self, func: F)
       where F: Fn();
}
Expand description

Manages write protection at the peripheral level.

Required Methods§

Source

fn is_protected(&self) -> bool

§Returns
  • true if this peripheral is currently write protected.
Source

fn protected_write<F>(&self, func: F)
where F: Fn(),

Disables write protection for a peripheral for the duration of the closure.

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementations on Foreign Types§

Source§

impl ProtectedPeripheral for Gpt

Available on gpt only.

Note that write protection is disabled by default for timers.

Source§

fn protected_write<F>(&self, func: F)
where F: Fn(),

Source§

fn is_protected(&self) -> bool

Source§

impl ProtectedPeripheral for System

Source§

fn protected_write<F>(&self, func: F)
where F: Fn(),

Source§

fn is_protected(&self) -> bool

Implementors§