pub struct Smi { /* private fields */ }Expand description
Station Management Interface for MII PHY register access.
Implementations§
Source§impl Smi
impl Smi
Sourcepub fn read(&mut self, phy_addr: u8, reg: u8) -> Result<u16, SmiError>
pub fn read(&mut self, phy_addr: u8, reg: u8) -> Result<u16, SmiError>
Read a PHY register.
Returns SmiError::Timeout if the management interface remains busy.
Sourcepub fn write(&mut self, phy_addr: u8, reg: u8, val: u16) -> Result<(), SmiError>
pub fn write(&mut self, phy_addr: u8, reg: u8, val: u16) -> Result<(), SmiError>
Write a PHY register.
Returns SmiError::Timeout if the management interface remains busy.