1.1.17.6 WDRV_WINC_Status

Function

SYS_STATUS WDRV_WINC_Status(SYS_MODULE_OBJ object)

Summary

Provides the current status of the WINC driver module.

Description

This function provides the current status of the WINC driver module.

Precondition

WDRV_WINC_Initialize must have been called before calling this function.

Parameters

object - Driver object handle, returned from WDRV_WINC_Initialize

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

Example

SYS_MODULE_OBJ object; // Returned from WDRV_WINC_Initialize
SYS_STATUS status;

status = WDRV_WINC_Status(object);
if (SYS_STATUS_ERROR >= status)
{
// Handle error
}

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 This operation can be used to determine when any of the driver's module level operations has completed. If the status operation returns SYS_STATUS_BUSY, then a previous 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.