1.38.4.2 OSCCTRL_CallbackRegister Function
C
void OSCCTRL_CallbackRegister (uintptr_t context);
Summary
Register the function to be called when an External Oscillator or DPLL event is generated.
Description
This function registers the callback function to be called when the External Oscillator has failed.
Precondition
The External Oscillator and/or should have been configured in MHC and enabled.
Parameters
Param | Description |
---|---|
callback | Pointer to the OSCCTRL_CFD_CALLBACK type of function that will be called when the oscillator failed. |
context | Context value to be passed into the callback function when it called. |
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.