DRV_MIIM_Status Function
C
SYS_STATUS DRV_MIIM_Status(SYS_MODULE_OBJ object);
Returns
SYS_STATUS_READY - Indicates that any previous module operation for the specified module has completed
SYS_STATUS_BUSY - Indicates that a previous module operation for the specified module has not yet completed
SYS_STATUS_ERROR - Indicates that the specified module is in an error state
Description
This function provides the current status of the MIIM driver module.
Remarks
Any value greater than SYS_STATUS_READY is also a normal running state in which the driver is ready to accept new operations.
SYS_STATUS_BUSY - Indicates that the driver is busy with a previous system level operation and cannot start another
SYS_STATUS_ERROR - Indicates that the driver is in an error state
Any value less than SYS_STATUS_ERROR is also an error state.
SYS_MODULE_DEINITIALIZED - Indicates that the driver has been deinitialized
If the status operation returns SYS_STATUS_BUSY, the a previous system level operation has not yet completed. Once the status operation returns SYS_STATUS_READY, any previous operations have completed.
The value of SYS_STATUS_ERROR is negative (-1). Any value less than that is also an error state.
This function will NEVER block waiting for hardware.
If the Status operation returns an error value, the error may be cleared by calling the reinitialize operation. If that fails, the deinitialize operation will need to be called, followed by the initialize operation to return to normal operations.
Preconditions
The DRV_MIIM_Initialize function must have been called before calling this function.
Example
SYS_MODULE_OBJ object; // Returned from DRV_MIIM_Initialize SYS_STATUS status;
status = DRV_MIIM_Status(object); if (SYS_STATUS_ERROR >= status) {
// Handle error
}
Parameters
Parameters | Description |
---|---|
object | Driver object handle, returned from DRV_MIIM_Initialize |