pub struct BarePhy<MIIM>where
MIIM: Miim,{ /* private fields */ }
Expand description
A base phy
Implementations§
Source§impl<MIIM> BarePhy<MIIM>where
MIIM: Miim,
impl<MIIM> BarePhy<MIIM>where
MIIM: Miim,
Sourcepub fn new(miim: MIIM, phy_address: u8, pause: Pause) -> BarePhy<MIIM>
pub fn new(miim: MIIM, phy_address: u8, pause: Pause) -> BarePhy<MIIM>
Create a new bare PHY with the given MIIM, at the given PHY address, using
pause
as the advertised pause mode.
The PHY will calculate it’s best supported advertisement on the fly from
details acquired through miim
.
Sourcepub fn set_phy_addr(&mut self, phy_address: u8)
pub fn set_phy_addr(&mut self, phy_address: u8)
Change the PHY address
Trait Implementations§
Source§impl<MIIM> Phy<MIIM> for BarePhy<MIIM>where
MIIM: Miim,
impl<MIIM> Phy<MIIM> for BarePhy<MIIM>where
MIIM: Miim,
Source§fn best_supported_advertisement(&self) -> AutoNegotiationAdvertisement
fn best_supported_advertisement(&self) -> AutoNegotiationAdvertisement
The best advertisement this PHY can send out. Read more
Source§fn get_miim(&mut self) -> &mut MIIM
fn get_miim(&mut self) -> &mut MIIM
Get a mutable reference to the Media Independent Interface (
Miim
) for this PHYSource§fn get_phy_addr(&self) -> u8
fn get_phy_addr(&self) -> u8
Get the address of this PHY
Source§fn modify_bcr<F>(&mut self, f: F)
fn modify_bcr<F>(&mut self, f: F)
Modify the Base Control Register of this PHY
Source§fn is_resetting(&mut self) -> bool
fn is_resetting(&mut self) -> bool
Check if the PHY is currently resetting
Source§fn reset(&mut self)
fn reset(&mut self)
Reset the PHY. Verify that the reset by checking
Self::is_resetting
== false before continuing usageSource§fn blocking_reset(&mut self)
fn blocking_reset(&mut self)
Perform a reset, blocking until the reset is completed
Source§fn phy_link_up(&mut self) -> bool
fn phy_link_up(&mut self) -> bool
Check if the PHY reports its link as being up
Source§fn autoneg_completed(&mut self) -> bool
fn autoneg_completed(&mut self) -> bool
Check if the PHY reports its autonegotiation process
as having completed
Source§fn extended_status(&mut self) -> Option<ExtendedPhyStatus>
fn extended_status(&mut self) -> Option<ExtendedPhyStatus>
Read the Extended Status Register for this PHY. Read more
Source§fn set_autonegotiation_advertisement(
&mut self,
ad: AutoNegotiationAdvertisement,
)
fn set_autonegotiation_advertisement( &mut self, ad: AutoNegotiationAdvertisement, )
Set the autonegotiation advertisement and restarts the autonegotiation
process Read more
Source§fn get_autonegotiation_caps(&mut self) -> Option<AutoNegotiationAdvertisement>
fn get_autonegotiation_caps(&mut self) -> Option<AutoNegotiationAdvertisement>
Get the advertised capabilities of this PHY Read more
Source§fn get_autonegotiation_partner_caps(
&mut self,
) -> Option<AutoNegotiationAdvertisement>
fn get_autonegotiation_partner_caps( &mut self, ) -> Option<AutoNegotiationAdvertisement>
Get the capabilites of the autonegotiation partner of this PHY Read more
Auto Trait Implementations§
impl<MIIM> Freeze for BarePhy<MIIM>where
MIIM: Freeze,
impl<MIIM> RefUnwindSafe for BarePhy<MIIM>where
MIIM: RefUnwindSafe,
impl<MIIM> Send for BarePhy<MIIM>where
MIIM: Send,
impl<MIIM> Sync for BarePhy<MIIM>where
MIIM: Sync,
impl<MIIM> Unpin for BarePhy<MIIM>where
MIIM: Unpin,
impl<MIIM> UnwindSafe for BarePhy<MIIM>where
MIIM: 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