Skip to main content

InternalPhy

Struct InternalPhy 

Source
pub struct InternalPhy { /* private fields */ }
Expand description

Driver for the CH32V307 built-in 10M PHY at SMI address 1.

Implementations§

Source§

impl InternalPhy

Source

pub fn new() -> Self

Create a driver for the built-in PHY.

Trait Implementations§

Source§

impl Phy for InternalPhy

Source§

fn phy_reset(&mut self, smi: &mut Smi) -> Result<(), SmiError>

Reset the PHY and wait for it to come out of reset.
Source§

fn phy_init(&mut self, smi: &mut Smi) -> Result<(), SmiError>

Initialize the PHY (enable autonegotiation, etc).
Poll the link state. Returns true if link is up.
Source§

fn full_duplex(&mut self, smi: &mut Smi) -> Result<bool, SmiError>

Duplex mode of the established link (called on each link-up). Returns true for full duplex. The default keeps the MAC in full duplex.
Source§

fn speed_100m(&mut self, _smi: &mut Smi) -> Result<bool, SmiError>

Speed of the established link (called on each link-up). Returns true for 100 Mbit/s. The default keeps the MAC at 100 Mbit/s.
Source§

fn next_polarity(&mut self, smi: &mut Smi) -> Result<bool, SmiError>

Switch to the next receive-pair polarity and restart auto-negotiation. Read more

Auto Trait Implementations§

§

impl Freeze for InternalPhy

§

impl RefUnwindSafe for InternalPhy

§

impl Send for InternalPhy

§

impl Sync for InternalPhy

§

impl Unpin for InternalPhy

§

impl UnsafeUnpin for InternalPhy

§

impl UnwindSafe for InternalPhy

Blanket Implementations§

§

impl<T> Any for T
where T: 'static + ?Sized,

§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
§

impl<T> Borrow<T> for T
where T: ?Sized,

§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
§

impl<T> BorrowMut<T> for T
where T: ?Sized,

§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
§

impl<T> From<T> for T

§

fn from(t: T) -> T

Returns the argument unchanged.

§

impl<T, U> Into<U> for T
where U: From<T>,

§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of [From]<T> for U chooses to do.

§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.