AM263Px MCU+ SDK: Phy_DrvObj_t Struct Reference

| AM263Px MCU+ SDK 26.00.00 |

Data Fields
Phy_DrvObj_t Struct Reference
APIs for Networking modules » APIs for Enet LLD » Ethernet PHY Driver » TI PHY COMMON

## Data Fields
struct {
const char * name
| Driver name. More...
bool(* isPhyDevSupported )(EthPhyDrv_Handle hPhy, const void *pVersion)
| Check if driver supports a PHY model identified by its version. More...
bool(* isMacModeSupported )(EthPhyDrv_Handle hPhy, Phy_Mii mii)
| Check if driver supports a MII interface type. More...
void(* bind )(EthPhyDrv_Handle *hPhy, uint8_t phyAddr, Phy_RegAccessCb_t *pRegAccessCb)
| PHY bind. More...
int32_t(* config )(EthPhyDrv_Handle hPhy, const void *pExtCfg, const uint32_t extCfgSize, Phy_Mii mii, bool loopbackEn)
| PHY specific configuration. More...
void(* reset )(EthPhyDrv_Handle hPhy)
| PHY specific soft reset. More...
bool(* isResetComplete )(EthPhyDrv_Handle hPhy)
| PHY specific soft reset status. More...
int32_t(* readReg )(EthPhyDrv_Handle hPhy, uint32_t reg, uint16_t *val)
| Read PHY register. More...
int32_t(* writeReg )(EthPhyDrv_Handle hPhy, uint32_t reg, uint16_t val)
| Write PHY register. More...
int32_t(* readExtReg )(EthPhyDrv_Handle hPhy, uint32_t reg, uint16_t *val)
| Read PHY extended register. More...
int32_t(* writeExtReg )(EthPhyDrv_Handle hPhy, uint32_t reg, uint16_t val)
| Write PHY extended register. More...
int32_t(* rmwExtReg )(EthPhyDrv_Handle hPhy, uint32_t reg, uint16_t mask, uint16_t *val)
| Read-modify-write PHY extended register. More...
void(* printRegs )(EthPhyDrv_Handle hPhy)
int32_t(* adjPtpFreq )(EthPhyDrv_Handle hPhy, int64_t ppb)
| Adjust PHY PTP clock frequency. More...
int32_t(* adjPtpPhase )(EthPhyDrv_Handle hPhy, int64_t offset)
| Adjust PHY PTP clock phase. More...
int32_t(* getPtpTime )(EthPhyDrv_Handle hPhy, uint64_t *ts64)
| Get current PHY PTP clock time. More...
int32_t(* setPtpTime )(EthPhyDrv_Handle hPhy, uint64_t ts64)
| Set PHY PTP clock time. More...
int32_t(* getPtpTxTime )(EthPhyDrv_Handle hPhy, uint32_t domain, uint32_t msgType, uint32_t seqId, uint64_t *ts64)
| Get PHY PTP TX packet timestamp. More...
int32_t(* getPtpRxTime )(EthPhyDrv_Handle hPhy, uint32_t domain, uint32_t msgType, uint32_t seqId, uint64_t *ts64)
| Get PHY PTP RX packet timestamp. More...
int32_t(* waitPtpTxTime )(EthPhyDrv_Handle hPhy, uint32_t domain, uint32_t msgType, uint32_t seqId)
| Add PHY PTP TX packet info to a waiting TX timestamp list. More...
int32_t(* procStatusFrame )(EthPhyDrv_Handle hPhy, uint8_t *frame, uint32_t size, uint32_t *types)
| Process PHY status frame. More...
int32_t(* getStatusFrameEthHeader )(EthPhyDrv_Handle hPhy, uint8_t *ethhdr, uint32_t size)
| Get PHY status frame header. More...
int32_t(* enablePtp )(EthPhyDrv_Handle hPhy, bool on, uint32_t srcMacStatusFrameType)
| Enable or disable the PHY PTP module. More...
int32_t(* tickDriver )(EthPhyDrv_Handle hPhy)
| Provide timer tick to the driver. More...
int32_t(* enableEventCapture )(EthPhyDrv_Handle hPhy, uint32_t eventIdx, bool falling, bool on)
| Enable/Disable an event capture on a PHY GPIO pin. More...
int32_t(* enableTriggerOutput )(EthPhyDrv_Handle hPhy, uint32_t triggerIdx, uint64_t start, uint64_t period, bool repeat)
| Enable/Disable trigger output on a GPIO pin. More...
int32_t(* getEventTs )(EthPhyDrv_Handle hPhy, uint32_t *eventIdx, uint32_t *seqId, uint64_t *ts64)
| Get event timestamp. More...
int32_t(* configMediaClock )(EthPhyDrv_Handle hPhy, bool isMaster, uint8_t *streamIDMatchValue, bool enTrigOut)
| config Media Clock More...
int32_t(* nudgeCodecClock )(EthPhyDrv_Handle hPhy, int8_t nudgeValue)
| Nudge Codec Clock. More...
void(* restart )(EthPhyDrv_Handle hPhy)
| PHY specific software restart. More...
int32_t(* isRestartComplete )(EthPhyDrv_Handle hPhy, bool *pCompleted)
| PHY specific soft reset status. More...
int32_t(* getId )(EthPhyDrv_Handle hPhy, uint32_t *pId)
| Provides PHY ID value as 32-bit value. More...
int32_t(* ctrlPowerDown )(EthPhyDrv_Handle hPhy, bool control)
| Controls IEEE power down feature. More...
int32_t(* isPowerDownActive )(EthPhyDrv_Handle hPhy, bool *pActive)
| Checks if IEEE power down feature is enabled. More...
int32_t(* enableAdvertisement )(EthPhyDrv_Handle hPhy, uint32_t advertisement)
| Based on flags will enable required advertisement for Auto Negotiation phase. More...
int32_t(* disableAdvertisement )(EthPhyDrv_Handle hPhy, uint32_t advertisement)
| Based on flags will disable required advertisement for Auto Negotiation phase. More...
int32_t(* ctrlAutoNegotiation )(EthPhyDrv_Handle hPhy, uint32_t control)
| Controls Auto Negotiation feature. More...
int32_t(* isLinkPartnerAutoNegotiationAble )(EthPhyDrv_Handle hPhy, bool *pAble)
| Provides Link-Partner Auto-Negotiation Able flag. More...
int32_t(* isAutoNegotiationEnabled )(EthPhyDrv_Handle hPhy, bool *pEnabled)
| Checks if Auto Negotiation is enabled. More...
int32_t(* isAutoNegotiationComplete )(EthPhyDrv_Handle hPhy, bool *pCompleted)
| Checks status of Auto Negotiation process. More...
int32_t(* isAutoNegotiationRestartComplete )(EthPhyDrv_Handle hPhy, bool *pCompleted)
| Checks status of Auto Negotiation restart process. More...
int32_t(* isLinkUp )(EthPhyDrv_Handle hPhy, bool *pLinkUp)
| Checks link state. More...
int32_t(* setSpeedDuplex )(EthPhyDrv_Handle hPhy, uint32_t settings)
| Sets speed and duplex settings to control data rate of the Ethernet link when Auto Negotiation is disabled. More...
int32_t(* getSpeedDuplex )(EthPhyDrv_Handle hPhy, Phy_Link_SpeedDuplex *pConfig)
| Provides selected speed and duplex when link is up. More...
void(* setMiiMode )(EthPhyDrv_Handle hPhy, Phy_Mii mii)
| Configures MII mode. More...
int32_t(* ctrlExtFD )(EthPhyDrv_Handle hPhy, bool control)
| Enables to declare Full Duplex also in parallel detect link. More...
int32_t(* ctrlOddNibbleDetection )(EthPhyDrv_Handle hPhy, bool control)
| Controls detection of transmit error in odd-nibble boundary. More...
int32_t(* ctrlRxErrIdle )(EthPhyDrv_Handle hPhy, bool control)
| Controls detection of Receive Symbol Error during IDLE State. More...
int32_t(* ctrlFastLinkDownOption )(EthPhyDrv_Handle hPhy, uint32_t control)
| Controls fast link down option. More...
} | fxn
EthPhyDrv_Handle | hDrv

