2.1.4.13 DRV_MCMETROLOGY_GetStatus Function
C
DRV_MCMETROLOGY_STATUS DRV_MCMETROLOGY_GetStatus (void);
Summary
Get the status of the metrology driver.
Description
Metrology function status:
- DRV_MCMETROLOGY_STATUS_UNINITIALIZED: Metrology driver has not been initialized
- DRV_MCMETROLOGY_STATUS_READY: Metrology driver is ready to be used
- DRV_MCMETROLOGY_STATUS_HALT: Metrology driver has been initialized but not opened
- DRV_MCMETROLOGY_STATUS_WAITING_IPC: Metrology driver is waiting the init IPC interrupt from the metrology lib as part of the opening routine
- DRV_MCMETROLOGY_STATUS_INIT_DSP: IPC interrupt has been triggered indicating that DSP filters has been stabilized to full accuracy
- DRV_MCMETROLOGY_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.
Parameters
None.
Returns
Returns the status of the metrology driver.
Example
case APP_METROLOGY_STATE_START:
{
if (DRV_MCMETROLOGY_GetStatus() == DRV_MCMETROLOGY_STATUS_READY)
{
if (DRV_MCMETROLOGY_Start() == DRV_MCMETROLOGY_SUCCESS)
{
app_metrologyData.state = APP_METROLOGY_STATE_RUNNING;
}
else
{
app_metrologyData.state = APP_METROLOGY_STATE_ERROR;
}
vTaskDelay(10 / portTICK_PERIOD_MS);
}
break;
}
Remarks
None.
