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>,
/* 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.
Values between discrete hardware register steps are rounded in the direction that honors the
constraint. Ceilings (current and voltage limits) round down, so a value below the lowest
programmable step is rejected with Error::INVALID_ARGS; the input_voltage_limit_uv floor
rounds up, so a value below the lowest programmable step is clamped to it.
Fields§
§operating_mode: Option<OperatingMode>Desired operational mode of the power converter.
input_current_limit_ua: Option<u32>Active Input Current Limit (ICL) programmed into the input power path, in microamps. Values between discrete hardware register steps are rounded down to the nearest programmable step so the requested ceiling is never exceeded.
charge_current_limit_ua: Option<u32>Active Fast Charge Current (FCC) regulation limit for the battery, in microamps. Values between discrete hardware register steps are rounded down to the nearest programmable step so the requested ceiling is never exceeded.
float_voltage_uv: Option<u32>Active float (constant voltage / CV) regulation target across the battery, in microvolts
(bounded by Spec.max_charge_voltage_uv).
Values between discrete hardware register steps are rounded down to the nearest
programmable step. 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>Active charge termination (top-off / taper cutoff) current threshold, in microamps. Values between discrete hardware register steps are rounded down to the nearest programmable step.
input_voltage_limit_uv: Option<u32>Minimum input voltage regulation floor (VINDPM), in microvolts, below which the converter throttles input current draw to prevent source collapse. Values between discrete hardware register steps are rounded up to the nearest programmable step so the input voltage never drops below the requested floor.
Trait Implementations§
Source§impl Clone for ControlOptions
impl Clone for ControlOptions
Source§impl Debug for ControlOptions
impl Debug for ControlOptions
Source§impl<D: ResourceDialect> Decode<ControlOptions, D> for ControlOptions
impl<D: ResourceDialect> Decode<ControlOptions, D> for ControlOptions
Source§impl Default for ControlOptions
impl Default for ControlOptions
Source§impl<D: ResourceDialect> Encode<ControlOptions, D> for &ControlOptions
impl<D: ResourceDialect> Encode<ControlOptions, D> for &ControlOptions
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 more