![]() |
![]() |
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... | |
MDIO driver.
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).
phyAddr | PHY device address |
isAlive | Whether PHY is alive or not |
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.
phyAddr | PHY device address |
isLinked | Whether PHY is linked or not |
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.
group | User group (use 0 if single group is supported) |
phyAddr | PHY device address |
reg | Register address |
val | Value read from register |
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.
group | User group (use 0 if single group is supported) |
phyAddr | PHY device address |
reg | Register address |
val | Value read from register |
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.
group | User group (use 0 if single group is supported) |
phyAddr | PHY device address |
reg | Register address |
val | Value to be written |
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.
group | User group (use 0 if single group is supported) |
phyAddr | PHY device address |
reg | Register address |
val | Value to be written |