/* Retrieves the current module status. 
Checks the status of the module and returns it as a bitmask of status flags. */
uint32_t dac_get_status(struct dac_module *const module_inst)
/* Retrieves the current module status. 
Checks the status of the module and returns it as a bitmask of status flags. */
uint32_t dac_get_status(struct dac_module *const module_inst)
{
	Assert(module_inst);
	Assert(module_inst->hw);
	Dac *const dac_module = module_inst->hw;
	uint8_t intflags = dac_module->INTFLAG.reg;
	uint32_t status_flags = 0;
	if (intflags & DAC_INTFLAG_EMPTY) {
		status_flags |= DAC_STATUS_CHANNEL_0_EMPTY;
	}
	if (intflags & DAC_INTFLAG_UNDERRUN) {
		status_flags |= DAC_STATUS_CHANNEL_0_UNDERRUN;
	}
	return status_flags;
}