pub struct ExtendedPowerRangeDataObject { /* private fields */ }Expand description
Represents the extended power range for the AP33772S. This contains all the necessary information to select or query what the power range capabilities are.
Implementations§
Source§impl ExtendedPowerRangeDataObject
impl ExtendedPowerRangeDataObject
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 ExtendedPowerRangeDataObject::Default (or ExtendedPowerRangeDataObject::DEFAULT in const context) instead
pub const fn new() -> Self
Use ExtendedPowerRangeDataObject::Default (or ExtendedPowerRangeDataObject::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) -> ExtendedPowerRangeDataObject
pub const fn new_with_raw_value(value: u16) -> ExtendedPowerRangeDataObject
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() -> PartialExtendedPowerRangeDataObject
pub const fn builder() -> PartialExtendedPowerRangeDataObject
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 ExtendedPowerRangeDataObject
Maximum Voltage of 28V (28000 mV) with 200mV resolution
U8 can hold values up to 255
0 = 0mV
1 = 200mV
2 = 400mV
…
140 = 28000mV (28V)
This means the maximum raw value is 140
140 * 200 = 28000mV U16 is required
Therefore the voltage should be checked multiplied
impl ExtendedPowerRangeDataObject
Maximum Voltage of 28V (28000 mV) with 200mV resolution U8 can hold values up to 255 0 = 0mV 1 = 200mV 2 = 400mV … 140 = 28000mV (28V) This means the maximum raw value is 140 140 * 200 = 28000mV U16 is required Therefore the voltage should be checked multiplied
Sourcepub const VOLTAGE_RESOLUTION: u16 = 200
pub const VOLTAGE_RESOLUTION: u16 = 200
The Voltage Resolution defined in mV per LSB
Sourcepub const ABSOLUTE_MAXIMUM_VOLTAGE: u16 = 28000
pub const ABSOLUTE_MAXIMUM_VOLTAGE: u16 = 28000
The Absolute Maximum Voltage that can be requested using this data object. The actual maximum voltage can be determined by using the max_voltage function. This 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. This is only applicable for Adjustable Power Supplies using the Adjustable Voltage Supply (AVS) feature
Trait Implementations§
Source§impl Clone for ExtendedPowerRangeDataObject
impl Clone for ExtendedPowerRangeDataObject
Source§fn clone(&self) -> ExtendedPowerRangeDataObject
fn clone(&self) -> ExtendedPowerRangeDataObject
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 ExtendedPowerRangeDataObject
Source§impl Debug for ExtendedPowerRangeDataObject
impl Debug for ExtendedPowerRangeDataObject
Source§impl Format for ExtendedPowerRangeDataObject
Available on crate feature defmt only.
impl Format for ExtendedPowerRangeDataObject
defmt only.