/* Unregisters callback for the specified callback type. 
When called, the currently registered callback for the given callback type will be removed. */
enum status_code rtc_calendar_unregister_callback(struct rtc_module *const module, enum rtc_calendar_callback callback_type)
/* Unregisters callback for the specified callback type. 
When called, the currently registered callback for the given callback type will be removed. */
enum status_code rtc_calendar_unregister_callback(struct rtc_module *const module, enum rtc_calendar_callback callback_type)
{
	enum status_code status = STATUS_OK;
	if (callback_type == RTC_CALENDAR_CALLBACK_OVERFLOW) {
		status = STATUS_OK;
	} else if (callback_type > RTC_NUM_OF_ALARMS) {
		status = STATUS_ERR_INVALID_ARG;
	}
	if (status == STATUS_OK) {
		module->callbacks[callback_type] = NULL;
		module->registered_callback &= ~(1 << callback_type);
	}
	return status;
}