/* Registers a callback. 
Registers a callback function which is implemented by the user. */
enum status_code tc_register_callback(struct tc_module *const module, tc_callback_t callback_func, const enum tc_callback callback_type)
/* Registers a callback. 
Registers a callback function which is implemented by the user. */
enum status_code tc_register_callback(struct tc_module *const module, tc_callback_t callback_func, const enum tc_callback callback_type)
{
	Assert(module);
	Assert(callback_func);
	module->callback[callback_type] = callback_func;
	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;
}