1.1.3.4.10 DRV_METROLOGY_GetStatus Function
C
DRV_METROLOGY_STATUS DRV_METROLOGY_GetStatus (void);
Summary
Get the status of the metrology driver.
Description
Metrology function status:
DRV_METROLOGY_STATUS_UNINITIALIZED: Metrology driver has not been initialized.
DRV_METROLOGY_STATUS_READY: Metrology driver is ready to be used.
DRV_METROLOGY_STATUS_HALT: Metrology driver has been initialized but not opened.
DRV_METROLOGY_STATUS_WAITING_IPC: Metrology driver is waiting the init IPC interrupt from the metrology lib as part of the opening routine.
DRV_METROLOGY_STATUS_INIT_DSP: IPC interrupt has been triggered indicating that DSP filters has been stabilized to full accuracy.
DRV_METROLOGY_STATUS_RUNNING: Metrology library is running and periodic data acquisition is performed.
These status values are closely related to the metrology library states. You can refer to the metrology library state diagram for more detailed description:
Parameters
None.
Returns
Returns the status of the metrology driver.
Example
case APP_METROLOGY_STATE_START:
{
if (DRV_METROLOGY_GetStatus() == DRV_METROLOGY_STATUS_READY)
{
if (DRV_METROLOGY_Start() == DRV_METROLOGY_SUCCESS)
{
app_metrologyData.state = APP_METROLOGY_STATE_RUNNING;
}
else
{
app_metrologyData.state = APP_METROLOGY_STATE_ERROR;
}
vTaskDelay(10 / portTICK_PERIOD_MS);
}
break;
}
Remarks
None.