2.15.9 CLOCK_MonitorWarnCallbackRegister Function
C
void CLOCK_MonitorWarnCallbackRegister(CLOCK_MonitorWarnCallback callback, uintptr_t context);
Summary
Override default callback and to define custom callback for Clock Monitor Warning event.
Description
This function can be used to override default callback CLOCK_MonitorWarnCallback and to define custom callback for CLOCK Monitor Warning event.
Precondition
None.
Parameters
| Param | Description |
|---|---|
| monitor | Instance of the clock monitor |
| callback | Address of the callback routine |
| context | A value (usually a pointer) passed (unused) into the function identified by the callback parameter |
Returns
None.
Example
void MonitorWarningCallback(uintptr_t context) { //action during the event } int main ( void ) { SYS_Initialize ( NULL ); CLOCK_MonitorWarnCallbackRegister(CLOCK_MONITOR_1, MonitorWarningCallback, NULL); while ( true ) { SYS_Tasks ( ); } return ( EXIT_FAILURE ); }
Remarks
None.
