pub trait MdioBus {
type Error;
// Required methods
async fn read_cl22(
&mut self,
phy_id: u8,
reg: u8,
) -> Result<u16, Self::Error>;
async fn write_cl22(
&mut self,
phy_id: u8,
reg: u8,
reg_val: u16,
) -> Result<(), Self::Error>;
// Provided methods
async fn read_cl45(
&mut self,
phy_id: u8,
regc45: (u8, u16),
) -> Result<u16, Self::Error> { ... }
async fn write_cl45(
&mut self,
phy_id: u8,
regc45: (u8, u16),
reg_val: u16,
) -> Result<(), Self::Error> { ... }
}
Expand description
MdioBus
trait
Driver needs to implement the Clause 22
Optional Clause 45 is the device supports this.
Clause 45 methodes are bases on https://www.ieee802.org/3/efm/public/nov02/oam/pannell_oam_1_1102.pdf
Required Associated Types§
Required Methods§
Provided Methods§
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.