2.15.33 CLOCK_MonitorMonCallbackRegister Function
C
void CLOCK_MonitorMonCallbackRegister(CLOCK_MonitorMonCallback callback, uintptr_t context);
Summary
Override default callback and to define custom callback for CLOCK Monitor saturation event.
Description
This function can be used to override default callback CLOCK_MonitorMonCallback and to define custom callback for CLOCK Monitor saturation 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 MonitorCallback(uintptr_t context) { //action during the event } int main ( void ) { SYS_Initialize ( NULL ); CLOCK_MonitorMonCallbackRegister(CLOCK_MONITOR_1, MonitorCallback, NULL); while ( true ) { SYS_Tasks ( ); } return ( EXIT_FAILURE ); }
Remarks
None.
