|
Zephyr API Documentation 4.4.99
A Scalable Open Source RTOS
|
Driver Operations Ethernet PHY driver operations More...
#include <zephyr/net/phy.h>
Data Fields | |
| int(* | get_link )(const struct device *dev, struct phy_link_state *state) |
| OPT Get PHY link state. | |
| int(* | cfg_link )(const struct device *dev, enum phy_link_speed adv_speeds, enum phy_cfg_link_flag flags) |
| OPT Configure PHY link. | |
| int(* | link_cb_set )(const struct device *dev, phy_callback_t cb, void *user_data) |
| OPT Set link state change callback. | |
| int(* | read )(const struct device *dev, uint16_t reg_addr, uint32_t *data) |
| OPT Read PHY registers. | |
| int(* | write )(const struct device *dev, uint16_t reg_addr, uint32_t data) |
| OPT Write PHY register. | |
| int(* | read_c45 )(const struct device *dev, uint8_t devad, uint16_t regad, uint16_t *data) |
| OPT Read PHY C45 register. | |
| int(* | write_c45 )(const struct device *dev, uint8_t devad, uint16_t regad, uint16_t data) |
| OPT Write PHY C45 register. | |
| int(* | set_plca_cfg )(const struct device *dev, struct phy_plca_cfg *plca_cfg) |
| OPT Write PHY PLCA configuration. | |
| int(* | get_plca_cfg )(const struct device *dev, struct phy_plca_cfg *plca_cfg) |
| OPT Read PHY PLCA configuration. | |
| int(* | get_plca_sts )(const struct device *dev, bool *plca_sts) |
| OPT Read PHY PLCA status. | |
Driver Operations Ethernet PHY driver operations
This is the driver API structure any Ethernet PHY driver needs to define. It contains function pointers to the operations the driver implements, as well as any other driver-specific constant data.
Members marked with REQ MUST be set by the driver, whereas those marked with OPT are optional.
| int(* ethphy_driver_api::cfg_link) (const struct device *dev, enum phy_link_speed adv_speeds, enum phy_cfg_link_flag flags) |
OPT Configure PHY link.
| int(* ethphy_driver_api::get_link) (const struct device *dev, struct phy_link_state *state) |
OPT Get PHY link state.
| int(* ethphy_driver_api::get_plca_cfg) (const struct device *dev, struct phy_plca_cfg *plca_cfg) |
OPT Read PHY PLCA configuration.
CONFIG_ETH_PHY_API_PLCA. OPT Read PHY PLCA status.
CONFIG_ETH_PHY_API_PLCA. | int(* ethphy_driver_api::link_cb_set) (const struct device *dev, phy_callback_t cb, void *user_data) |
OPT Set link state change callback.
OPT Read PHY registers.
| int(* ethphy_driver_api::read_c45) (const struct device *dev, uint8_t devad, uint16_t regad, uint16_t *data) |
OPT Read PHY C45 register.
| int(* ethphy_driver_api::set_plca_cfg) (const struct device *dev, struct phy_plca_cfg *plca_cfg) |
OPT Write PHY PLCA configuration.
CONFIG_ETH_PHY_API_PLCA. OPT Write PHY register.
| int(* ethphy_driver_api::write_c45) (const struct device *dev, uint8_t devad, uint16_t regad, uint16_t data) |
OPT Write PHY C45 register.