1.2.11.4.29 SYS_TIME_CALLBACK Typedef
C
typedef void (*SYS_TIME_CALLBACK ) ( uintptr_t context );
Summary
Pointer to a time system service callback function.
Description
This data type defines a pointer to a time service callback function, thus defining the function signature. Callback functions may be registered by clients of the time service either when creating a software timer or using the SYS_TIME_Callback shortcut functions.
Precondition
The time service must have been initialized using the SYS_TIME_Initialize function before attempting to register a SYS Time callback function.
Parameters
| Param | Description |
|---|---|
| context | A context value, returned untouched to the client when the callback occurs. It can be used to identify the instance of the client who registered the callback. |
Returns
None.
Example
//"MY_APP_DATA_STRUCT" is a user defined data structure with "isTimerExpired" as
//one of the structure members.
void MyCallback ( uintptr_t context )
{
MY_APP_DATA_STRUCT* pAppData = (MY_APP_DATA_STRUCT *) context;
if (pAppData != NULL)
{
pAppData->isTimerExpired = true;
}
}Remarks
None.
