/* get the specified DAC flag (DAC DMA underrun flag)  */
FlagStatus dac_flag_get(uint32_t dac_periph)
/* get the specified DAC flag (DAC DMA underrun flag)  */
FlagStatus dac_flag_get(uint32_t dac_periph)
{
    FlagStatus temp_flag = RESET;
    if(DAC0 == dac_periph) {
        if(RESET != (DAC_STAT & DAC_STAT_DDUDR0)) {
            temp_flag = SET;
        }
    } else {
        if(RESET != (DAC_STAT & DAC_STAT_DDUDR1)) {
            temp_flag = SET;
        }
    }
    return temp_flag;
}