pub struct Control2(pub u8);
Tuple Fields§
§0: u8
Implementations§
source§impl Control2
impl Control2
sourcepub fn tog_save_pwr(&self) -> u8
pub fn tog_save_pwr(&self) -> u8
00
: Don’t go into the DISABLE state after one cycle of toggle01
: Wait between toggle cycles for tDIS time of 40 ms10
: Wait between toggle cycles for tDIS time of 80 ms11
: Wait between toggle cycles for tDIS time of 160 ms
sourcepub fn with_tog_save_pwr(self, value: u8) -> Self
pub fn with_tog_save_pwr(self, value: u8) -> Self
00
: Don’t go into the DISABLE state after one cycle of toggle01
: Wait between toggle cycles for tDIS time of 40 ms10
: Wait between toggle cycles for tDIS time of 80 ms11
: Wait between toggle cycles for tDIS time of 160 ms
sourcepub fn set_tog_save_pwr(&mut self, value: u8)
pub fn set_tog_save_pwr(&mut self, value: u8)
00
: Don’t go into the DISABLE state after one cycle of toggle01
: Wait between toggle cycles for tDIS time of 40 ms10
: Wait between toggle cycles for tDIS time of 80 ms11
: Wait between toggle cycles for tDIS time of 160 ms
sourcepub fn rog_rd_only(&self) -> bool
pub fn rog_rd_only(&self) -> bool
true
: When TOGGLE=1 only Rd values will cause the TOGGLE state machine to stop toggling and trigger the I_TOGGLE interruptfalse
: When TOGGLE=1, Rd and Ra values will cause the TOGGLE state machine to stop toggling
sourcepub fn with_rog_rd_only(self, value: bool) -> Self
pub fn with_rog_rd_only(self, value: bool) -> Self
true
: When TOGGLE=1 only Rd values will cause the TOGGLE state machine to stop toggling and trigger the I_TOGGLE interruptfalse
: When TOGGLE=1, Rd and Ra values will cause the TOGGLE state machine to stop toggling
sourcepub fn set_rog_rd_only(&mut self, value: bool)
pub fn set_rog_rd_only(&mut self, value: bool)
true
: When TOGGLE=1 only Rd values will cause the TOGGLE state machine to stop toggling and trigger the I_TOGGLE interruptfalse
: When TOGGLE=1, Rd and Ra values will cause the TOGGLE state machine to stop toggling
sourcepub fn wake_end(&self) -> bool
pub fn wake_end(&self) -> bool
Enable Wake Detection functionality if the power state is correct
sourcepub fn with_wake_end(self, value: bool) -> Self
pub fn with_wake_end(self, value: bool) -> Self
Enable Wake Detection functionality if the power state is correct
sourcepub fn set_wake_end(&mut self, value: bool)
pub fn set_wake_end(&mut self, value: bool)
Enable Wake Detection functionality if the power state is correct
sourcepub fn mode(&self) -> u8
pub fn mode(&self) -> u8
11
: Enable SRC polling functionality if TOGGLE=110
: Enable SNK polling functionality if TOGGLE=101
: Enable DRP polling functionality if TOGGLE=100
: Do Not Use
sourcepub fn with_mode(self, value: u8) -> Self
pub fn with_mode(self, value: u8) -> Self
11
: Enable SRC polling functionality if TOGGLE=110
: Enable SNK polling functionality if TOGGLE=101
: Enable DRP polling functionality if TOGGLE=100
: Do Not Use
sourcepub fn set_mode(&mut self, value: u8)
pub fn set_mode(&mut self, value: u8)
11
: Enable SRC polling functionality if TOGGLE=110
: Enable SNK polling functionality if TOGGLE=101
: Enable DRP polling functionality if TOGGLE=100
: Do Not Use
sourcepub fn with_toggle(self, value: bool) -> Self
pub fn with_toggle(self, value: bool) -> Self
Enable DRP, SNK or SRC Toggle autonomous functionality
sourcepub fn set_toggle(&mut self, value: bool)
pub fn set_toggle(&mut self, value: bool)
Enable DRP, SNK or SRC Toggle autonomous functionality
Trait Implementations§
impl Copy for Control2
impl Eq for Control2
impl StructuralPartialEq for Control2
Auto Trait Implementations§
impl Freeze for Control2
impl RefUnwindSafe for Control2
impl Send for Control2
impl Sync for Control2
impl Unpin for Control2
impl UnwindSafe for Control2
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
source§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit
)source§impl<T, U> UnsafeFrom<U> for Twhere
U: Into<T>,
impl<T, U> UnsafeFrom<U> for Twhere
U: Into<T>,
source§unsafe fn unsafe_from(other: U) -> T
unsafe fn unsafe_from(other: U) -> T
Calls U::into(other)
.
That is, this conversion is whatever the implementation of Into
<T> for U
chooses to
do.
source§impl<T, U> UnsafeInto<U> for Twhere
U: UnsafeFrom<T>,
impl<T, U> UnsafeInto<U> for Twhere
U: UnsafeFrom<T>,
source§unsafe fn unsafe_into(self) -> U
unsafe fn unsafe_into(self) -> U
Calls U::unsafe_from(self)
.
That is, this conversion is whatever the implementation of UnsafeFrom
<T> for U
chooses to do.