## Field Documentation

## ◆ name

const char* Phy_DrvObj_t::name

Driver name.

Name of the PHY-specific driver.

## ◆ isPhyDevSupported

bool(* Phy_DrvObj_t::isPhyDevSupported) (EthPhyDrv_Handle hPhy, const void *pVersion)

Check if driver supports a PHY model identified by its version.

PHY-specific function that drivers must implement for upper check if the PHY driver supports a PHY model identified by its version from ID1 and ID2 registers.

Note that a given PHY driver can support multiple PHY models.

Parameters

  hPhy | PHY device handle
  version | PHY version from ID registers

Returns
  Whether PHY model is supported or not

## ◆ isMacModeSupported

bool(* Phy_DrvObj_t::isMacModeSupported) (EthPhyDrv_Handle hPhy, Phy_Mii mii)

Check if driver supports a MII interface type.

PHY-specific function that drivers must implement for upper layer to check whether a MAC mode is supported by the PHY driver or not.

Parameters

  hPhy | PHY device handle
  mii | MII interface

Returns
  Whether MII interface type is supported or not

## ◆ bind

void(* Phy_DrvObj_t::bind) (EthPhyDrv_Handle *hPhy, uint8_t phyAddr, Phy_RegAccessCb_t *pRegAccessCb)

