LVWarn

Struct LVWarn 

Source
pub struct LVWarn<State, Range> { /* private fields */ }
Expand description

Interface for the low voltage warning / interrupt

Implementations§

Source§

impl<State, Range> LVWarn<State, Range>

Source

pub fn into_high_range(self) -> LVWarn<State, _4v3>

Set to high range

Called by PMC range function. passes knowledge of the higher level range here. There is probably a better way to do this

Source

pub fn into_low_range(self) -> LVWarn<State, _2v6>

Set to low range

Called by PMC range function. passes knowledge of the lower level range here. There is probably a better way to do this

Source

pub fn warning(&self) -> bool

Check for warning

Source

pub fn clear_warning(&self)

Acknowledge warning

Source§

impl<Range> LVWarn<Flag, Range>

Source

pub fn into_interrupt(self) -> LVWarn<Interrupt, Range>

Interrupt on Low Voltage Warning

Source§

impl<Range> LVWarn<Interrupt, Range>

Source

pub fn into_flag(self) -> LVWarn<Flag, Range>

Disable Low Voltage Warning interrupt.

Source§

impl<State> LVWarn<State, _2v6>

Source

pub fn set_threshold(&self, threshold: LvwLow)

adjust warning threshold

The enum argument type is only valid in low range.

Source

pub fn threshold(&self) -> Result<LvwLow, Error>

get the current warning threshold

Source§

impl<State> LVWarn<State, _4v3>

Source

pub fn set_threshold(&self, threshold: LvwHigh)

adjust warning threshold

The enum argument type is only valid in high range.

Source

pub fn threshold(&self) -> Result<LvwHigh, Error>

get the current warning threshold

Auto Trait Implementations§

§

impl<State, Range> Freeze for LVWarn<State, Range>

§

impl<State, Range> RefUnwindSafe for LVWarn<State, Range>
where State: RefUnwindSafe, Range: RefUnwindSafe,

§

impl<State, Range> Send for LVWarn<State, Range>
where State: Send, Range: Send,

§

impl<State, Range> Sync for LVWarn<State, Range>
where State: Sync, Range: Sync,

§

impl<State, Range> Unpin for LVWarn<State, Range>
where State: Unpin, Range: Unpin,

§

impl<State, Range> UnwindSafe for LVWarn<State, Range>
where State: UnwindSafe, Range: UnwindSafe,

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

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

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.