2.1.4.9 DRV_MCMETROLOGY_HarmonicAnalysisCallbackRegister Function
C
Returns
DRV_MCMETROLOGY_RESULT DRV_MCMETROLOGY_HarmonicAnalysisCallbackRegister (
DRV_MCMETROLOGY_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_MCMETROLOGY_Initialize routine is called, since the initialization routine sets a NULL pointer to indicate no callback.
PreconditionDRV_MCMETROLOGY_Initialize must have been called before.
Parameters| Param | Description |
|---|---|
| callback | Pointer to the function to be called |
If successful, returns DRV_MCMETROLOGY_SUCCESS. Otherwise, it returns DRV_MCMETROLOGY_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_MCMETROLOGY_HarmonicAnalysisCallbackRegister(_APP_METROLOGY_HarmonicAnalysisCallback);RemarksNone.
