1.2.11.4.29 SYS_TIME_CALLBACK Typedef
1.2.11.4.29 C
typedef void (*SYS_TIME_CALLBACK ) ( uintptr_t context );
1.2.11.4.29 Summary
Pointer to a time system service callback function.
1.2.11.4.29 Description
This data type defines a pointer to a time service callback function. Therefore, 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.
1.2.11.4.29 Precondition
The time service must have been initialized using the SYS_TIME_Initialize function before attempting to register a SYS Time callback function.
1.2.11.4.29 Parameters
| Parameters | 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. |
1.2.11.4.29 Returns
None.
1.2.11.4.29 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;
}
}
1.2.11.4.29 Remarks
None.
