pub struct EthernetMACWithMii<MDIO, MDC>{ /* private fields */ }
Expand description
Ethernet media access control (MAC) with owned MII
This version of the struct owns it’s MII pins,
allowing it to be used directly, instead of requiring
that a Miim
is created.
Implementations§
Source§impl<MDIO, MDC> EthernetMACWithMii<MDIO, MDC>
impl<MDIO, MDC> EthernetMACWithMii<MDIO, MDC>
Sourcepub fn new(eth_mac: EthernetMAC, mdio: MDIO, mdc: MDC) -> Self
pub fn new(eth_mac: EthernetMAC, mdio: MDIO, mdc: MDC) -> Self
Create a new EthernetMAC with owned MDIO and MDC pins.
To interact with a connected Phy, use the read
and write
functions.
Functionality for interacting with PHYs from the ieee802_3_miim
crate
is available.
Sourcepub fn release_pins(self) -> (EthernetMAC, MDIO, MDC)
pub fn release_pins(self) -> (EthernetMAC, MDIO, MDC)
Release the owned MDIO and MDC pins, and return an EthernetMAC that has to borrow the MDIO and MDC pins.
Source§impl<MDIO, MDC> EthernetMACWithMii<MDIO, MDC>
impl<MDIO, MDC> EthernetMACWithMii<MDIO, MDC>
Methods from Deref<Target = EthernetMAC>§
Sourcepub fn mii<'eth, 'pins, Mdio, Mdc>(
&'eth mut self,
mdio: &'pins mut Mdio,
mdc: &'pins mut Mdc,
) -> Stm32Mii<'eth, 'pins, Mdio, Mdc>
pub fn mii<'eth, 'pins, Mdio, Mdc>( &'eth mut self, mdio: &'pins mut Mdio, mdc: &'pins mut Mdc, ) -> Stm32Mii<'eth, 'pins, Mdio, Mdc>
Borrow access to the MAC’s SMI.
Allows for controlling and monitoring any PHYs that may be accessible via the MDIO/MDC pins.
Exclusive access to the MDIO
and MDC
is required to ensure that are not used elsewhere
for the duration of Mii communication.
Sourcepub fn set_speed(&mut self, speed: Speed)
pub fn set_speed(&mut self, speed: Speed)
Set the Ethernet Speed at which the MAC communicates
Note that this does not affect the PHY in any way. To
configure the PHY, use EthernetMACWithMii
(see: Self::with_mii
)
or Stm32Mii
(see: Self::mii
)