PHY bind.

PHY-specific function that binds the driver handle and register access functions to specific PHY device.

Parameters

  hPhy | PHY device handle
  phyAddr | PHY address
  pRegAccessCb | PHY register access function pointers

## ◆ config

int32_t(* Phy_DrvObj_t::config) (EthPhyDrv_Handle hPhy, const void *pExtCfg, const uint32_t extCfgSize, Phy_Mii mii, bool loopbackEn)

PHY specific configuration.

PHY-specific function that drivers must implement to configure the PHY device. The configuration can be composed of generic and PHY-specific parameter (via extended config).

Parameters

  hPhy | PHY device handle
  cfg | PHY configuration parameter
  mii | MII interface

Returns
  EnetPhy_ErrorCodes

## ◆ reset

void(* Phy_DrvObj_t::reset) (EthPhyDrv_Handle hPhy)

PHY specific soft reset.

PHY-specific function that drivers must implement to start a soft-reset operation.

Parameters

  hPhy | PHY device handle

## ◆ isResetComplete

bool(* Phy_DrvObj_t::isResetComplete) (EthPhyDrv_Handle hPhy)

PHY specific soft reset status.

PHY-specific function that drivers must implement to check if soft-reset operation is complete.

Parameters

  hPhy | PHY device handle

Returns
  Whether soft-reset is complete or not.

## ◆ readReg

int32_t(* Phy_DrvObj_t::readReg) (EthPhyDrv_Handle hPhy, uint32_t reg, uint16_t *val)

Read PHY register.

PHY-specific function that drivers must implement to read register.

Parameters

  hPhy | PHY device handle
  reg | Register number
  val | Pointer to the read value

Returns
  EnetPhy_ErrorCodes

## ◆ writeReg

int32_t(* Phy_DrvObj_t::writeReg) (EthPhyDrv_Handle hPhy, uint32_t reg, uint16_t val)

Write PHY register.

PHY-specific function that drivers must implement to write extended registers.

Parameters

  hPhy | PHY device handle
  reg | Register number
  val | Value to be written

Returns
  EnetPhy_ErrorCodes

## ◆ readExtReg

int32_t(* Phy_DrvObj_t::readExtReg) (EthPhyDrv_Handle hPhy, uint32_t reg, uint16_t *val)

Read PHY extended register.

PHY-specific function that drivers must implement to read extended registers.

Parameters

  hPhy | PHY device handle
  reg | Register number
  val | Pointer to the read value

Returns
  EnetPhy_ErrorCodes

## ◆ writeExtReg

int32_t(* Phy_DrvObj_t::writeExtReg) (EthPhyDrv_Handle hPhy, uint32_t reg, uint16_t val)

Write PHY extended register.

PHY-specific function that drivers must implement to write extended registers.

Parameters

  hPhy | PHY device handle
  reg | Register number
  val | Value to be written

Returns
  EnetPhy_ErrorCodes

## ◆ rmwExtReg

int32_t(* Phy_DrvObj_t::rmwExtReg) (EthPhyDrv_Handle hPhy, uint32_t reg, uint16_t mask, uint16_t *val)

Read-modify-write PHY extended register.

PHY-specific function that drivers must implement to read-write-modify extended registers.

Parameters

  group | User group (use 0 if single group is supported)
  phyAddr | PHY device address
  reg | Register address
  val | Value read from register

