2.15.27 CLOCK_CombinedClockFailCallbackRegister Function
C
void CLOCK_CombinedClockFailCallbackRegister(CLOCK_CombinedFailCallback callback, uintptr_t context);
Summary
Override default callback and to define custom callback for CLOCK Combined Clock Fail event.
Description
This function can be used to override default callback and to define custom callback for CLOCK Combined Clock Fail event.
Precondition
None.
Parameters
| Param | Description |
|---|---|
| callback | instance of clock generator |
| context |
A value (usually a pointer) passed (unused) into the function identified by the callback parameter |
Returns
None
Example
void ClockFailCallback(uintptr_t context)
{
bool status;
status = CLOCK_FailStatusGet();
//user can further use CLOCK_FAIL_STATUS_MASKS enum to deduce individual clock status
}
int main ( void )
{
/* Initialize all modules */
SYS_Initialize ( NULL );
CLOCK_CombinedClockFailCallbackRegister(ClockFailCallback, NULL);
while ( true )
{
SYS_Tasks ( );
}
/* Execution should not come here during normal operation */
return ( EXIT_FAILURE );
}
Remarks
None.
