pub struct InterruptStatus { /* private fields */ }
Expand description
Charger detector status flags
Implementations§
Source§impl InterruptStatus
impl InterruptStatus
Sourcepub const fn into_bytes(self) -> [u8; 1]
pub const fn into_bytes(self) -> [u8; 1]
Sourcepub const fn from_bytes(bytes: [u8; 1]) -> Self
pub const fn from_bytes(bytes: [u8; 1]) -> Self
Converts the given bytes directly into the bitfield struct.
Source§impl InterruptStatus
impl InterruptStatus
Sourcepub fn is_charger_detection_running(&self) -> <bool as Specifier>::InOut
pub fn is_charger_detection_running(&self) -> <bool as Specifier>::InOut
Returns the value of is_charger_detection_running.
Sourcepub fn is_charger_detection_running_or_err(
&self,
) -> Result<<bool as Specifier>::InOut, InvalidBitPattern<<bool as Specifier>::Bytes>>
pub fn is_charger_detection_running_or_err( &self, ) -> Result<<bool as Specifier>::InOut, InvalidBitPattern<<bool as Specifier>::Bytes>>
Returns the value of is_charger_detection_running.
#Errors
If the returned value contains an invalid bit pattern for is_charger_detection_running.
Sourcepub fn with_is_charger_detection_running(
self,
new_val: <bool as Specifier>::InOut,
) -> Self
pub fn with_is_charger_detection_running( self, new_val: <bool as Specifier>::InOut, ) -> Self
Returns a copy of the bitfield with the value of is_charger_detection_running set to the given value.
#Panics
If the given value is out of bounds for is_charger_detection_running.
Sourcepub fn with_is_charger_detection_running_checked(
self,
new_val: <bool as Specifier>::InOut,
) -> Result<Self, OutOfBounds>
pub fn with_is_charger_detection_running_checked( self, new_val: <bool as Specifier>::InOut, ) -> Result<Self, OutOfBounds>
Returns a copy of the bitfield with the value of is_charger_detection_running set to the given value.
#Errors
If the given value is out of bounds for is_charger_detection_running.
Sourcepub fn set_is_charger_detection_running(
&mut self,
new_val: <bool as Specifier>::InOut,
)
pub fn set_is_charger_detection_running( &mut self, new_val: <bool as Specifier>::InOut, )
Sets the value of is_charger_detection_running to the given value.
#Panics
If the given value is out of bounds for is_charger_detection_running.
Sourcepub fn set_is_charger_detection_running_checked(
&mut self,
new_val: <bool as Specifier>::InOut,
) -> Result<(), OutOfBounds>
pub fn set_is_charger_detection_running_checked( &mut self, new_val: <bool as Specifier>::InOut, ) -> Result<(), OutOfBounds>
Sets the value of is_charger_detection_running to the given value.
#Errors
If the given value is out of bounds for is_charger_detection_running.
Sourcepub fn is_data_contact_detection_running(&self) -> <bool as Specifier>::InOut
pub fn is_data_contact_detection_running(&self) -> <bool as Specifier>::InOut
Returns the value of is_data_contact_detection_running.
Sourcepub fn is_data_contact_detection_running_or_err(
&self,
) -> Result<<bool as Specifier>::InOut, InvalidBitPattern<<bool as Specifier>::Bytes>>
pub fn is_data_contact_detection_running_or_err( &self, ) -> Result<<bool as Specifier>::InOut, InvalidBitPattern<<bool as Specifier>::Bytes>>
Returns the value of is_data_contact_detection_running.
#Errors
If the returned value contains an invalid bit pattern for is_data_contact_detection_running.
Sourcepub fn with_is_data_contact_detection_running(
self,
new_val: <bool as Specifier>::InOut,
) -> Self
pub fn with_is_data_contact_detection_running( self, new_val: <bool as Specifier>::InOut, ) -> Self
Returns a copy of the bitfield with the value of is_data_contact_detection_running set to the given value.
#Panics
If the given value is out of bounds for is_data_contact_detection_running.
Sourcepub fn with_is_data_contact_detection_running_checked(
self,
new_val: <bool as Specifier>::InOut,
) -> Result<Self, OutOfBounds>
pub fn with_is_data_contact_detection_running_checked( self, new_val: <bool as Specifier>::InOut, ) -> Result<Self, OutOfBounds>
Returns a copy of the bitfield with the value of is_data_contact_detection_running set to the given value.
#Errors
If the given value is out of bounds for is_data_contact_detection_running.
Sourcepub fn set_is_data_contact_detection_running(
&mut self,
new_val: <bool as Specifier>::InOut,
)
pub fn set_is_data_contact_detection_running( &mut self, new_val: <bool as Specifier>::InOut, )
Sets the value of is_data_contact_detection_running to the given value.
#Panics
If the given value is out of bounds for is_data_contact_detection_running.
Sourcepub fn set_is_data_contact_detection_running_checked(
&mut self,
new_val: <bool as Specifier>::InOut,
) -> Result<(), OutOfBounds>
pub fn set_is_data_contact_detection_running_checked( &mut self, new_val: <bool as Specifier>::InOut, ) -> Result<(), OutOfBounds>
Sets the value of is_data_contact_detection_running to the given value.
#Errors
If the given value is out of bounds for is_data_contact_detection_running.
Sourcepub fn is_vbus_present(&self) -> <bool as Specifier>::InOut
pub fn is_vbus_present(&self) -> <bool as Specifier>::InOut
Returns the value of is_vbus_present.
Sourcepub fn is_vbus_present_or_err(
&self,
) -> Result<<bool as Specifier>::InOut, InvalidBitPattern<<bool as Specifier>::Bytes>>
pub fn is_vbus_present_or_err( &self, ) -> Result<<bool as Specifier>::InOut, InvalidBitPattern<<bool as Specifier>::Bytes>>
Returns the value of is_vbus_present.
#Errors
If the returned value contains an invalid bit pattern for is_vbus_present.
Sourcepub fn with_is_vbus_present(self, new_val: <bool as Specifier>::InOut) -> Self
pub fn with_is_vbus_present(self, new_val: <bool as Specifier>::InOut) -> Self
Returns a copy of the bitfield with the value of is_vbus_present set to the given value.
#Panics
If the given value is out of bounds for is_vbus_present.
Sourcepub fn with_is_vbus_present_checked(
self,
new_val: <bool as Specifier>::InOut,
) -> Result<Self, OutOfBounds>
pub fn with_is_vbus_present_checked( self, new_val: <bool as Specifier>::InOut, ) -> Result<Self, OutOfBounds>
Returns a copy of the bitfield with the value of is_vbus_present set to the given value.
#Errors
If the given value is out of bounds for is_vbus_present.
Sourcepub fn set_is_vbus_present(&mut self, new_val: <bool as Specifier>::InOut)
pub fn set_is_vbus_present(&mut self, new_val: <bool as Specifier>::InOut)
Sets the value of is_vbus_present to the given value.
#Panics
If the given value is out of bounds for is_vbus_present.
Sourcepub fn set_is_vbus_present_checked(
&mut self,
new_val: <bool as Specifier>::InOut,
) -> Result<(), OutOfBounds>
pub fn set_is_vbus_present_checked( &mut self, new_val: <bool as Specifier>::InOut, ) -> Result<(), OutOfBounds>
Sets the value of is_vbus_present to the given value.
#Errors
If the given value is out of bounds for is_vbus_present.
Sourcepub fn charger_type(&self) -> <ChargerType as Specifier>::InOut
pub fn charger_type(&self) -> <ChargerType as Specifier>::InOut
Returns the value of charger_type.
Sourcepub fn charger_type_or_err(
&self,
) -> Result<<ChargerType as Specifier>::InOut, InvalidBitPattern<<ChargerType as Specifier>::Bytes>>
pub fn charger_type_or_err( &self, ) -> Result<<ChargerType as Specifier>::InOut, InvalidBitPattern<<ChargerType as Specifier>::Bytes>>
Returns the value of charger_type.
#Errors
If the returned value contains an invalid bit pattern for charger_type.
Sourcepub fn with_charger_type(
self,
new_val: <ChargerType as Specifier>::InOut,
) -> Self
pub fn with_charger_type( self, new_val: <ChargerType as Specifier>::InOut, ) -> Self
Returns a copy of the bitfield with the value of charger_type set to the given value.
#Panics
If the given value is out of bounds for charger_type.
Sourcepub fn with_charger_type_checked(
self,
new_val: <ChargerType as Specifier>::InOut,
) -> Result<Self, OutOfBounds>
pub fn with_charger_type_checked( self, new_val: <ChargerType as Specifier>::InOut, ) -> Result<Self, OutOfBounds>
Returns a copy of the bitfield with the value of charger_type set to the given value.
#Errors
If the given value is out of bounds for charger_type.
Sourcepub fn set_charger_type(&mut self, new_val: <ChargerType as Specifier>::InOut)
pub fn set_charger_type(&mut self, new_val: <ChargerType as Specifier>::InOut)
Sets the value of charger_type to the given value.
#Panics
If the given value is out of bounds for charger_type.
Sourcepub fn set_charger_type_checked(
&mut self,
new_val: <ChargerType as Specifier>::InOut,
) -> Result<(), OutOfBounds>
pub fn set_charger_type_checked( &mut self, new_val: <ChargerType as Specifier>::InOut, ) -> Result<(), OutOfBounds>
Sets the value of charger_type to the given value.
#Errors
If the given value is out of bounds for charger_type.
Trait Implementations§
Source§impl Clone for InterruptStatus
impl Clone for InterruptStatus
Source§fn clone(&self) -> InterruptStatus
fn clone(&self) -> InterruptStatus
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read more