DRV_ETHPHY_VendorSMIReadResultGet Function

C

DRV_ETHPHY_RESULT DRV_ETHPHY_VendorSMIReadResultGet(DRV_HANDLE handle, uint16_t* pSmiRes); 

Returns

  • DRV_ETHPHY_RES_OK - transaction complete and result deposited at pSmiRes.

  • DRV_ETHPHY_RES_PENDING - if the vendor transaction is still ongoing The call needs to be retried. < 0 - some error and the DRV_EXTPHY_MIIConfigure/DRV_EXTPHY_MDIXConfigure has to return error to be aborted by the DRV_ETHPHY_Setup

Description

This function will return the data of a SMI read transfer.

Remarks

The function is intended for implementing vendor SMI transfers within DRV_EXTPHY_MIIConfigure and DRV_EXTPHY_MDIXConfigure. It has to be called from within the DRV_EXTPHY_MIIConfigure or DRV_EXTPHY_MDIXConfigure functions (which are called, in turn, by the DRV_ETHPHY_Setup procedure) otherwise the call will fail. The DRV_ETHPHY_RES_OK and DRV_ETHPHY_RES_PENDING significance is changed from the general driver API.

Preconditions

  • The DRV_ETHPHY_Initialize routine must have been called.

  • DRV_ETHPHY_Open must have been called to obtain a valid device handle.

  • DRV_ETHPHY_Setup is in progress and configures the PHY

  • The vendor implementation of the DRV_EXTPHY_MIIConfigure/DRV_EXTPHY_MDIXConfigure is running and a SMI transfer is needed

  • DRV_ETHPHY_VendorSMIReadStart should have been called to initiate a transfer