1.4.3.6 MMHI_GetStatus Function
C
MMHI_STATUS MMHI_GetStatus ( SYS_MODULE_OBJ object )
Summary
Gets the status of the MMHI module.
Description
This function allows to retieve MMHI module status.
It must be used to ensure the module is Ready before start using it.
Parameters
| Param | Description |
|---|---|
|
object |
Object handle for the specified driver instance (returned from MMHI_Initialize) |
Returns
Returns the status of the Meters And Mores MMHI module:
- MMHI_STATUS_UNINITIALIZED: MMHI module has not been initialized
- MMHI_STATUS_INITIALIZED: MMHI module has initialized but not opened
- MMHI_STATUS_READY: MMHI module is ready to be used
- MMHI_STATUS_ERROR: An unspecified error has occurred
Example
SYS_MODULE_OBJ sysObjMetersandmore;
case APP_MMHI_STATE_START:
{
if (MMHI_GetStatus(sysObjMetersandmore) == MMHI_STATUS_READY)
{
app_mmhiData.state = APP_MMHI_STATE_RUNNING;
}
break;
}
Remarks
The handle returned is valid until the MMHI_Close routine is called.
This routine will NEVER block waiting for hardware.
