The function call dac_txdone(&g_dac1dev) was not contained in ifdef section. This was cousing compilation error if only DAC1 was configured as the structure g_dac1dev is defined only if DAC0 is used. This commit fixes the error and ensures the function is called only if corresponding DAC is configured. Signed-off-by: Michal Lenc <michallenc@seznam.cz>