pub struct GenericPhy<SM: StationManagement> { /* private fields */ }Expand description
Generic SMI Ethernet PHY implementation
Implementations§
Source§impl<SM: StationManagement> GenericPhy<SM>
impl<SM: StationManagement> GenericPhy<SM>
Sourcepub fn new(sm: SM, phy_addr: u8) -> Self
pub fn new(sm: SM, phy_addr: u8) -> Self
Construct the PHY. It assumes the address phy_addr in the SMI communication
§Panics
phy_addr must be in range 0..32
Sourcepub fn new_auto(sm: SM) -> Self
pub fn new_auto(sm: SM) -> Self
Construct the PHY. Try to probe all addresses from 0 to 31 during initialization
Addresses whose PHY ID registers both read all-ones are skipped, because nothing drives the MDIO line there.
Ethernet initialization returns Error::PhyNotFound if no address completes a PHY reset.
Source§impl<SM: StationManagement> GenericPhy<SM>
Public functions for the PHY
impl<SM: StationManagement> GenericPhy<SM>
Public functions for the PHY
Sourcepub fn set_poll_interval(&mut self, poll_interval: Duration)
pub fn set_poll_interval(&mut self, poll_interval: Duration)
Set the SMI polling interval.
Sourcepub fn station_management(&mut self) -> &mut SM
pub fn station_management(&mut self) -> &mut SM
Access the underlying station management.
Trait Implementations§
Source§impl<SM: StationManagement> Phy for GenericPhy<SM>
impl<SM: StationManagement> Phy for GenericPhy<SM>
Auto Trait Implementations§
impl<SM> Freeze for GenericPhy<SM>where
SM: Freeze,
impl<SM> RefUnwindSafe for GenericPhy<SM>where
SM: RefUnwindSafe,
impl<SM> Send for GenericPhy<SM>where
SM: Send,
impl<SM> Sync for GenericPhy<SM>where
SM: Sync,
impl<SM> Unpin for GenericPhy<SM>where
SM: Unpin,
impl<SM> UnsafeUnpin for GenericPhy<SM>where
SM: UnsafeUnpin,
impl<SM> UnwindSafe for GenericPhy<SM>where
SM: UnwindSafe,
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