## ◆ printRegs

void(* Phy_DrvObj_t::printRegs) (EthPhyDrv_Handle hPhy)

Print PHY registers

## ◆ adjPtpFreq

int32_t(* Phy_DrvObj_t::adjPtpFreq) (EthPhyDrv_Handle hPhy, int64_t ppb)

Adjust PHY PTP clock frequency.

Optional PHY function to adjust PTP clock frequency. This function can only be supported when the PHY has a built-in PTP clock.

Parameters

  hPhy | PHY device handle
  ppb | Part per billion

Returns
  EnetPhy_ErrorCodes

## ◆ adjPtpPhase

int32_t(* Phy_DrvObj_t::adjPtpPhase) (EthPhyDrv_Handle hPhy, int64_t offset)

Adjust PHY PTP clock phase.

Optional PHY function to adjust PTP clock phase. This function can only be supported when the PHY has a built-in PTP clock.

Parameters

  hPhy | PHY device handle
  offset | Offset to current clock time in nanosec unit.

Returns
  EnetPhy_ErrorCodes

## ◆ getPtpTime

int32_t(* Phy_DrvObj_t::getPtpTime) (EthPhyDrv_Handle hPhy, uint64_t *ts64)

Get current PHY PTP clock time.

Optional PHY function to get current PHY PTP clock time. This function can only be supported when the PHY has a built-in PTP clock.

Parameters

  hPhy | PHY device handle
  ts64 | Output current PTP clock time in nanosec unit.

Returns
  EnetPhy_ErrorCodes

## ◆ setPtpTime

int32_t(* Phy_DrvObj_t::setPtpTime) (EthPhyDrv_Handle hPhy, uint64_t ts64)

Set PHY PTP clock time.

Optional PHY function to set PHY PTP clock time. This function can only be supported when the PHY has a built-in PTP clock.

Parameters

  hPhy | PHY device handle
  ts64 | PTP time in nanosec unit will be set.

Returns
  EnetPhy_ErrorCodes

## ◆ getPtpTxTime

int32_t(* Phy_DrvObj_t::getPtpTxTime) (EthPhyDrv_Handle hPhy, uint32_t domain, uint32_t msgType, uint32_t seqId, uint64_t *ts64)

Get PHY PTP TX packet timestamp.

Optional PHY function to get PHY PTP TX packet timestamp. This function can only be supported when the PHY has a built-in PTP clock.

Parameters

  hPhy | PHY device handle
  domain | PTP domain (in the packet header)
  msgType | PTP message type (in the packet header)
  seqId | PTP packet sequence ID (in the packet header)
  ts64 | Output PTP TX packet timestamp in nanosec unit.

Returns
  EnetPhy_ErrorCodes

## ◆ getPtpRxTime

int32_t(* Phy_DrvObj_t::getPtpRxTime) (EthPhyDrv_Handle hPhy, uint32_t domain, uint32_t msgType, uint32_t seqId, uint64_t *ts64)

Get PHY PTP RX packet timestamp.

Optional PHY function to get PHY PTP RX packet timestamp. This function can only be supported when the PHY has a built-in PTP clock.

Parameters

  hPhy | PHY device handle
  domain | PTP domain (in the packet header)
  msgType | PTP message type (in the packet header)
  seqId | PTP packet sequence ID (in the packet header)
  ts64 | Output PTP RX packet timestamp in nanosec unit.

Returns
  EnetPhy_ErrorCodes

## ◆ waitPtpTxTime

int32_t(* Phy_DrvObj_t::waitPtpTxTime) (EthPhyDrv_Handle hPhy, uint32_t domain, uint32_t msgType, uint32_t seqId)

Add PHY PTP TX packet info to a waiting TX timestamp list.

Optional PHY function to get PHY PTP TX packet timestamp. This function can only be supported when the PHY has a built-in PTP clock.

Parameters

  hPhy | PHY device handle
  domain | PTP domain (in the packet header)
  msgType | PTP message type (in the packet header)
  seqId | PTP packet sequence ID (in the packet header)

Returns
  EnetPhy_ErrorCodes

## ◆ procStatusFrame

int32_t(* Phy_DrvObj_t::procStatusFrame) (EthPhyDrv_Handle hPhy, uint8_t *frame, uint32_t size, uint32_t *types)

