pub struct StandardPowerRangeDataObject { /* private fields */ }Expand description
Represents the standard power range for the AP33772S.
Many Power supplies will support various objects that implement the StandardPowerRange.
This contains all the necessary information to select or query what the
power range capabilities are.
Implementations§
Source§impl StandardPowerRangeDataObject
impl StandardPowerRangeDataObject
Sourcepub const ZERO: Self
pub const ZERO: Self
Creates a new instance with a raw value of 0. Equivalent to [Self::new_with_raw_value(0)].
Sourcepub const fn new() -> Self
👎Deprecated: Use StandardPowerRangeDataObject::Default (or StandardPowerRangeDataObject::DEFAULT in const context) instead
pub const fn new() -> Self
Use StandardPowerRangeDataObject::Default (or StandardPowerRangeDataObject::DEFAULT in const context) instead
Creates a new instance of this struct using the default value
Sourcepub const fn new_with_raw_value(value: u16) -> StandardPowerRangeDataObject
pub const fn new_with_raw_value(value: u16) -> StandardPowerRangeDataObject
Creates a new instance of this bitfield with the given raw value.
No checks are performed on the value, so it is possible to set bits that don’t have any accessors specified.
Sourcepub const fn builder() -> PartialStandardPowerRangeDataObject
pub const fn builder() -> PartialStandardPowerRangeDataObject
Creates a builder for this bitfield which ensures that all writable fields are initialized.
pub const fn raw_max_voltage(&self) -> u8
pub const fn minimum_voltage_or_peak_current(&self) -> u2
pub const fn max_current(&self) -> SourceMaximumCurrent
pub const fn source_power_type(&self) -> PowerType
pub const fn is_detected(&self) -> bool
Source§impl StandardPowerRangeDataObject
Maximum Voltage of 21 (21000 mV) with 100mV resolution
U16 can hold values up to 65535
0 = 0mV
1 = 100mV
2 = 200mV
…
210 = 21000mV (21V)
This means the maximum raw value is 210
210 * 100 = 21000mV
Therefore the voltage should be checked multiplied and stored in a U16
impl StandardPowerRangeDataObject
Maximum Voltage of 21 (21000 mV) with 100mV resolution U16 can hold values up to 65535 0 = 0mV 1 = 100mV 2 = 200mV … 210 = 21000mV (21V) This means the maximum raw value is 210 210 * 100 = 21000mV Therefore the voltage should be checked multiplied and stored in a U16
Sourcepub const VOLTAGE_RESOLUTION: u16 = 100
pub const VOLTAGE_RESOLUTION: u16 = 100
The Voltage Resolution defined in mV per LSB
Sourcepub const ABSOLUTE_MAXIMUM_VOLTAGE: u16 = 21000
pub const ABSOLUTE_MAXIMUM_VOLTAGE: u16 = 21000
The Maximum Voltage that can be requested using this data object, this is not the max_voltage that the data object can provide,
but rather the Absolute Maximum Voltage that the Standard rage profile can support.
Use max_voltage function
to find out what value is supported.
It is is defined in mV
Sourcepub fn max_voltage(&self) -> Result<ElectricPotential, Ap33772sError>
pub fn max_voltage(&self) -> Result<ElectricPotential, Ap33772sError>
Returns the maximum voltage that can be requested using this data object.
Sourcepub fn peak_current(&self) -> Option<PeakCurrent>
pub fn peak_current(&self) -> Option<PeakCurrent>
Returns the peak current that can be requested using this data object.
Sourcepub fn minimum_voltage(&self) -> Option<MinimumVoltage>
pub fn minimum_voltage(&self) -> Option<MinimumVoltage>
Returns the minimum voltage that can be requested using this data object.
Trait Implementations§
Source§impl Clone for StandardPowerRangeDataObject
impl Clone for StandardPowerRangeDataObject
Source§fn clone(&self) -> StandardPowerRangeDataObject
fn clone(&self) -> StandardPowerRangeDataObject
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 StandardPowerRangeDataObject
Source§impl Debug for StandardPowerRangeDataObject
impl Debug for StandardPowerRangeDataObject
Source§impl Format for StandardPowerRangeDataObject
Available on crate feature defmt only.
impl Format for StandardPowerRangeDataObject
defmt only.