/* Reset DAC to same state as after a HW reset.  */
void DAC_Reset(DAC_TypeDef *dac)
/* Reset DAC to same state as after a HW reset.  */
void DAC_Reset(DAC_TypeDef *dac)
{
  dac->CH0CTRL  = _DAC_CH0CTRL_RESETVALUE;
  dac->CH1CTRL  = _DAC_CH1CTRL_RESETVALUE;
  dac->CTRL     = _DAC_CTRL_RESETVALUE;
  dac->IEN      = _DAC_IEN_RESETVALUE;
  dac->IFC      = _DAC_IFC_MASK;
  dac->CAL      = DEVINFO->DAC0CAL0;
  dac->BIASPROG = _DAC_BIASPROG_RESETVALUE;
}