Data Fields
EnetPhy_Mdio_s Struct Reference

MDIO driver. More...

#include <enetphy.h>

Data Fields

int32_t(* isAlive )(uint32_t phyAddr, bool *isAlive)
 Check if PHY is alive. More...
 
int32_t(* isLinked )(uint32_t phyAddr, bool *isLinked)
 Check if PHY is linked. More...
 
int32_t(* readC22 )(uint32_t group, uint8_t phyAddr, uint32_t reg, uint16_t *val)
 Read PHY register using Clause-22 frame. More...
 
int32_t(* writeC22 )(uint32_t group, uint8_t phyAddr, uint32_t reg, uint16_t val)
 Write PHY register using Clause-22 frame. More...
 
int32_t(* readC45 )(uint32_t group, uint8_t phyAddr, uint8_t mmd, uint16_t reg, uint16_t *val)
 Read PHY register using Clause-45 frame. More...
 
int32_t(* writeC45 )(uint32_t group, uint8_t phyAddr, uint8_t mmd, uint16_t reg, uint16_t val)
 Write PHY register using Clause-45 frame. More...
 

Detailed Description

MDIO driver.

Field Documentation

int32_t(* EnetPhy_Mdio_s::isAlive)(uint32_t phyAddr, bool *isAlive)

Check if PHY is alive.

Checks if PHY is alive, either using an explicit register read or any other mechanism supported by the MDIO peripheral (i.e. background BMSR reads).

Parameters
phyAddrPHY device address
isAliveWhether PHY is alive or not
Returns
EnetPhy_ErrorCodes
int32_t(* EnetPhy_Mdio_s::isLinked)(uint32_t phyAddr, bool *isLinked)

Check if PHY is linked.

Checks if PHY is linked, either using an explicit register read or any other mechanism supported by the MDIO peripheral.

Parameters
phyAddrPHY device address
isLinkedWhether PHY is linked or not
Returns
EnetPhy_ErrorCodes
int32_t(* EnetPhy_Mdio_s::readC22)(uint32_t group, uint8_t phyAddr, uint32_t reg, uint16_t *val)

Read PHY register using Clause-22 frame.

Reads a PHY register using a Clause-22 frame.

Parameters
groupUser group (use 0 if single group is supported)
phyAddrPHY device address
regRegister address
valValue read from register
Returns
EnetPhy_ErrorCodes
int32_t(* EnetPhy_Mdio_s::readC45)(uint32_t group, uint8_t phyAddr, uint8_t mmd, uint16_t reg, uint16_t *val)

Read PHY register using Clause-45 frame.

Reads a PHY register using a Clause-45 frame. Returns ENETPHY_ENOTSUPPORTED if MDIO doesn't support Clause-45 frames.

Parameters
groupUser group (use 0 if single group is supported)
phyAddrPHY device address
regRegister address
valValue read from register
Returns
EnetPhy_ErrorCodes
int32_t(* EnetPhy_Mdio_s::writeC22)(uint32_t group, uint8_t phyAddr, uint32_t reg, uint16_t val)

Write PHY register using Clause-22 frame.

Writes a PHY register using a Clause-22 frame.

Parameters
groupUser group (use 0 if single group is supported)
phyAddrPHY device address
regRegister address
valValue to be written
Returns
EnetPhy_ErrorCodes
int32_t(* EnetPhy_Mdio_s::writeC45)(uint32_t group, uint8_t phyAddr, uint8_t mmd, uint16_t reg, uint16_t val)

Write PHY register using Clause-45 frame.

Writes a PHY register using a Clause-45 frame. Returns ENETPHY_ENOTSUPPORTED if MDIO doesn't support Clause-45 frames.

Parameters
groupUser group (use 0 if single group is supported)
phyAddrPHY device address
regRegister address
valValue to be written
Returns
EnetPhy_ErrorCodes

The documentation for this struct was generated from the following file:

Copyright 2020, Texas Instruments Incorporated