pub struct ControlOptions {
pub operating_mode: Option<OperatingMode>,
pub input_current_limit_ua: Option<u32>,
pub charge_current_limit_ua: Option<u32>,
pub float_voltage_uv: Option<u32>,
pub charge_term_current_ua: Option<u32>,
pub input_voltage_limit_uv: Option<u32>,
pub top_off_duration: Option<i64>,
/* private fields */
}Expand description
Operational and electrical constraints applicable to the charger converter.
This is a partial update: only the fields present are applied, and any omitted field leaves the
corresponding hardware setting unchanged. While the Controller connection remains open, to
relax or withdraw a previously applied limit, set the field again to the desired value, call
[Controller.ClearControl] with a mask of fields to withdraw, or close the Controller
channel to withdraw all constraints and restore driver defaults.
When a value falls between discrete hardware steps, or when votes from several clients conflict,
less charging is preferred. Lower values charge less, except for charge_term_current_ua and
input_voltage_limit_uv, where higher values do.
Fields§
§operating_mode: Option<OperatingMode>Desired operational mode of the power converter.
input_current_limit_ua: Option<u32>Input current limit (ICL), in microamps.
charge_current_limit_ua: Option<u32>Fast charge current (FCC) limit for the battery, in microamps.
float_voltage_uv: Option<u32>Float (CV) regulation voltage for the battery, in microvolts (bounded by
Spec.max_charge_voltage_uv). Note that writing a float voltage target may cause the
hardware charge state machine to exit ChargePhase::TOP_OFF and re-evaluate CV regulation.
charge_term_current_ua: Option<u32>Charge termination (top-off / taper cutoff) current threshold, in microamps: when the charge current falls to it, the charger ends constant-voltage charging.
input_voltage_limit_uv: Option<u32>Input voltage regulation floor (VINDPM), in microvolts, below which the converter throttles input current draw to prevent source collapse.
top_off_duration: Option<i64>How long the charger stays in ChargePhase::TOP_OFF, after the charge current falls below
the termination threshold, before it enters ChargePhase::DONE.
Trait Implementations§
Source§impl Clone for ControlOptions
impl Clone for ControlOptions
Source§fn clone(&self) -> ControlOptions
fn clone(&self) -> ControlOptions
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for ControlOptions
impl Debug for ControlOptions
Source§impl<D> Decode<ControlOptions, D> for ControlOptionswhere
D: ResourceDialect,
impl<D> Decode<ControlOptions, D> for ControlOptionswhere
D: ResourceDialect,
Source§fn new_empty() -> ControlOptions
fn new_empty() -> ControlOptions
Self. The specific value does not matter,
since it will be overwritten by decode.Source§impl Default for ControlOptions
impl Default for ControlOptions
Source§fn default() -> ControlOptions
fn default() -> ControlOptions
Source§impl<D> Encode<ControlOptions, D> for &ControlOptionswhere
D: ResourceDialect,
impl<D> Encode<ControlOptions, D> for &ControlOptionswhere
D: ResourceDialect,
Source§impl PartialEq for ControlOptions
impl PartialEq for ControlOptions
impl Persistable for ControlOptions
impl StructuralPartialEq for ControlOptions
Source§impl TypeMarker for ControlOptions
impl TypeMarker for ControlOptions
Source§type Owned = ControlOptions
type Owned = ControlOptions
Source§fn inline_align(_context: Context) -> usize
fn inline_align(_context: Context) -> usize
Source§fn inline_size(_context: Context) -> usize
fn inline_size(_context: Context) -> usize
inline_align.Source§fn encode_is_copy() -> bool
fn encode_is_copy() -> bool
Self::Owned matches the FIDL wire
format and encoding requires no validation. When true, we can optimize
encoding arrays and vectors of Self::Owned to a single memcpy. Read moreSource§fn decode_is_copy() -> bool
fn decode_is_copy() -> bool
Self::Owned matches the FIDL wire
format and decoding requires no validation. When true, we can optimize
decoding arrays and vectors of Self::Owned to a single memcpy.Source§impl ValueTypeMarker for ControlOptions
impl ValueTypeMarker for ControlOptions
Source§type Borrowed<'a> = &'a ControlOptions
type Borrowed<'a> = &'a ControlOptions
Encode<Self>
type cheaply obtainable from &Self::Owned. There are three cases: Read moreSource§fn borrow(
value: &<ControlOptions as TypeMarker>::Owned,
) -> <ControlOptions as ValueTypeMarker>::Borrowed<'_>
fn borrow( value: &<ControlOptions as TypeMarker>::Owned, ) -> <ControlOptions as ValueTypeMarker>::Borrowed<'_>
&Self::Owned to Self::Borrowed.