/* Unregisters a callback. 
Unregisters a callback function implemented by the user. The callback should be disabled before it is unregistered. */
enum status_code tc_unregister_callback(struct tc_module *const module, const enum tc_callback callback_type)
/* Unregisters a callback. 
Unregisters a callback function implemented by the user. The callback should be disabled before it is unregistered. */
enum status_code tc_unregister_callback(struct tc_module *const module, const enum tc_callback callback_type)
{
	Assert(module);
	module->callback[callback_type] = NULL;
	if (callback_type == TC_CALLBACK_CC_CHANNEL0) {
		module->register_callback_mask &= ~TC_INTFLAG_MC(1);
	}
	else if (callback_type == TC_CALLBACK_CC_CHANNEL1) {
		module->register_callback_mask &= ~TC_INTFLAG_MC(2);
	}
	else {
		module->register_callback_mask &= ~(1 << callback_type);
	}
	return STATUS_OK;
}