Jump to main content

##

# DRV_ETHPHY_VendorSMIWriteStart Function

## C

    DRV_ETHPHY_RESULT DRV_ETHPHY_VendorSMIWriteStart(DRV_HANDLE handle, uint16_t rIx, uint16_t
    wData, int phyAddress);

## Returns

DRV_ETHPHY_RES_OK - if the vendor SMI write transfer is started DRV_ETHPHY_RES_PENDING - the SMI bus was busy and 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 start a SMI write 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