Process PHY status frame.

Optional PHY function to process PHY status frame. This function can only be supported when the PHY has a built-in PTP clock.

Parameters

  hPhy | PHY device handle
  frame | Ethernet PHY status frame
  size | Frame size
  types | Types of processed frame

Returns
  EnetPhy_ErrorCodes

## ◆ getStatusFrameEthHeader

int32_t(* Phy_DrvObj_t::getStatusFrameEthHeader) (EthPhyDrv_Handle hPhy, uint8_t *ethhdr, uint32_t size)

Get PHY status frame header.

Optional PHY function to get the Ethernet header of the PHY status frame. This function can only be supported when the PHY has a built-in PTP clock.

Parameters

  hPhy | PHY device handle
  ethhdr | Buffer to get the ethernet header of the PHY status frame.
  size | Buffer size (at least 14 bytes)

Returns
  EnetPhy_ErrorCodes

## ◆ enablePtp

int32_t(* Phy_DrvObj_t::enablePtp) (EthPhyDrv_Handle hPhy, bool on, uint32_t srcMacStatusFrameType)

Enable or disable the PHY PTP module.

Optional PHY function to enable or disable the PHY PTP module. This function can only be supported when the PHY has a built-in PTP clock.

Parameters

  hPhy | PHY device handle
  on | Flag indicate enable (on=true) or disable(on=false) PTP module
  srcMacStatusFrameType | The PHY-specific src MAC of the status frame.

Returns
  EnetPhy_ErrorCodes

## ◆ tickDriver

int32_t(* Phy_DrvObj_t::tickDriver) (EthPhyDrv_Handle hPhy)

Provide timer tick to the driver.

Provide timer tick to the driver.

Parameters

  hPhy | PHY device handle

Returns
  EnetPhy_ErrorCodes

## ◆ enableEventCapture

int32_t(* Phy_DrvObj_t::enableEventCapture) (EthPhyDrv_Handle hPhy, uint32_t eventIdx, bool falling, bool on)

Enable/Disable an event capture on a PHY GPIO pin.

Optional PHY function to enable/disable an event capture on a PHY GPIO pin. This function can only be supported when the PHY has a built-in PTP clock that support event capture.

Parameters

  hPhy | PHY device handle
  eventIdx | Event index
  falling | Capture event on falling edge or rising edge if falling is false.
  on | Enable when on is true, otherwise disable the event.

Returns
  EnetPhy_ErrorCodes

## ◆ enableTriggerOutput

int32_t(* Phy_DrvObj_t::enableTriggerOutput) (EthPhyDrv_Handle hPhy, uint32_t triggerIdx, uint64_t start, uint64_t period, bool repeat)

Enable/Disable trigger output on a GPIO pin.

Optional PHY function to enable/disable trigger output on a GPIO pin. This function can only be supported when the PHY has a built-in PTP clock that support trigger output.

Parameters

  hPhy | PHY device handle
  triggerIdx | Trigger index
  start | Start trigger time in nanosec unit.
  period | Period of the pulse in nanosec unit. Disable the trigger if the period is equal to 0.
  repeat | Repeated pulse or one shot pulse if repeat is false.

Returns
  EnetPhy_ErrorCodes

## ◆ getEventTs

int32_t(* Phy_DrvObj_t::getEventTs) (EthPhyDrv_Handle hPhy, uint32_t *eventIdx, uint32_t *seqId, uint64_t *ts64)

Get event timestamp.

Get event timestamp

Parameters

  hPhy | PHY device handle
  eventIdx | Output event index
  seqId | Output event sequence identifier
  ts64 | Output event timestamp

Returns
  EnetPhy_ErrorCodes

## ◆ configMediaClock

int32_t(* Phy_DrvObj_t::configMediaClock) (EthPhyDrv_Handle hPhy, bool isMaster, uint8_t *streamIDMatchValue, bool enTrigOut)

config Media Clock

config Media Clock

Parameters

  hPhy | PHY device handle
  isMaster | Media Clock Master/Slave Mode
  enTrigOut | If true, starts 100Hz phase aligned signal to the media clock at LED0

Returns
  EnetPhy_ErrorCodes

## ◆ nudgeCodecClock

int32_t(* Phy_DrvObj_t::nudgeCodecClock) (EthPhyDrv_Handle hPhy, int8_t nudgeValue)

