Struct gd32vf103_hal::backup::Tamper [−][src]
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
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
pub fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,