Skip to content

Commit 2476d41

Browse files
Johannes DraaijerJohannes Draaijer
authored andcommitted
Docs
1 parent 66de9ff commit 2476d41

File tree

2 files changed

+12
-12
lines changed

2 files changed

+12
-12
lines changed

src/lib.rs

Lines changed: 6 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -93,12 +93,8 @@ pub struct EthernetDMA<'rx, 'tx> {
9393
/// If you wish to use another configuration, please see
9494
/// [new_unchecked](new_unchecked).
9595
///
96-
/// This method does not initialise the external PHY.
97-
///
98-
/// Interacting with a PHY can be done through a struct that implementes the
99-
/// [`mac::StationManagement`] trait.
100-
///
101-
/// You may access SMI through the [`EthernetMAC::smi`] function.
96+
/// This method does not initialise the external PHY. Interacting with a PHY
97+
/// can be done by using the struct returned from [`EthernetMAC::smi`].
10298
pub fn new<'rx, 'tx, REFCLK, CRS, TXEN, TXD0, TXD1, RXD0, RXD1>(
10399
eth_mac: ETHERNET_MAC,
104100
eth_mmc: ETHERNET_MMC,
@@ -133,9 +129,10 @@ where
133129
/// If you wish to use another configuration, please see
134130
/// [new_unchecked](new_unchecked).
135131
///
136-
/// This method does not initialise the external PHY. The SMI for the external PHY
137-
/// can be accessed through a struct that implements the [`mac::StationManagement`] trait,
138-
/// which [`EthernetMAC<OwnedSmi>`] does.
132+
/// This method does not initialise the external PHY.
133+
///
134+
/// The SMI for the external PHY can be accessed through the
135+
/// returned [`EthernetMAC<OwnedSmi>`], which implements [`mac::StationManagement`].
139136
///
140137
/// # Note
141138
/// - Make sure that the buffers reside in a memory region that is

src/phy/mod.rs

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,15 +8,18 @@ pub trait Phy {
88

99
/// Reset the PHY
1010
///
11-
/// TODO: describe what "reset" actually is
11+
// TODO: describe what "reset" actually is
1212
fn reset(&mut self);
1313

1414
/// Initialize the PHY
1515
///
16-
/// TODO: describe what "init" actually is
16+
// TODO: describe what "init" actually is
1717
fn init(&mut self);
1818

19-
/// Poll the link status of this
19+
/// Poll the link status of this PHY. If it returns `true`, the
20+
/// link is up. If it returns `false`, the link is down.
21+
///
22+
// TODO: return an associated type with link information?
2023
fn poll_link(&mut self) -> bool;
2124

2225
/// Get the link speed reported by the PHY

0 commit comments

Comments
 (0)