1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
//! Ethernet PHY drivers.
//!
//! This module provides a generic PHY driver trait and implementations for
//! common PHY chips used with ESP32 Ethernet.
//!
//! # Overview
//!
//! The PHY layer is independent of the MAC implementation and communicates
//! through the MDIO bus interface. This enables:
//!
//! - Reuse across different MAC implementations
//! - Easy addition of new PHY drivers
//! - Testing with mock MDIO implementations
//!
//! # Supported PHY Chips
//!
//! - [`Lan8720a`]: Microchip/SMSC LAN8720A (most common for ESP32)
//!
//! # Usage
//!
//! ```ignore
//! use ph_esp32_mac::hal::MdioController;
//! use ph_esp32_mac::phy::{Lan8720a, PhyDriver};
//!
//! let mut mdio = MdioController::new(&mut delay);
//! let mut phy = Lan8720a::new(0);
//! phy.init(&mut mdio)?;
//!
//! if let Some(link) = phy.poll_link(&mut mdio)? {
//! // update MAC config
//! }
//! ```
//!
//! # Reset Pin Support
//!
//! `Lan8720aWithReset` accepts any `embedded_hal::digital::OutputPin`:
//!
//! ```ignore
//! use ph_esp32_mac::phy::{Lan8720aWithReset, PhyDriver};
//!
//! let reset_pin = io.pins.gpio5.into_push_pull_output();
//! let mut phy = Lan8720aWithReset::new(0, reset_pin);
//! phy.hardware_reset(&mut delay)?;
//! phy.init(&mut mdio)?;
//! ```
//!
//! # See Also
//!
//! - [`crate::hal::mdio`] - MDIO bus abstraction
pub use ;
pub use ;
// Re-export IEEE 802.3 standard register definitions from internal module
// These are implementation details for PHY drivers
pub use crate;