pub enum ChargePhase {
None,
Trickle,
Fast,
Taper,
TopOff,
Done,
// some variants omitted
}Expand description
Describes the active charging phase of the charger hardware.
Lithium-ion battery charging typically transitions across distinct stages: Pre-conditioning/Trickle -> Constant Current (Fast) -> Constant Voltage (Taper) -> Top-off -> Done.
Variants§
None
The charger is idle, off, or not supplying charging power to the battery (including during passthrough, bypass, or charge-inhibit mode).
Trickle
Pre-qualification / trickle charging phase. Used when the battery is deeply depleted below the pre-charge voltage threshold; current is limited to a small, safe level to restore cell voltage before fast charge.
Fast
Constant Current (CC) fast charging phase. The charger acts as a regulated current source supplying maximum programmed fast charge current.
Taper
Constant Voltage (CV) taper phase. The battery voltage has reached the regulation target limit; current naturally tapers down as the cell saturates.
TopOff
Top-off charging phase. Low-current charging stage right after the CV termination threshold is reached, providing a timed saturation before stopping.
Done
Charge termination complete.
The charger has completed its charging cycle (e.g. top-off timer or termination-current
threshold reached) and has cut off charge current to the battery while continuing to supply
system load. The charger may automatically re-enter FAST if battery voltage decays below
the recharge threshold.
Implementations§
Source§impl ChargePhase
impl ChargePhase
pub fn from_primitive(prim: u32) -> Option<ChargePhase>
pub fn from_primitive_allow_unknown(prim: u32) -> ChargePhase
pub fn unknown() -> ChargePhase
pub const fn into_primitive(self) -> u32
pub fn is_unknown(&self) -> bool
Trait Implementations§
Source§impl Clone for ChargePhase
impl Clone for ChargePhase
Source§fn clone(&self) -> ChargePhase
fn clone(&self) -> ChargePhase
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreimpl Copy for ChargePhase
Source§impl Debug for ChargePhase
impl Debug for ChargePhase
Source§impl<D> Decode<ChargePhase, D> for ChargePhasewhere
D: ResourceDialect,
impl<D> Decode<ChargePhase, D> for ChargePhasewhere
D: ResourceDialect,
Source§fn new_empty() -> ChargePhase
fn new_empty() -> ChargePhase
Self. The specific value does not matter,
since it will be overwritten by decode.Source§impl<D> Encode<ChargePhase, D> for ChargePhasewhere
D: ResourceDialect,
impl<D> Encode<ChargePhase, D> for ChargePhasewhere
D: ResourceDialect,
impl Eq for ChargePhase
Source§impl Hash for ChargePhase
impl Hash for ChargePhase
Source§impl Ord for ChargePhase
impl Ord for ChargePhase
Source§fn cmp(&self, other: &ChargePhase) -> Ordering
fn cmp(&self, other: &ChargePhase) -> Ordering
1.21.0 (const: unstable) · Source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
1.21.0 (const: unstable) · Source§fn min(self, other: Self) -> Selfwhere
Self: Sized,
fn min(self, other: Self) -> Selfwhere
Self: Sized,
Source§impl PartialEq for ChargePhase
impl PartialEq for ChargePhase
Source§impl PartialOrd for ChargePhase
impl PartialOrd for ChargePhase
impl StructuralPartialEq for ChargePhase
Source§impl TypeMarker for ChargePhase
impl TypeMarker for ChargePhase
Source§type Owned = ChargePhase
type Owned = ChargePhase
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 ChargePhase
impl ValueTypeMarker for ChargePhase
Source§type Borrowed<'a> = ChargePhase
type Borrowed<'a> = ChargePhase
Encode<Self>
type cheaply obtainable from &Self::Owned. There are three cases: Read moreSource§fn borrow(
value: &<ChargePhase as TypeMarker>::Owned,
) -> <ChargePhase as ValueTypeMarker>::Borrowed<'_>
fn borrow( value: &<ChargePhase as TypeMarker>::Owned, ) -> <ChargePhase as ValueTypeMarker>::Borrowed<'_>
&Self::Owned to Self::Borrowed.