1.23.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.