Trait Miim

Source
pub trait Miim {
    // Required methods
    fn read(&mut self, phy: u8, reg: u8) -> u16;
    fn write(&mut self, phy: u8, reg: u8, data: u16);
}
Expand description

A trait used for implementing access to the Media Indepedent Interface of an IEEE 802.3 compatible PHY.

Required Methods§

Source

fn read(&mut self, phy: u8, reg: u8) -> u16

Read an MII register

This function receives &mut self because it is likely for implementations to expect to have unique access to underlying hardware elements (such as pins, or the MAC itself).

Source

fn write(&mut self, phy: u8, reg: u8, data: u16)

Write to an MII register

Implementors§

Source§

impl<'eth, 'pins, Mdio, Mdc> Miim for Stm32Mii<'eth, 'pins, Mdio, Mdc>
where Mdio: MdioPin, Mdc: MdcPin,

Source§

impl<MDIO, MDC> Miim for EthernetMACWithMii<MDIO, MDC>
where MDIO: MdioPin, MDC: MdcPin,