1.10.6.2 1.11.7.2 1.12.6.2 1.13.6.2 1.14.7.2 1.15.7.2 1.16.4.2 1.17.4.2 1.18.5.2 1.19.4.2 1.20.4.2 1.21.5.2 1.22.6.2 1.23.6.2 1.24.6.2 CORETIMER_CallbackSet Function

C

void CORETIMER_CallbackSet(CORETIMER_CALLBACK callback_fn,
uintptr_t context);

Summary

Sets the callback_fn function for an match.

Description

This function sets the callback_fn function that will be called when the CORETIMER match is reached.

Precondition

CORETIMER_Initialize() function must have been called first.

Parameters

Param Description
callback_fn a pointer to the function to be called when match is reached. Use NULL to Un Register the match callback_fn
context a pointer to user defined data to be used when the callback_fn function is called. NULL can be passed in if no data needed

Returns

None.

Example

void CORETIMER_Callback_Fn(uintptr_t context);

CORETIMER_Initialize();
CORETIMER_CallbackSet(CORETIMER_Callback_Fn, NULL);

Remarks

Context value can be set to NULL if not required. To disable callback function, pass NULL for the callback parameter.