/* Registers an asynchronous callback function with the driver. 
Registers an asynchronous callback with the DAC driver, fired when a callback condition occurs. */
enum status_code dac_register_callback(struct dac_module *const module_inst, const enum dac_channel channel, const dac_callback_t callback, const enum dac_callback type)
/* Registers an asynchronous callback function with the driver. 
Registers an asynchronous callback with the DAC driver, fired when a callback condition occurs. */
enum status_code dac_register_callback(struct dac_module *const module_inst, const enum dac_channel channel, const dac_callback_t callback, const enum dac_callback type)
{
	Assert(module_inst);
	Assert(callback);
	UNUSED(channel);
	if (module_inst->start_on_event == false) {
		return STATUS_ERR_UNSUPPORTED_DEV;
	}
	if ((uint8_t)type < DAC_CALLBACK_N) {
		module_inst->callback[(uint8_t)type] = callback;
		return STATUS_OK;
	}
	return STATUS_ERR_INVALID_ARG;
}