pub fn FXmacPhyWrite(
instance_p: &mut FXmac,
phy_address: u32,
register_num: u32,
phy_data: u16,
) -> u32Expand description
Writes data to a PHY register via MDIO.
Writes a 16-bit value to the specified register of the PHY at the given address. The MAC provides MDIO access to PHYs adhering to the IEEE 802.3 Media Independent Interface (MII) standard.
§Arguments
instance_p- Mutable reference to the FXMAC instance.phy_address- PHY address on the MDIO bus (0-31).register_num- PHY register number to write.phy_data- 16-bit data to write to the register.
§Returns
0(FT_SUCCESS) on successful write.6(FXMAC_ERR_PHY_BUSY) if the MDIO bus is busy.
§Note
The device does not need to be stopped before PHY access, but the MDIO clock should be properly configured.