3.3.7.1 FREQM_CallbackRegister

Allows application to register a callback function.

This function allows the application to register a callback function that will be called when a frequency measurement operation has completed. The callback feature is only available if the Interrupt operation in the GUI was enabled. If a callback mechanism is desired, then a callback function should be registerd via this function before starting a frequency measurement. The application can read the measured frequency value and the check for errors in the callback function. Calling this function at any time with callback function as NULL will disable the callback feature.

void 
FREQM_CallbackRegister
(
    FREQM_CALLBACK  freqmCallback, 
    uintptr_t context
);

Precondition

  • The FREQM_Initialize function must have been called. Interrupt option in MCC should have been enabled.

Parameters

  • freqmCallback - Pointer to an application callback function
  • context - The value of parameter will be passed back to the applicationunchanged, when the callback function is called. It can be used to identify any application specific data object that identifies the instance of the client module (for example, it may be a pointer to the client modules state structure)

Returns

  • void