pub struct PowerStatus { /* private fields */ }Expand description
Indicates the input power source status (ACIN, VBUS), battery current direction, and other power-related conditions.
Implementations§
Source§impl PowerStatus
impl PowerStatus
Sourcepub fn acin_present(&self) -> bool
pub fn acin_present(&self) -> bool
Read the acin_present field of the register.
ACIN physical presence status (true: voltage detected, false: no voltage detected).
Sourcepub fn acin_usable(&self) -> bool
pub fn acin_usable(&self) -> bool
Read the acin_usable field of the register.
ACIN usability status (true: ACIN voltage is valid for system use, false: ACIN voltage is not valid/sufficient).
Sourcepub fn vbus_present(&self) -> bool
pub fn vbus_present(&self) -> bool
Read the vbus_present field of the register.
VBUS physical presence status (true: voltage detected, false: no voltage detected).
Sourcepub fn vbus_usable(&self) -> bool
pub fn vbus_usable(&self) -> bool
Read the vbus_usable field of the register.
VBUS usability status (true: VBUS voltage is valid for system use, false: VBUS voltage is not valid/sufficient).
Sourcepub fn vbus_voltage_above_vhold_when_connected(&self) -> bool
pub fn vbus_voltage_above_vhold_when_connected(&self) -> bool
Read the vbus_voltage_above_vhold_when_connected field of the register.
Indicates if VBUS voltage was greater than VHOLD when VBUS was connected (true: VBUS > VHOLD, false: VBUS <= VHOLD or not applicable).
Sourcepub fn battery_flow(&self) -> BatteryFlowDirection
pub fn battery_flow(&self) -> BatteryFlowDirection
Read the battery_flow field of the register.
Battery current direction.
Sourcepub fn acin_and_vbus_inputs_shorted_on_pcb(&self) -> bool
pub fn acin_and_vbus_inputs_shorted_on_pcb(&self) -> bool
Read the acin_and_vbus_inputs_shorted_on_pcb field of the register.
Indicates if ACIN and VBUS inputs are short-circuited on the PCB (true: short-circuited detected, false: no short-circuit).
Sourcepub fn boot_source_was_acin_or_vbus(&self) -> bool
pub fn boot_source_was_acin_or_vbus(&self) -> bool
Read the boot_source_was_acin_or_vbus field of the register.
Indicates if the boot-up power source was ACIN or VBUS (true: boot from ACIN/VBUS, false: boot from Battery or other).
Sourcepub fn set_acin_present(&mut self, value: bool)
pub fn set_acin_present(&mut self, value: bool)
Write the acin_present field of the register.
ACIN physical presence status (true: voltage detected, false: no voltage detected).
Sourcepub fn set_acin_usable(&mut self, value: bool)
pub fn set_acin_usable(&mut self, value: bool)
Write the acin_usable field of the register.
ACIN usability status (true: ACIN voltage is valid for system use, false: ACIN voltage is not valid/sufficient).
Sourcepub fn set_vbus_present(&mut self, value: bool)
pub fn set_vbus_present(&mut self, value: bool)
Write the vbus_present field of the register.
VBUS physical presence status (true: voltage detected, false: no voltage detected).
Sourcepub fn set_vbus_usable(&mut self, value: bool)
pub fn set_vbus_usable(&mut self, value: bool)
Write the vbus_usable field of the register.
VBUS usability status (true: VBUS voltage is valid for system use, false: VBUS voltage is not valid/sufficient).
Sourcepub fn set_vbus_voltage_above_vhold_when_connected(&mut self, value: bool)
pub fn set_vbus_voltage_above_vhold_when_connected(&mut self, value: bool)
Write the vbus_voltage_above_vhold_when_connected field of the register.
Indicates if VBUS voltage was greater than VHOLD when VBUS was connected (true: VBUS > VHOLD, false: VBUS <= VHOLD or not applicable).
Sourcepub fn set_battery_flow(&mut self, value: BatteryFlowDirection)
pub fn set_battery_flow(&mut self, value: BatteryFlowDirection)
Write the battery_flow field of the register.
Battery current direction.
Sourcepub fn set_acin_and_vbus_inputs_shorted_on_pcb(&mut self, value: bool)
pub fn set_acin_and_vbus_inputs_shorted_on_pcb(&mut self, value: bool)
Write the acin_and_vbus_inputs_shorted_on_pcb field of the register.
Indicates if ACIN and VBUS inputs are short-circuited on the PCB (true: short-circuited detected, false: no short-circuit).
Sourcepub fn set_boot_source_was_acin_or_vbus(&mut self, value: bool)
pub fn set_boot_source_was_acin_or_vbus(&mut self, value: bool)
Write the boot_source_was_acin_or_vbus field of the register.
Indicates if the boot-up power source was ACIN or VBUS (true: boot from ACIN/VBUS, false: boot from Battery or other).
Trait Implementations§
Source§impl BitAnd for PowerStatus
impl BitAnd for PowerStatus
Source§impl BitAndAssign for PowerStatus
impl BitAndAssign for PowerStatus
Source§fn bitand_assign(&mut self, rhs: Self)
fn bitand_assign(&mut self, rhs: Self)
&= operation. Read moreSource§impl BitOr for PowerStatus
impl BitOr for PowerStatus
Source§impl BitOrAssign for PowerStatus
impl BitOrAssign for PowerStatus
Source§fn bitor_assign(&mut self, rhs: Self)
fn bitor_assign(&mut self, rhs: Self)
|= operation. Read moreSource§impl BitXor for PowerStatus
impl BitXor for PowerStatus
Source§impl BitXorAssign for PowerStatus
impl BitXorAssign for PowerStatus
Source§fn bitxor_assign(&mut self, rhs: Self)
fn bitxor_assign(&mut self, rhs: Self)
^= operation. Read moreSource§impl Clone for PowerStatus
impl Clone for PowerStatus
Source§fn clone(&self) -> PowerStatus
fn clone(&self) -> PowerStatus
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more