Jump to main content

##

# DRV_ETHPHY_NegotiationResultGet Function

## C

    C
    DRV_ETHPHY_RESULT DRV_ETHPHY_NegotiationResultGet(DRV_HANDLE handle, DRV_ETHPHY_INTERFACE_INDEX portIndex, DRV_ETHPHY_NEGOTIATION_RESULT* pNegResult);

## Returns

- DRV_ETHPHY_RES_PENDING operation is ongoing
- an DRV_ETHPHY_RESULT error code if the procedure failed.

## Description

This function returns the PHY negotiation data gathered after a completed negotiation.

## Remarks

Use DRV_ETHPHY_ClientStatus() and DRV_ETHPHY_ClientOperationResult() to check when the operation was completed and its outcome. When operation is completed but negotiation has failed, DRV_ETHPHY_ClientOperationResult will return:

- DRV_ETHPHY_RES_NEGOTIATION_INACTIVE if no negotiation in progress

- DRV_ETHPHY_RES_NEGOTIATION_NOT_STARTED if negotiation not yet started yet (means time out if waitComplete was requested)

- DRV_ETHPHY_RES_NEGOTIATION_ACTIVE if negotiation ongoing The returned value for the negotiation flags is valid only if the negotiation was completed successfully.

## Preconditions

- The DRV_ETHPHY_Initialize routine must have been called.

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

- DR_ETHPHY_Setup must have been called to properly configure the PHY

- DRV_ETHPHY_RestartNegotiation, and DRV_ETHPHY_NegotiationIsComplete should have been called.