pub struct PdPhy<'d, T: Instance> { /* private fields */ }
Expand description
Power Delivery (PD) PHY.
Implementations§
source§impl<'d, T: Instance> PdPhy<'d, T>
impl<'d, T: Instance> PdPhy<'d, T>
sourcepub async fn receive(&mut self, buf: &mut [u8]) -> Result<usize, RxError>
pub async fn receive(&mut self, buf: &mut [u8]) -> Result<usize, RxError>
Receives a PD message into the provided buffer.
Returns the number of received bytes or an error.
sourcepub async fn receive_with_sop(
&mut self,
buf: &mut [u8],
) -> Result<(Sop, usize), RxError>
pub async fn receive_with_sop( &mut self, buf: &mut [u8], ) -> Result<(Sop, usize), RxError>
Receives SOP and a PD message into the provided buffer.
Returns the start of packet type and number of received bytes or an error.
sourcepub async fn transmit_hardreset(&mut self) -> Result<(), TxError>
pub async fn transmit_hardreset(&mut self) -> Result<(), TxError>
Transmit a hard reset.
Trait Implementations§
Auto Trait Implementations§
impl<'d, T> Freeze for PdPhy<'d, T>
impl<'d, T> RefUnwindSafe for PdPhy<'d, T>where
T: RefUnwindSafe,
impl<'d, T> Send for PdPhy<'d, T>where
T: Send,
impl<'d, T> Sync for PdPhy<'d, T>where
T: Sync,
impl<'d, T> Unpin for PdPhy<'d, T>
impl<'d, T> !UnwindSafe for PdPhy<'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