Nudge Codec Clock.

Nudge Codec Clock

Parameters

  hPhy | PHY device handle
  NudgeValue | int8_t value to nudge Codec clock.

Returns
  EnetPhy_ErrorCodes

## ◆ restart

void(* Phy_DrvObj_t::restart) (EthPhyDrv_Handle hPhy)

PHY specific software restart.

PHY-specific function that drivers must implement to start a soft-restart operation.

Parameters

  hPhy | PHY device handle

## ◆ isRestartComplete

int32_t(* Phy_DrvObj_t::isRestartComplete) (EthPhyDrv_Handle hPhy, bool *pCompleted)

PHY specific soft reset status.

PHY-specific function that drivers must implement to check if soft-restart operation is complete.

Parameters

  hPhy | PHY device handle
  pCompleted | Pointer to place holder where the result will be stored false - software restart ongoing true - software restart completed

Returns
  EnetPhy_ErrorCodes

## ◆ getId

int32_t(* Phy_DrvObj_t::getId) (EthPhyDrv_Handle hPhy, uint32_t *pId)

Provides PHY ID value as 32-bit value.

The 32-bit value combines content of IEEE PHY Identifier Register 1 (Register 2) to higher 16-bit and content of IEEE PHY Identifier Register 2 (Register 3) to lower 16-bit.

Parameters

  hPhy | PHY device handle
  pId | PHY ID value

Returns
  EnetPhy_ErrorCodes

## ◆ ctrlPowerDown

int32_t(* Phy_DrvObj_t::ctrlPowerDown) (EthPhyDrv_Handle hPhy, bool control)

Controls IEEE power down feature.

Access IEEE Control Register (Register 0) to control power down feature by setting/clearing "Power Down" bit (Bit 11).

Parameters

  hPhy | PHY device handle
  control | When set the IEEE power down feature will be activated. Normal mode otherwise.

Returns
  EnetPhy_ErrorCodes

## ◆ isPowerDownActive

int32_t(* Phy_DrvObj_t::isPowerDownActive) (EthPhyDrv_Handle hPhy, bool *pActive)

Checks if IEEE power down feature is enabled.

Access IEEE Control Register (Register 0) to check power down feature by reading "Power Down" bit (Bit 11).

Parameters

  hPhy | PHY device handle
  pActive | Pointer to place holder where the result will be stored false - normal mode true - IEEE power down mode

Returns
  EnetPhy_ErrorCodes

## ◆ enableAdvertisement

int32_t(* Phy_DrvObj_t::enableAdvertisement) (EthPhyDrv_Handle hPhy, uint32_t advertisement)

Based on flags will enable required advertisement for Auto Negotiation phase.

Access IEEE Auto-Negotiation Advertisement Register (Register 4) and IEEE MASTER-SLAVE Control Register (Register 9) to set specified advertisement bits. 10HD (Bit 5), 10FD (Bit 6), 100HD (Bit 7) and 100FD (Bit 8) on Auto-Negotiation Advertisement Register. The 1000HD (Bit 10) and 1000FD (Bit 11) on MASTER-SLAVE Control Register.

Parameters

  hPhy | PHY device handle
  advertisement | Contains advertisement flags to enable as described below. PHY_LINK_ADV_HD10 - 10Mbps, Half-Duplex advertisement PHY_LINK_ADV_FD10 - 10Mbps, Full-Duplex advertisement PHY_LINK_ADV_HD100 - 100Mbps, Half-Duplex advertisement PHY_LINK_ADV_FD100 - 100Mbps, Full-Duplex advertisement PHY_LINK_ADV_HD1000 - 1000Mbps, Half-Duplex advertisement PHY_LINK_ADV_FD1000 - 1000Mbps, Full-Duplex advertisement

Returns
  EnetPhy_ErrorCodes

## ◆ disableAdvertisement

int32_t(* Phy_DrvObj_t::disableAdvertisement) (EthPhyDrv_Handle hPhy, uint32_t advertisement)

Based on flags will disable required advertisement for Auto Negotiation phase.

Access IEEE Auto-Negotiation Advertisement Register (Register 4) and IEEE MASTER-SLAVE Control Register (Register 9) to clear specified advertisement bits. 10HD (Bit 5), 10FD (Bit 6), 100HD (Bit 7) and 100FD (Bit 8) on Auto-Negotiation Advertisement Register. The 1000HD (Bit 10) and 1000FD (Bit 11) on MASTER-SLAVE Control Register.

