Jump to main content

##

# 2.99.47 RTC_Timer16CallbackRegister Function

## C

    void RTC_Timer16CallbackRegister ( RTC_TIMER16_CALLBACK callback,
    uintptr_t context )

## Summary

Register the callback function to be called when an 16-bit Timer Interrupt occurs.

## Description

This function registers the callback function that the library will call when an interrupt occurs. The library will return the event that has caused the interrupt and the application specified context in the callback function.

## Precondition

The RTC_Initialize() function should have been called to initialize the RTC module. The module should have been configured for 16-bit Timer Counter operation in MCC. The library should have been configured for Interrupt mode operation.

## Parameters

Param | Description
--- | ---
callback | A pointer to a function with a calling signature defined by the RTC_TIMER16_CALLBACK data type. Passing a NULL value disables the callback
context | A value (usually a pointer) that passed into the callback function when the callback function is called

## Returns

None.

## Example

    // Refer to the description of the RTC_TIMER16_CALLBACK data type for
    // example usage of this function.

## Remarks

To disable the callback function, pass a NULL for the callback parameter. See the RTC_TIMER16_CALLBACK type definition for additional information.