1.42.17.3 RSWDT_CallbackRegister Function
C
void RSWDT_CallbackRegister( RSWDT_CALLBACK callback, uintptr_t context )
Summary
Sets the pointer to the function (and it's context) to be called when the Timeout events occur.
Description
This function sets the pointer to a client function to be called "back" when the Timeout event occurs. It also passes a context value that is passed into the function when it is called. This function is available only in interrupt mode of operation.
Precondition
RSWDT_Initialize must have been called for the associated RSWDT instance. Reset mode must be disabled in MCC configuration
Parameters
Param | Description |
---|---|
callback | A pointer to a function with a calling signature definedby the RSWDT_CALLBACK data type |
context | A value (usually a pointer) passed (unused) into the functionidentified by the callback parameter |
Returns
None.
Example
RSWDT_CallbackRegister(MyCallback, &myData);
Remarks
The context value may be set to NULL if it is not required. Note that the value of NULL will still be passed to the callback function. To disable the callback function, pass a NULL for the callback parameter. See the RSWDT_CALLBACK type definition for additional information. This feature may or may not be available based on device.