Parameters

  hPhy | PHY device handle
  advertisement | Contains advertisement flags to disable as described below. PHY_LINK_ADV_HD10 - 10Mbps, Half-Duplex advertisement PHY_LINK_ADV_FD10 - 10Mbps, Full-Duplex advertisement PHY_LINK_ADV_HD100 - 100Mbps, Half-Duplex advertisement PHY_LINK_ADV_FD100 - 100Mbps, Full-Duplex advertisement PHY_LINK_ADV_HD1000 - 1000Mbps, Half-Duplex advertisement PHY_LINK_ADV_FD1000 - 1000Mbps, Full-Duplex advertisement

Returns
  EnetPhy_ErrorCodes

## ◆ ctrlAutoNegotiation

int32_t(* Phy_DrvObj_t::ctrlAutoNegotiation) (EthPhyDrv_Handle hPhy, uint32_t control)

Controls Auto Negotiation feature.

Access IEEE Control Register (Register 0) to control Auto-Negotiation feature by setting/clearing "Restart Auto-Negotiation" bit (Bit 9) and "Auto-Negotiation Enable" bit (Bit 12).

Advertisement or fixed speed/duplex mode settings need to be applied before.

Parameters

  hPhy | PHY device handle.
  control | Following control combinations are possible Phy_AutoNegCtrl.

Returns
  EnetPhy_ErrorCodes

## ◆ isLinkPartnerAutoNegotiationAble

int32_t(* Phy_DrvObj_t::isLinkPartnerAutoNegotiationAble) (EthPhyDrv_Handle hPhy, bool *pAble)

Provides Link-Partner Auto-Negotiation Able flag.

Access IEEE Auto-Negotiation Expansion Register (Register 6) and reads "Link-Partner is Auto-Negotiation Able" bit (Bit 0).

Parameters

  hPhy | PHY device handle.
  pAble | Pointer to place holder where the result will be stored. false - Link-Partner is not able to participate on Auto-Negotiation process true - Link-Partner is able to participate on Auto-Negotiation process

Returns
  EnetPhy_ErrorCodes

## ◆ isAutoNegotiationEnabled

int32_t(* Phy_DrvObj_t::isAutoNegotiationEnabled) (EthPhyDrv_Handle hPhy, bool *pEnabled)

Checks if Auto Negotiation is enabled.

Access IEEE Control Register (Register 0) to read "Auto-Negotiation Enable" bit (Bit 12).

Parameters

  hPhy | PHY device handle
  pEnabled | Pointer to place holder where the result will be stored false - Auto Negotiation is off true - Auto Negotiation is on

Returns
  EnetPhy_ErrorCodes

## ◆ isAutoNegotiationComplete

int32_t(* Phy_DrvObj_t::isAutoNegotiationComplete) (EthPhyDrv_Handle hPhy, bool *pCompleted)

Checks status of Auto Negotiation process.

Access IEEE Status Register (Register 1) to read "Auto-Negotiation Complete" bit (Bit 5).

Parameters

  hPhy | PHY device handle
  pCompleted | Pointer to place holder where the result will be stored false - Auto Negotiation process not completed true - Auto Negotiation process completed

Returns
  EnetPhy_ErrorCodes

## ◆ isAutoNegotiationRestartComplete

int32_t(* Phy_DrvObj_t::isAutoNegotiationRestartComplete) (EthPhyDrv_Handle hPhy, bool *pCompleted)

Checks status of Auto Negotiation restart process.

Access IEEE Control Register (Register 0) to read "Restart Auto-Negotiation" bit (Bit 9).

Parameters

  hPhy | PHY device handle
  pCompleted | Pointer to place holder where the result will be stored false - Auto Negotiation restart process not completed true - Auto Negotiation restart process completed

Returns
  EnetPhy_ErrorCodes

## ◆ isLinkUp

int32_t(* Phy_DrvObj_t::isLinkUp) (EthPhyDrv_Handle hPhy, bool *pLinkUp)

Checks link state.

Access IEEE Status Register (Register 1) to read "Link Status" bit (Bit 2).

Parameters

  hPhy | PHY device handle
  pLinkUp | Pointer to place holder where the result will be stored false - Link down state true - Link up state

