1.1.4.9 DRV_METROLOGY_CalibrationCallbackRegister Function
C
Returns
DRV_METROLOGY_RESULT DRV_METROLOGY_CalibrationCallbackRegister (
DRV_METROLOGY_CALIBRATION_CALLBACK callback
);SummaryRegisters a function with the metrology driver to be called back when the calibration process has completed.
DescriptionThis function allows a client to register a handling function with the driver to call back when a calibration process has completed. This function must be always called after DRV_METROLOGY_Initialize routine is called, since the initialization routine sets a NULL pointer to indicate no callback.
PreconditionDRV_METROLOGY_Initialize must have been called before.
Parameters| Param | Description |
|---|---|
| callback | Pointer to the function to be called |
If successful, returns DRV_METROLOGY_SUCCESS. Otherwise, it returns DRV_METROLOGY_ERROR.
Example staticvoid_APP_METROLOGY_CalibrationCallback(bool result)
{
if (app_metrologyData.pCalibrationCallback)
{
app_metrologyData.pCalibrationCallback(result);
}
/* Signal Metrology to exit calibration status */
OSAL_SEM_Post(&appMetrologyCalibrationSemID);
}
(...)
/* Set Callback for calibration process */
DRV_METROLOGY_CalibrationCallbackRegister(_APP_METROLOGY_CalibrationCallback);RemarksNone.
