1.1.4.13 DRV_METROLOGY_GetStatus Function
CFigure 1-20. Metrology Library State
Diagram
Parameters
DRV_METROLOGY_STATUS DRV_METROLOGY_GetStatus (void);SummaryGet the status of the metrology driver.
DescriptionMetrology 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. Refer to the metrology library state diagram for more detailed description.
None.
ReturnsReturns 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;
}RemarksNone.
