Struct ltc681x::config::Configuration
source · pub struct Configuration { /* private fields */ }
Expand description
Abstracted configuration of configuration register(s)
Implementations§
source§impl Configuration
impl Configuration
sourcepub fn enable_gpio_pull_down(&mut self, pin: GPIO)
pub fn enable_gpio_pull_down(&mut self, pin: GPIO)
Enables pull-down of the given GPIO pin
sourcepub fn disable_gpio_pull_down(&mut self, pin: GPIO)
pub fn disable_gpio_pull_down(&mut self, pin: GPIO)
Enables pull-down of the given GPIO pin
sourcepub fn enable_reference_power(&mut self)
pub fn enable_reference_power(&mut self)
References remain powered up until watchdog timeout
sourcepub fn disable_reference_power(&mut self)
pub fn disable_reference_power(&mut self)
References shut down after conversions (Default)
sourcepub fn enable_discharge_timer(&mut self)
pub fn enable_discharge_timer(&mut self)
Enables the discharge timer for discharge switches
sourcepub fn disable_discharge_timer(&mut self)
pub fn disable_discharge_timer(&mut self)
Disables the discharge timer
sourcepub fn set_uv_comp_voltage(
&mut self,
voltage: u32
) -> Result<(), VoltageOutOfRangeError>
pub fn set_uv_comp_voltage( &mut self, voltage: u32 ) -> Result<(), VoltageOutOfRangeError>
Sets the under-voltage comparison voltage in uV
sourcepub fn set_ov_comp_voltage(
&mut self,
voltage: u32
) -> Result<(), VoltageOutOfRangeError>
pub fn set_ov_comp_voltage( &mut self, voltage: u32 ) -> Result<(), VoltageOutOfRangeError>
Sets the over-voltage comparison voltage in uV
sourcepub fn discharge_cell(&mut self, cell: Cell)
pub fn discharge_cell(&mut self, cell: Cell)
Turn ON Shorting Switch for Cell x
sourcepub fn set_discharge_timeout(&mut self, timeout: DischargeTimeout)
pub fn set_discharge_timeout(&mut self, timeout: DischargeTimeout)
Sets the discharge timeout
sourcepub fn set_alternative_adc_modes(&mut self)
pub fn set_alternative_adc_modes(&mut self)
Alternative ADC modes 14kHz, 3kHz, 1kHz or 2kHz
sourcepub fn set_default_adc_modes(&mut self)
pub fn set_default_adc_modes(&mut self)
Default ADC modes 27kHz, 7kHz, 422Hz or 26Hz
sourcepub fn force_digital_redundancy_fail(&mut self)
pub fn force_digital_redundancy_fail(&mut self)
Forces the digital redundancy comparison for ADC Conversions to fail
sourcepub fn set_digital_redundancy_path(&mut self, selection: DigitalRedundancyPath)
pub fn set_digital_redundancy_path(&mut self, selection: DigitalRedundancyPath)
Sets the digital redundancy path
sourcepub fn enable_discharge_monitor(&mut self)
pub fn enable_discharge_monitor(&mut self)
Enables the discharge timer monitor function if the DTEN Pin is Asserted Otherwise (default) the discharge dimer monitor function is disabled. The normal discharge timer function will be enabled if the DTEN pin is asserted
Trait Implementations§
source§impl Clone for Configuration
impl Clone for Configuration
source§fn clone(&self) -> Configuration
fn clone(&self) -> Configuration
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read more