1.2.5.6 SPW_CallbackRegister

void SPW_CallbackRegister(SPW_CALLBACK callback, uintptr_t contextHandle)

Summary

Sets the pointer to the function (and it's context) to be called when the given SPW's interrupt events occurs.

Description

This function sets the pointer to a client function to be called "back" when the given SPW's interrupt events occurs. It also passes a context value (usually a pointer to a context structure) that is passed into the function when it is called. The specified callback function will be called from the peripheral interrupt context

Preconditions

SPW_Initialize must have been called for the associated SPW instance

Parameters

  • callback - A pointer to a function with a calling signature defined by the SPW_CALLBACK data type. Setting this to NULL disables the callback feature

  • contextHandle - A value (usually a pointer) passed (unused) into the function identified by the callback parameter

Returns

None

Remarks

None