pub struct OperationMode { /* private fields */ }Expand description
The OperationMode register is defined as the AP33772S’s operation mode.
When ConfigurationChannel::One, the CC2 is connected to the CC line. See ConfigurationChannel for more details.
When DeRatingMode::Normal, the AP33772S works in de-rating (DR) mode. See DeRatingMode for more details.
When power_delivery_source_connected = true, the AP33772S works in Power Delivery mode.
When legacy_source_connected = true, the AP33772S works in Legacy mode (non Power Delivery Modes).
Datasheet Name: OPMODE
Implementations§
Source§impl OperationMode
impl OperationMode
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 OperationMode::Default (or OperationMode::DEFAULT in const context) instead
pub const fn new() -> Self
Use OperationMode::Default (or OperationMode::DEFAULT in const context) instead
Creates a new instance of this struct using the default value
Sourcepub const fn new_with_raw_value(value: u8) -> OperationMode
pub const fn new_with_raw_value(value: u8) -> OperationMode
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() -> PartialOperationMode
pub const fn builder() -> PartialOperationMode
Creates a builder for this bitfield which ensures that all writable fields are initialized.
Sourcepub const fn legacy_source_connected(&self) -> bool
pub const fn legacy_source_connected(&self) -> bool
Leagacy Source Connected
Datasheet Name: LGCYMOD
Sourcepub const fn power_delivery_source_connected(&self) -> bool
pub const fn power_delivery_source_connected(&self) -> bool
Power Delivery Source Connected
Datasheet Name: PDMOD
Sourcepub const fn derating_mode(&self) -> DeRatingMode
pub const fn derating_mode(&self) -> DeRatingMode
Derating Mode
Datasheet Name: DR
Sourcepub const fn configuration_channel(&self) -> ConfigurationChannel
pub const fn configuration_channel(&self) -> ConfigurationChannel
CCFLIP - CC1 or CC2 connected
Trait Implementations§
Source§impl Clone for OperationMode
impl Clone for OperationMode
Source§fn clone(&self) -> OperationMode
fn clone(&self) -> OperationMode
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 OperationMode
Source§impl Debug for OperationMode
impl Debug for OperationMode
Source§impl Default for OperationMode
impl Default for OperationMode
Source§impl Display for OperationMode
impl Display for OperationMode
Source§impl Format for OperationMode
Available on crate feature defmt only.
impl Format for OperationMode
defmt only.