Returns
  EnetPhy_ErrorCodes

## ◆ setSpeedDuplex

int32_t(* Phy_DrvObj_t::setSpeedDuplex) (EthPhyDrv_Handle hPhy, uint32_t settings)

Sets speed and duplex settings to control data rate of the Ethernet link when Auto Negotiation is disabled.

Access IEEE Control Register (Register 0) to configure speed by setting/clearing of "Speed Selection (MSB)" and "Speed Selection (LSB)" bits (Bit 6 and 13) together with duplex by setting/clearing of "Duplex Mode" bit (Bit 8).

Parameters

  hPhy | PHY device handle
  settings | Contains speed/duplex combination flag to select. Phy_Link_SpeedDuplex

Returns
  EnetPhy_ErrorCodes

## ◆ getSpeedDuplex

int32_t(* Phy_DrvObj_t::getSpeedDuplex) (EthPhyDrv_Handle hPhy, Phy_Link_SpeedDuplex *pConfig)

Provides selected speed and duplex when link is up.

Accessing vendor specific or extended registers based on type of PHY to provide agreed speed and duplex mode for actual connection.

Parameters

  hPhy | PHY device handle
  pConfig | Contains speed/duplex combination used for actual connection. See Phy_Link_SpeedDuplex.

Returns
  EnetPhy_ErrorCodes

## ◆ setMiiMode

void(* Phy_DrvObj_t::setMiiMode) (EthPhyDrv_Handle hPhy, Phy_Mii mii)

Configures MII mode.

Accessing vendor specific or extended registers based on type of PHY to configure MII mode.

Parameters

  hPhy | PHY device handle
  mii | MII mode to configure. See Phy_Mii.

Returns
  EnetPhy_ErrorCodes

## ◆ ctrlExtFD

int32_t(* Phy_DrvObj_t::ctrlExtFD) (EthPhyDrv_Handle hPhy, bool control)

Enables to declare Full Duplex also in parallel detect link.

Accessing vendor specific or extended registers based on type of PHY.

Parameters

  hPhy | PHY device handle.
  control | Enable/Disable Full-Duplex also in parallel detect link. false - disable Full-Duplex in parallel detect link true - enable Full-Duplex in parallel detect link

Returns
  EnetPhy_ErrorCodes

## ◆ ctrlOddNibbleDetection

int32_t(* Phy_DrvObj_t::ctrlOddNibbleDetection) (EthPhyDrv_Handle hPhy, bool control)

Controls detection of transmit error in odd-nibble boundary.

Accessing vendor specific or extended registers based on type of PHY. Some PHY's are not providing such a feature.

Parameters

  hPhy | PHY device handle.
  control | Enable/Disable Full-Duplex also in parallel detect link. false - disable detection of transmit error in odd-nibble boundary. true - enable detection of transmit error in odd-nibble boundary.

Returns
  EnetPhy_ErrorCodes

## ◆ ctrlRxErrIdle

int32_t(* Phy_DrvObj_t::ctrlRxErrIdle) (EthPhyDrv_Handle hPhy, bool control)

Controls detection of Receive Symbol Error during IDLE State.

Accessing vendor specific or extended registers based on type of PHY. Some PHY's are not providing such a feature.

Parameters

  hPhy | PHY device handle.
  control | Enable/Disable Full-Duplex also in parallel detect link. false - disable detection of Receive Symbol Error during IDLE State. true - enable detection of Receive Symbol Error during IDLE State.

Returns
  EnetPhy_ErrorCodes

## ◆ ctrlFastLinkDownOption

int32_t(* Phy_DrvObj_t::ctrlFastLinkDownOption) (EthPhyDrv_Handle hPhy, uint32_t control)

Controls fast link down option.

Accessing vendor specific or extended registers based on type of PHY. Some PHY's are not providing such a feature.

Parameters

  hPhy | PHY device handle.
  control | Enable/Disable Full-Duplex also in parallel detect link. false - disable detection of Receive Symbol Error during IDLE State. true - enable detection of Receive Symbol Error during IDLE State.

Returns
  EnetPhy_ErrorCodes

## ◆ fxn

struct { ... } Phy_DrvObj_t::fxn

## ◆ hDrv

EthPhyDrv_Handle Phy_DrvObj_t::hDrv