15.6.3.6.1 Function rtc_calendar_register_callback()

Registers callback for the specified callback type.

enum status_code rtc_calendar_register_callback( struct rtc_module *const module, rtc_calendar_callback_t callback, enum rtc_calendar_callback callback_type)

Associates the given callback function with the specified callback type. To enable the callback, the rtc_calendar_enable_callback function must be used.

Table 15-41. Parameters
Data directionParameter nameDescription

[in, out]

module

Pointer to the software instance struct

[in]

callback

Pointer to the function desired for the specified callback

[in]

callback_type

Callback type to register

Returns

Status of registering callback.

Table 15-42. Return Values
Return valueDescription

STATUS_OK

Registering was done successfully

STATUS_ERR_INVALID_ARG

If trying to register a callback not available