Struct gd32vf103_hal::backup::Tamper[][src]

pub struct Tamper { /* fields omitted */ }

Tamper event monitor

todo: detailed doc & module verify

Implementations

impl Tamper[src]

pub fn enable(&mut self)[src]

Enable temper detection.

After enabled the TAMPER pin is dedicated for Backup Reset function. The active level on the TAMPER pin resets all data of the BKP_DATAx registers.

Ref: Section 4.4.3, the User Manual

pub fn disable(&mut self)[src]

Disable temper detection.

After disabled, the TAMPER pin is free for GPIO functions.

pub fn set_pin_active_high(&mut self)[src]

Set the TAMPER pin to active high. The TAMPER pin defaults to active high after reset.

Ref: Section 4.4.3, the User Manual

pub fn set_pin_active_low(&mut self)[src]

Set the TAMPER pin to active low. The TAMPER pin defaults to active high after reset.

Ref: Section 4.4.3, the User Manual

pub fn check_event(&self) -> bool[src]

Check the tamper event flag by reading from TEF register bit.

pub fn clear_event_bit(&mut self)[src]

Clear the tamper interrupt flag bit by writing 1 to TER register bit.

pub fn enable_interrupt(&mut self)[src]

Enable the tamper interrupt by setting the Tamper interrupt enable (TPIE) register bit.

pub fn disable_interrupt(&mut self)[src]

Disable the tamper interrupt by clearing the Tamper interrupt enable (TPIE) register bit.

pub fn check_interrupt(&self) -> bool[src]

Check the tamper interrupt flag by reading from TIF register bit.

pub fn clear_interrupt_bit(&mut self)[src]

Clear the tamper interrupt flag bit by writing 1 to TIR register bit.

Auto Trait Implementations

impl Send for Tamper

impl Sync for Tamper

impl Unpin for Tamper

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

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

The type returned in the event of a conversion error.