1.1.4.11 DRV_METROLOGY_HarmonicAnalysisCallbackRegister Function
C
Returns
DRV_METROLOGY_RESULT DRV_METROLOGY_HarmonicAnalysisCallbackRegister (
DRV_METROLOGY_HARMONIC_ANALYSIS_CALLBACK callback
);SummaryRegisters a function with the metrology driver to be called back when the harmonic analysis has completed.
DescriptionThis function allows a client to register a handling function with the driver to call back when a harmonic analysis 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_HarmonicAnalysisCallback(uint32_t harmonicBitmap)
{
if (app_metrologyData.pHarmonicAnalysisCallback)
{
app_metrologyData.harmonicAnalysisPending = false;
app_metrologyData.pHarmonicAnalysisCallback(harmonicBitmap);
}
}
(...)
// Set Callback for harmonic analysis process
DRV_METROLOGY_HarmonicAnalysisCallbackRegister(_APP_METROLOGY_HarmonicAnalysisCallback);RemarksNone.
