GaIA BIOS Library
Loading...
Searching...
No Matches
nx_phy_utils.h File Reference

GaIA PHY NetXDuo utility functions prototypes. More...

#include <stdint.h>
#include "nx_phy_driver.h"

Functions

int32_t phy_utils_reset (const nx_phy_ioctx_t *io_ctx, uint8_t dev_addr)
 Utility to reset the PHY.
int32_t phy_utils_set_power_mode (const nx_phy_ioctx_t *io_ctx, uint8_t dev_addr, int32_t power_mode)
 Utility to set the power mode of the PHY.
int32_t phy_utils_set_mode (const nx_phy_ioctx_t *io_ctx, uint8_t dev_addr, int32_t mode)
 Utility to set the mode of the PHY.
int32_t phy_utils_get_link_state (const nx_phy_ioctx_t *io_ctx, uint8_t dev_addr, int32_t *link_state)
 Utility to get the PHY's link state.
int32_t phy_utils_get_link_info (const nx_phy_ioctx_t *io_ctx, uint8_t dev_addr, int32_t *link_info)
 Utility to get the PHY's link information.

Detailed Description

GaIA PHY NetXDuo utility functions prototypes.

Function Documentation

◆ phy_utils_get_link_info()

int32_t phy_utils_get_link_info ( const nx_phy_ioctx_t * io_ctx,
uint8_t dev_addr,
int32_t * link_info )

Utility to get the PHY's link information.

Parameters
io_ctxpointer to PHY context structure.
dev_addraddress of the device
link_infopointer to variable where to store the link information.
Returns
PHY_ERROR_NONE if successful, error code otherwise

◆ phy_utils_get_link_state()

int32_t phy_utils_get_link_state ( const nx_phy_ioctx_t * io_ctx,
uint8_t dev_addr,
int32_t * link_state )

Utility to get the PHY's link state.

Parameters
io_ctxpointer to PHY context structure.
dev_addraddress of the device.
link_statepointer to variable where to store the link state.
Returns
PHY_ERROR_NONE if successful, error code otherwise

◆ phy_utils_reset()

int32_t phy_utils_reset ( const nx_phy_ioctx_t * io_ctx,
uint8_t dev_addr )

Utility to reset the PHY.

Parameters
io_ctxpointer to PHY context structure.
dev_addraddress of the device.
Returns
PHY_ERROR_NONE if successful, error code otherwise.

◆ phy_utils_set_mode()

int32_t phy_utils_set_mode ( const nx_phy_ioctx_t * io_ctx,
uint8_t dev_addr,
int32_t mode )

Utility to set the mode of the PHY.

Parameters
io_ctxpointer to PHY context structure.
dev_addraddress of the device.
modemode (speed, half/full duplex, autonegotiation).
Returns
PHY_ERROR_NONE if successful, error code otherwise.

◆ phy_utils_set_power_mode()

int32_t phy_utils_set_power_mode ( const nx_phy_ioctx_t * io_ctx,
uint8_t dev_addr,
int32_t power_mode )

Utility to set the power mode of the PHY.

Parameters
io_ctxpointer to PHY context structure.
dev_addraddress of the device.
power_modepower mode.
Returns
PHY_ERROR_NONE if successful, error code otherwise.