pub struct KSZ8081R<MIIM>where
MIIM: Miim,{ /* private fields */ }
Expand description
A KSZ8081R
Implementations§
Source§impl<MIIM> KSZ8081R<MIIM>where
MIIM: Miim,
impl<MIIM> KSZ8081R<MIIM>where
MIIM: Miim,
Sourcepub const INTERRUPT_REG_INT_LINK_UP: u16 = 1u16
pub const INTERRUPT_REG_INT_LINK_UP: u16 = 1u16
A mask for determining if the Link Up Interrupt occurred
Sourcepub const INTERRUPT_REG_INT_LINK_DOWN: u16 = 4u16
pub const INTERRUPT_REG_INT_LINK_DOWN: u16 = 4u16
A mask for determining if the Link Down Interrupt occurred
Sourcepub fn new(miim: MIIM, phy_addr: u8) -> KSZ8081R<MIIM>
pub fn new(miim: MIIM, phy_addr: u8) -> KSZ8081R<MIIM>
Create a new Ksz8081r at phy_addr
, backed by the given miim
,
Sourcepub fn interrupt_enable(&mut self)
pub fn interrupt_enable(&mut self)
Enable the link up and link down interrupts
Sourcepub fn link_speed(&mut self) -> Option<PhySpeed>
pub fn link_speed(&mut self) -> Option<PhySpeed>
Get the link speed at which the PHY is currently operating
Sourcepub fn get_interrupt_reg_val(&mut self) -> u16
pub fn get_interrupt_reg_val(&mut self) -> u16
Get the value of the interrupt register.
Use Self::INTERRUPT_REG_INT_LINK_UP
and Self::INTERRUPT_REG_INT_LINK_DOWN
to determine the type of interrupt that occurred
Sourcepub fn link_established(&mut self) -> bool
pub fn link_established(&mut self) -> bool
Check whether a link is established or not
Trait Implementations§
Source§impl<MIIM> Phy<MIIM> for KSZ8081R<MIIM>where
MIIM: Miim,
impl<MIIM> Phy<MIIM> for KSZ8081R<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 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 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 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
Source§impl<MIIM> PhyWithSpeed<MIIM> for KSZ8081R<MIIM>where
MIIM: Miim,
impl<MIIM> PhyWithSpeed<MIIM> for KSZ8081R<MIIM>where
MIIM: Miim,
Source§fn get_link_speed(&mut self) -> Option<AdvancedPhySpeed>
fn get_link_speed(&mut self) -> Option<AdvancedPhySpeed>
Get the link speed at which this PHY is currently
operating.
Auto Trait Implementations§
impl<MIIM> Freeze for KSZ8081R<MIIM>where
MIIM: Freeze,
impl<MIIM> RefUnwindSafe for KSZ8081R<MIIM>where
MIIM: RefUnwindSafe,
impl<MIIM> Send for KSZ8081R<MIIM>where
MIIM: Send,
impl<MIIM> Sync for KSZ8081R<MIIM>where
MIIM: Sync,
impl<MIIM> Unpin for KSZ8081R<MIIM>where
MIIM: Unpin,
impl<MIIM> UnwindSafe for KSZ8081R<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