#[repr(u8)]pub enum Mode {
PowerDown = 0,
ShuntTriggered = 1,
BusTriggered = 2,
ShuntAndBusTriggered = 3,
ShuntContinuous = 5,
BusContinuous = 6,
ShuntAndBusContinuous = 7,
}Expand description
The operating mode: which inputs are converted, and whether once or continuously.
Both 000 and 100 select power-down; this type reads either as
Mode::PowerDown and writes it back as 000.
Variants§
PowerDown = 0
Power-down (shutdown); registers stay readable and writable.
ShuntTriggered = 1
One shunt voltage conversion, then idle.
BusTriggered = 2
One bus voltage conversion, then idle.
ShuntAndBusTriggered = 3
One shunt and one bus voltage conversion, then idle.
ShuntContinuous = 5
Shunt voltage conversions back to back.
BusContinuous = 6
Bus voltage conversions back to back.
ShuntAndBusContinuous = 7
Shunt and bus voltage conversions back to back, the power-on mode.
Implementations§
Source§impl Mode
impl Mode
Sourcepub fn measures_shunt(self) -> bool
pub fn measures_shunt(self) -> bool
Returns whether this mode converts the shunt voltage.
§Returns
true for the shunt-only and shunt-and-bus modes.
Sourcepub fn measures_bus(self) -> bool
pub fn measures_bus(self) -> bool
Returns whether this mode converts the bus voltage.
§Returns
true for the bus-only and shunt-and-bus modes.
Sourcepub fn is_continuous(self) -> bool
pub fn is_continuous(self) -> bool
Returns whether this mode keeps converting after the first result.
§Returns
true for the three continuous modes.