1.10.20.9 1.11.20.9 1.12.21.9 1.13.19.9 1.14.14.9 1.15.15.9 1.16.21.9 1.17.17.9 1.18.17.9 1.19.17.9 1.20.21.9 1.21.22.9 1.22.23.9 1.23.22.9 1.24.19.9 RTC_CALLBACK Typedef

C

typedef void (*RTC_CALLBACK)(uintptr_t context);

Summary

Defines the data type and function signature of the Real Time Clock Calendar callback function.

Description

This data type defines the function signature of the RTCC Real Time Clock Calendar Callback function. The RTCC peripheral will call back the client's function with this signature when the RTCC Alarm occurs.

The application should register a callback function whose signature (input arguments and return type) must match the signature of this function. The callback function should be registered by calling the RTCC_CallbackRegister() function. This should be done before setting the alarm.

Precondition

None.

Parameters

Param Description
context Allows the caller to provide a context value (usually a pointer to the callers context for multi-instance clients).

Returns

None.

Example

void RTC_Callback( uintptr_t context)
{
    // Code to be executed in the RTCC callback
}

RTCC_CallbackRegister(RTC_Callback, (uintptr_t) NULL);

Remarks

The callback function will be execute in an interrupt context. Avoid calling blocking functions, performing computationally intensive operations or interrupt unsafe functions from the callback function.