@@ -40,10 +40,11 @@ impl EthernetMAC {
4040 ///
4141 /// HCLK must be at least 25MHz, else this function will return `Err(WrongClock)`.
4242 ///
43- /// This method does not initialise the external PHY. However it does return an
44- /// [`EthernetMAC`] which implements the
45- /// [`mac::SerialManagement`] trait. This can be used to
46- /// communicate with the external PHY.
43+ /// This method does not initialise the external PHY. However, you can access SMI
44+ /// `read` and `write` functions through the `smi` and `with_smi` functions.
45+ ///
46+ /// Additionally, an optional `impl` of the [`ieee802_3_miim::Miim`] trait is available
47+ /// with the `ieee802_3_miim` feature (enabled by default), for PHY communication.
4748 pub fn new < REFCLK , CRS , TXEN , TXD0 , TXD1 , RXD0 , RXD1 > (
4849 eth_mac : ETHERNET_MAC ,
4950 eth_mmc : ETHERNET_MMC ,
@@ -154,21 +155,21 @@ impl EthernetMAC {
154155 & ' eth mut self ,
155156 mdio : & ' pins mut Mdio ,
156157 mdc : & ' pins mut Mdc ,
157- ) -> Stm32Miim < ' eth , ' pins , Mdio , Mdc >
158+ ) -> Stm32Mii < ' eth , ' pins , Mdio , Mdc >
158159 where
159160 Mdio : MdioPin ,
160161 Mdc : MdcPin ,
161162 {
162- Stm32Miim :: new ( self , mdio, mdc)
163+ Stm32Mii :: new ( self , mdio, mdc)
163164 }
164165
165- /// Turn this [`EthernetMAC`] into an [`EthernetMACWithSmi `]
166- pub fn with_smi < MDIO , MDC > ( self , mdio : MDIO , mdc : MDC ) -> EthernetMACWithMiim < MDIO , MDC >
166+ /// Turn this [`EthernetMAC`] into an [`EthernetMACWithMii `]
167+ pub fn with_smi < MDIO , MDC > ( self , mdio : MDIO , mdc : MDC ) -> EthernetMACWithMii < MDIO , MDC >
167168 where
168169 MDIO : MdioPin ,
169170 MDC : MdcPin ,
170171 {
171- EthernetMACWithMiim {
172+ EthernetMACWithMii {
172173 eth_mac : self ,
173174 mdio,
174175 mdc,
@@ -181,7 +182,7 @@ impl EthernetMAC {
181182/// This version of the struct owns it's SMI pins,
182183/// allowing it to be used directly, instead of requiring
183184/// that a [`Miim`] is created.
184- pub struct EthernetMACWithMiim < MDIO , MDC >
185+ pub struct EthernetMACWithMii < MDIO , MDC >
185186where
186187 MDIO : MdioPin ,
187188 MDC : MdcPin ,
@@ -191,15 +192,17 @@ where
191192 mdc : MDC ,
192193}
193194
194- impl < MDIO , MDC > EthernetMACWithMiim < MDIO , MDC >
195+ impl < MDIO , MDC > EthernetMACWithMii < MDIO , MDC >
195196where
196197 MDIO : MdioPin ,
197198 MDC : MdcPin ,
198199{
199200 /// Create a new EthernetMAC with owned MDIO and MDC pins.
200201 ///
201- /// To interact with a connected Phy, use this struct's impl of
202- /// [`SerialManagement`]
202+ /// To interact with a connected Phy, use the `read` and `write` functions.
203+ ///
204+ /// Functionality for interacting with PHYs from the `ieee802_3_miim` crate
205+ /// is available if the default feature `ieee802_3_miim` is enabled.
203206 pub fn new ( eth_mac : EthernetMAC , mdio : MDIO , mdc : MDC ) -> Self {
204207 Self { eth_mac, mdio, mdc }
205208 }
@@ -211,7 +214,7 @@ where
211214 }
212215}
213216
214- impl < MDIO , MDC > Deref for EthernetMACWithMiim < MDIO , MDC >
217+ impl < MDIO , MDC > Deref for EthernetMACWithMii < MDIO , MDC >
215218where
216219 MDIO : MdioPin ,
217220 MDC : MdcPin ,
@@ -223,7 +226,7 @@ where
223226 }
224227}
225228
226- impl < MDIO , MDC > EthernetMACWithMiim < MDIO , MDC >
229+ impl < MDIO , MDC > EthernetMACWithMii < MDIO , MDC >
227230where
228231 MDIO : MdioPin ,
229232 MDC : MdcPin ,
@@ -242,7 +245,7 @@ where
242245}
243246
244247#[ cfg( feature = "ieee802_3_miim" ) ]
245- impl < MDIO , MDC > miim:: Miim for EthernetMACWithMiim < MDIO , MDC >
248+ impl < MDIO , MDC > miim:: Miim for EthernetMACWithMii < MDIO , MDC >
246249where
247250 MDIO : MdioPin ,
248251 MDC : MdcPin ,
0 commit comments