/* Unregisters a callback. 
Unregisters a callback function implemented by the user. The callback should be disabled before it is unregistered. */
enum status_code trng_unregister_callback(struct trng_module *const module, const enum trng_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 trng_unregister_callback(struct trng_module *const module, const enum trng_callback callback_type)
{
	Assert(module);
	module->callback[callback_type] = NULL;
	module->register_callback_mask &= ~(1 << callback_type);
	if (module->register_callback_mask == 0) {
		system_interrupt_disable(SYSTEM_INTERRUPT_MODULE_TRNG);
	}
	return STATUS_OK;
}