1.3.27.12 1.4.23.12 1.5.27.12 1.6.23.12 1.7.24.12 1.8.21.12 1.9.22.12 1.29.25.12 1.30.19.12 1.31.19.12 1.32.28.12 1.33.17.12 1.34.22.12 1.35.15.12 1.36.17.12 1.37.19.12 1.38.23.12 1.39.20.12 1.40.22.12 1.41.20.12 1.42.19.12 SYSTICK_TimerCallbackSet Function
C
void SYSTICK_TimerCallbackSet ( SYSTICK_CALLBACK callback, uintptr_t context )
Summary
Sets the pointer to the function (and it's context) to be called when the given systick reaches 0.
Description
This function sets the pointer to a client function to be called "back" when systick reaches 0. It also passes a context value (usually a pointer to a context structure) that is passed into the function when it is called.
This function is available only in interrupt or non-blocking mode of operation.
Precondition
SYSTICK_Initialize must have been called for the associated USART instance.
Parameters
Param | Description |
---|---|
callback | A pointer to a function with a calling signature defined by the SYSTICK_CALLBACK data type. |
context | A value (usually a pointer) passed (unused) into the function identified by the callback parameter. |
Returns
None.
Example
ticks = 0;
void AppCallback ( uintptr_t context )
{
ticks++;
}
SYSTICK_TimerCallbackSet(AppCallback, (uintptr_t) NULL);
Remarks
The context parameter is ignored if the pointer passed is NULL. To disable the callback function, pass a NULL for the callback parameter.