pub struct CcPhy<'d, T: Instance> { /* private fields */ }
Expand description
Control and monitoring of TypeC CC pin functionailty.
Implementations§
source§impl<'d, T: Instance> CcPhy<'d, T>
impl<'d, T: Instance> CcPhy<'d, T>
sourcepub fn set_pull(&mut self, cc_pull: CcPull)
pub fn set_pull(&mut self, cc_pull: CcPull)
Sets the pull-up/pull-down resistor values exposed on the CC pins.
sourcepub fn vstate(&self) -> (CcVState, CcVState)
pub fn vstate(&self) -> (CcVState, CcVState)
Returns the current voltage level of CC1 and CC2 pin as tuple.
Interpretation of the voltage levels depends on the configured CC line pull-up/pull-down resistance.
sourcepub async fn wait_for_vstate_change(&self) -> (CcVState, CcVState)
pub async fn wait_for_vstate_change(&self) -> (CcVState, CcVState)
Waits for a change in voltage state on either CC line.
Trait Implementations§
Auto Trait Implementations§
impl<'d, T> Freeze for CcPhy<'d, T>
impl<'d, T> RefUnwindSafe for CcPhy<'d, T>where
T: RefUnwindSafe,
impl<'d, T> Send for CcPhy<'d, T>where
T: Send,
impl<'d, T> Sync for CcPhy<'d, T>where
T: Sync,
impl<'d, T> Unpin for CcPhy<'d, T>
impl<'d, T> !UnwindSafe for CcPhy<'d, T>
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