DRV_MIIM_Read Function
C
DRV_MIIM_OPERATION_HANDLE DRV_MIIM_Read(DRV_HANDLE handle, unsigned int rIx, unsigned int phyAdd, DRV_MIIM_OPERATION_FLAGS opFlags, DRV_MIIM_RESULT* pOpResult);
Returns
A not NULL DRV_MIIM_OPERATION_HANDLE if the operation was successfully scheduled. NULL if the operation failed. More details in pOpResult.
Description
This function initiates a SMI/MIIM read transaction for a given MIIM register.
Remarks
If operation was scheduled successfully, the result will be DRV_MIIM_RES_OK. Otherwise an error code will be returned. Upon the operation completion:
If the operation is to be discarded (DRV_MIIM_OPERATION_FLAG_DISCARD is set) there will be no notification to the client. The operation associated resources will be released.
If the operation is not to be discarded, then:
if the client has registered an operation notification callback (DRV_MIIM_RegisterCallback) then the callback will be called. After that the operation associated resources will be released.
if there is no notification callback the MIIM driver will wait for the client to poll and read the operation result using DRV_MIIM_OperationResult(). Only then the operation will be released.
A completed non-discardable operation will remain available for returning the result until the client is somehow notified of the operation result. When polling is used, DRV_MIIM_OperationResult() needs to be called to free the operation associated resources.
Preconditions
The DRV_MIIM_Initialize routine must have been called.
DRV_MIIM_Open must have been called to obtain a valid opened device handle.