ieee802_3_miim/
miim.rs

1//! This module defines traits and structs used for access to
2//! Media Independent Interface
3
4/// A trait used for implementing access to the Media Indepedent
5/// Interface of an IEEE 802.3 compatible PHY.
6pub trait Miim {
7    /// Read an MII register
8    ///
9    /// This function receives `&mut self` because it is likely
10    /// for implementations to expect to have unique access to underlying
11    /// hardware elements (such as pins, or the MAC itself).
12    fn read(&mut self, phy: u8, reg: u8) -> u16;
13
14    /// Write to an MII register
15    fn write(&mut self, phy: u8, reg: u8, data: u16);
16}