1.4.4.5 OSCCTRL_CFD_CALLBACK Typedef

C

typedef void (*OSCCTRL_CFD_CALLBACK)(uintptr_t context);

Summary

Defines the data type and function signature for the External Oscillator callback function.

Description

This data type defines the function signature for the External Oscillator callback function. The External Oscillator will call back the client's function with this signature when it needs to notify the oscillator failure. The context parameter is an application defined data object specified at the time of registering the callback function and is returned in the context parameter of the callback function.

Precondition

The CLOCK_Initialize() initialize function should have been called. The callback function should have been registered through OSCCTRL_CallbackRegister() function.

Parameters

Param Description
context Allows the caller to provide a context value (usually a pointer to the callers context for multi-instance clients).

Returns

None.

Example

void MyOscillatorCallback (uintptr_t context )
{
    // This means the external clock has failed.
}

// Register the callback function. Specify the context as NULL.
OSCCTRL_CallbackRegister(MyOscillatorCallback, (uintptr_t)NULL);

Remarks

None.