Mateusz Kowalik / Application_danix

Fork of Application by Daniel Sygut

Committer:
Zaitsev
Date:
Tue Jan 10 20:42:26 2017 +0000
Revision:
10:41552d038a69
USB Serial bi-directional bridge

Who changed what in which revision?

UserRevisionLine numberNew contents of line
Zaitsev 10:41552d038a69 1 /***************************************************************************//**
Zaitsev 10:41552d038a69 2 * @file em_dac.c
Zaitsev 10:41552d038a69 3 * @brief Digital to Analog Converter (DAC) Peripheral API
Zaitsev 10:41552d038a69 4 * @version 5.0.0
Zaitsev 10:41552d038a69 5 *******************************************************************************
Zaitsev 10:41552d038a69 6 * @section License
Zaitsev 10:41552d038a69 7 * <b>Copyright 2016 Silicon Laboratories, Inc. http://www.silabs.com</b>
Zaitsev 10:41552d038a69 8 *******************************************************************************
Zaitsev 10:41552d038a69 9 *
Zaitsev 10:41552d038a69 10 * Permission is granted to anyone to use this software for any purpose,
Zaitsev 10:41552d038a69 11 * including commercial applications, and to alter it and redistribute it
Zaitsev 10:41552d038a69 12 * freely, subject to the following restrictions:
Zaitsev 10:41552d038a69 13 *
Zaitsev 10:41552d038a69 14 * 1. The origin of this software must not be misrepresented; you must not
Zaitsev 10:41552d038a69 15 * claim that you wrote the original software.
Zaitsev 10:41552d038a69 16 * 2. Altered source versions must be plainly marked as such, and must not be
Zaitsev 10:41552d038a69 17 * misrepresented as being the original software.
Zaitsev 10:41552d038a69 18 * 3. This notice may not be removed or altered from any source distribution.
Zaitsev 10:41552d038a69 19 *
Zaitsev 10:41552d038a69 20 * DISCLAIMER OF WARRANTY/LIMITATION OF REMEDIES: Silicon Labs has no
Zaitsev 10:41552d038a69 21 * obligation to support this Software. Silicon Labs is providing the
Zaitsev 10:41552d038a69 22 * Software "AS IS", with no express or implied warranties of any kind,
Zaitsev 10:41552d038a69 23 * including, but not limited to, any implied warranties of merchantability
Zaitsev 10:41552d038a69 24 * or fitness for any particular purpose or warranties against infringement
Zaitsev 10:41552d038a69 25 * of any proprietary rights of a third party.
Zaitsev 10:41552d038a69 26 *
Zaitsev 10:41552d038a69 27 * Silicon Labs will not be liable for any consequential, incidental, or
Zaitsev 10:41552d038a69 28 * special damages, or any other relief, or for any claim by any third party,
Zaitsev 10:41552d038a69 29 * arising from your use of this Software.
Zaitsev 10:41552d038a69 30 *
Zaitsev 10:41552d038a69 31 ******************************************************************************/
Zaitsev 10:41552d038a69 32
Zaitsev 10:41552d038a69 33 #include "em_dac.h"
Zaitsev 10:41552d038a69 34 #if defined(DAC_COUNT) && (DAC_COUNT > 0)
Zaitsev 10:41552d038a69 35 #include "em_cmu.h"
Zaitsev 10:41552d038a69 36 #include "em_assert.h"
Zaitsev 10:41552d038a69 37 #include "em_bus.h"
Zaitsev 10:41552d038a69 38
Zaitsev 10:41552d038a69 39 /***************************************************************************//**
Zaitsev 10:41552d038a69 40 * @addtogroup emlib
Zaitsev 10:41552d038a69 41 * @{
Zaitsev 10:41552d038a69 42 ******************************************************************************/
Zaitsev 10:41552d038a69 43
Zaitsev 10:41552d038a69 44 /***************************************************************************//**
Zaitsev 10:41552d038a69 45 * @addtogroup DAC
Zaitsev 10:41552d038a69 46 * @brief Digital to Analog Converter (DAC) Peripheral API
Zaitsev 10:41552d038a69 47 * @details
Zaitsev 10:41552d038a69 48 * This module contains functions to control the DAC peripheral of Silicon
Zaitsev 10:41552d038a69 49 * Labs 32-bit MCUs and SoCs. The DAC converts digital values to analog signals
Zaitsev 10:41552d038a69 50 * at up to 500 ksps with 12-bit accuracy. The DAC is designed for low energy
Zaitsev 10:41552d038a69 51 * consumption, but can also provide very good performance.
Zaitsev 10:41552d038a69 52 * @{
Zaitsev 10:41552d038a69 53 ******************************************************************************/
Zaitsev 10:41552d038a69 54
Zaitsev 10:41552d038a69 55 /*******************************************************************************
Zaitsev 10:41552d038a69 56 ******************************* DEFINES ***********************************
Zaitsev 10:41552d038a69 57 ******************************************************************************/
Zaitsev 10:41552d038a69 58
Zaitsev 10:41552d038a69 59 /** @cond DO_NOT_INCLUDE_WITH_DOXYGEN */
Zaitsev 10:41552d038a69 60
Zaitsev 10:41552d038a69 61 /** Validation of DAC channel for assert statements. */
Zaitsev 10:41552d038a69 62 #define DAC_CH_VALID(ch) ((ch) <= 1)
Zaitsev 10:41552d038a69 63
Zaitsev 10:41552d038a69 64 /** Max DAC clock */
Zaitsev 10:41552d038a69 65 #define DAC_MAX_CLOCK 1000000
Zaitsev 10:41552d038a69 66
Zaitsev 10:41552d038a69 67 /** @endcond */
Zaitsev 10:41552d038a69 68
Zaitsev 10:41552d038a69 69 /*******************************************************************************
Zaitsev 10:41552d038a69 70 ************************** GLOBAL FUNCTIONS *******************************
Zaitsev 10:41552d038a69 71 ******************************************************************************/
Zaitsev 10:41552d038a69 72
Zaitsev 10:41552d038a69 73 /***************************************************************************//**
Zaitsev 10:41552d038a69 74 * @brief
Zaitsev 10:41552d038a69 75 * Enable/disable DAC channel.
Zaitsev 10:41552d038a69 76 *
Zaitsev 10:41552d038a69 77 * @param[in] dac
Zaitsev 10:41552d038a69 78 * Pointer to DAC peripheral register block.
Zaitsev 10:41552d038a69 79 *
Zaitsev 10:41552d038a69 80 * @param[in] ch
Zaitsev 10:41552d038a69 81 * Channel to enable/disable.
Zaitsev 10:41552d038a69 82 *
Zaitsev 10:41552d038a69 83 * @param[in] enable
Zaitsev 10:41552d038a69 84 * true to enable DAC channel, false to disable.
Zaitsev 10:41552d038a69 85 ******************************************************************************/
Zaitsev 10:41552d038a69 86 void DAC_Enable(DAC_TypeDef *dac, unsigned int ch, bool enable)
Zaitsev 10:41552d038a69 87 {
Zaitsev 10:41552d038a69 88 volatile uint32_t *reg;
Zaitsev 10:41552d038a69 89
Zaitsev 10:41552d038a69 90 EFM_ASSERT(DAC_REF_VALID(dac));
Zaitsev 10:41552d038a69 91 EFM_ASSERT(DAC_CH_VALID(ch));
Zaitsev 10:41552d038a69 92
Zaitsev 10:41552d038a69 93 if (!ch)
Zaitsev 10:41552d038a69 94 {
Zaitsev 10:41552d038a69 95 reg = &(dac->CH0CTRL);
Zaitsev 10:41552d038a69 96 }
Zaitsev 10:41552d038a69 97 else
Zaitsev 10:41552d038a69 98 {
Zaitsev 10:41552d038a69 99 reg = &(dac->CH1CTRL);
Zaitsev 10:41552d038a69 100 }
Zaitsev 10:41552d038a69 101
Zaitsev 10:41552d038a69 102 BUS_RegBitWrite(reg, _DAC_CH0CTRL_EN_SHIFT, enable);
Zaitsev 10:41552d038a69 103 }
Zaitsev 10:41552d038a69 104
Zaitsev 10:41552d038a69 105
Zaitsev 10:41552d038a69 106 /***************************************************************************//**
Zaitsev 10:41552d038a69 107 * @brief
Zaitsev 10:41552d038a69 108 * Initialize DAC.
Zaitsev 10:41552d038a69 109 *
Zaitsev 10:41552d038a69 110 * @details
Zaitsev 10:41552d038a69 111 * Initializes common parts for both channels. In addition, channel control
Zaitsev 10:41552d038a69 112 * configuration must be done, please refer to DAC_InitChannel().
Zaitsev 10:41552d038a69 113 *
Zaitsev 10:41552d038a69 114 * @note
Zaitsev 10:41552d038a69 115 * This function will disable both channels prior to configuration.
Zaitsev 10:41552d038a69 116 *
Zaitsev 10:41552d038a69 117 * @param[in] dac
Zaitsev 10:41552d038a69 118 * Pointer to DAC peripheral register block.
Zaitsev 10:41552d038a69 119 *
Zaitsev 10:41552d038a69 120 * @param[in] init
Zaitsev 10:41552d038a69 121 * Pointer to DAC initialization structure.
Zaitsev 10:41552d038a69 122 ******************************************************************************/
Zaitsev 10:41552d038a69 123 void DAC_Init(DAC_TypeDef *dac, const DAC_Init_TypeDef *init)
Zaitsev 10:41552d038a69 124 {
Zaitsev 10:41552d038a69 125 uint32_t tmp;
Zaitsev 10:41552d038a69 126
Zaitsev 10:41552d038a69 127 EFM_ASSERT(DAC_REF_VALID(dac));
Zaitsev 10:41552d038a69 128
Zaitsev 10:41552d038a69 129 /* Make sure both channels are disabled. */
Zaitsev 10:41552d038a69 130 BUS_RegBitWrite(&(dac->CH0CTRL), _DAC_CH0CTRL_EN_SHIFT, 0);
Zaitsev 10:41552d038a69 131 BUS_RegBitWrite(&(dac->CH1CTRL), _DAC_CH0CTRL_EN_SHIFT, 0);
Zaitsev 10:41552d038a69 132
Zaitsev 10:41552d038a69 133 /* Load proper calibration data depending on selected reference */
Zaitsev 10:41552d038a69 134 switch (init->reference)
Zaitsev 10:41552d038a69 135 {
Zaitsev 10:41552d038a69 136 case dacRef2V5:
Zaitsev 10:41552d038a69 137 dac->CAL = DEVINFO->DAC0CAL1;
Zaitsev 10:41552d038a69 138 break;
Zaitsev 10:41552d038a69 139
Zaitsev 10:41552d038a69 140 case dacRefVDD:
Zaitsev 10:41552d038a69 141 dac->CAL = DEVINFO->DAC0CAL2;
Zaitsev 10:41552d038a69 142 break;
Zaitsev 10:41552d038a69 143
Zaitsev 10:41552d038a69 144 default: /* 1.25V */
Zaitsev 10:41552d038a69 145 dac->CAL = DEVINFO->DAC0CAL0;
Zaitsev 10:41552d038a69 146 break;
Zaitsev 10:41552d038a69 147 }
Zaitsev 10:41552d038a69 148
Zaitsev 10:41552d038a69 149 tmp = ((uint32_t)(init->refresh) << _DAC_CTRL_REFRSEL_SHIFT)
Zaitsev 10:41552d038a69 150 | (((uint32_t)(init->prescale) << _DAC_CTRL_PRESC_SHIFT)
Zaitsev 10:41552d038a69 151 & _DAC_CTRL_PRESC_MASK)
Zaitsev 10:41552d038a69 152 | ((uint32_t)(init->reference) << _DAC_CTRL_REFSEL_SHIFT)
Zaitsev 10:41552d038a69 153 | ((uint32_t)(init->outMode) << _DAC_CTRL_OUTMODE_SHIFT)
Zaitsev 10:41552d038a69 154 | ((uint32_t)(init->convMode) << _DAC_CTRL_CONVMODE_SHIFT);
Zaitsev 10:41552d038a69 155
Zaitsev 10:41552d038a69 156 if (init->ch0ResetPre)
Zaitsev 10:41552d038a69 157 {
Zaitsev 10:41552d038a69 158 tmp |= DAC_CTRL_CH0PRESCRST;
Zaitsev 10:41552d038a69 159 }
Zaitsev 10:41552d038a69 160
Zaitsev 10:41552d038a69 161 if (init->outEnablePRS)
Zaitsev 10:41552d038a69 162 {
Zaitsev 10:41552d038a69 163 tmp |= DAC_CTRL_OUTENPRS;
Zaitsev 10:41552d038a69 164 }
Zaitsev 10:41552d038a69 165
Zaitsev 10:41552d038a69 166 if (init->sineEnable)
Zaitsev 10:41552d038a69 167 {
Zaitsev 10:41552d038a69 168 tmp |= DAC_CTRL_SINEMODE;
Zaitsev 10:41552d038a69 169 }
Zaitsev 10:41552d038a69 170
Zaitsev 10:41552d038a69 171 if (init->diff)
Zaitsev 10:41552d038a69 172 {
Zaitsev 10:41552d038a69 173 tmp |= DAC_CTRL_DIFF;
Zaitsev 10:41552d038a69 174 }
Zaitsev 10:41552d038a69 175
Zaitsev 10:41552d038a69 176 dac->CTRL = tmp;
Zaitsev 10:41552d038a69 177 }
Zaitsev 10:41552d038a69 178
Zaitsev 10:41552d038a69 179
Zaitsev 10:41552d038a69 180 /***************************************************************************//**
Zaitsev 10:41552d038a69 181 * @brief
Zaitsev 10:41552d038a69 182 * Initialize DAC channel.
Zaitsev 10:41552d038a69 183 *
Zaitsev 10:41552d038a69 184 * @param[in] dac
Zaitsev 10:41552d038a69 185 * Pointer to DAC peripheral register block.
Zaitsev 10:41552d038a69 186 *
Zaitsev 10:41552d038a69 187 * @param[in] init
Zaitsev 10:41552d038a69 188 * Pointer to DAC initialization structure.
Zaitsev 10:41552d038a69 189 *
Zaitsev 10:41552d038a69 190 * @param[in] ch
Zaitsev 10:41552d038a69 191 * Channel number to initialize.
Zaitsev 10:41552d038a69 192 ******************************************************************************/
Zaitsev 10:41552d038a69 193 void DAC_InitChannel(DAC_TypeDef *dac,
Zaitsev 10:41552d038a69 194 const DAC_InitChannel_TypeDef *init,
Zaitsev 10:41552d038a69 195 unsigned int ch)
Zaitsev 10:41552d038a69 196 {
Zaitsev 10:41552d038a69 197 uint32_t tmp;
Zaitsev 10:41552d038a69 198
Zaitsev 10:41552d038a69 199 EFM_ASSERT(DAC_REF_VALID(dac));
Zaitsev 10:41552d038a69 200 EFM_ASSERT(DAC_CH_VALID(ch));
Zaitsev 10:41552d038a69 201
Zaitsev 10:41552d038a69 202 tmp = (uint32_t)(init->prsSel) << _DAC_CH0CTRL_PRSSEL_SHIFT;
Zaitsev 10:41552d038a69 203
Zaitsev 10:41552d038a69 204 if (init->enable)
Zaitsev 10:41552d038a69 205 {
Zaitsev 10:41552d038a69 206 tmp |= DAC_CH0CTRL_EN;
Zaitsev 10:41552d038a69 207 }
Zaitsev 10:41552d038a69 208
Zaitsev 10:41552d038a69 209 if (init->prsEnable)
Zaitsev 10:41552d038a69 210 {
Zaitsev 10:41552d038a69 211 tmp |= DAC_CH0CTRL_PRSEN;
Zaitsev 10:41552d038a69 212 }
Zaitsev 10:41552d038a69 213
Zaitsev 10:41552d038a69 214 if (init->refreshEnable)
Zaitsev 10:41552d038a69 215 {
Zaitsev 10:41552d038a69 216 tmp |= DAC_CH0CTRL_REFREN;
Zaitsev 10:41552d038a69 217 }
Zaitsev 10:41552d038a69 218
Zaitsev 10:41552d038a69 219 if (ch)
Zaitsev 10:41552d038a69 220 {
Zaitsev 10:41552d038a69 221 dac->CH1CTRL = tmp;
Zaitsev 10:41552d038a69 222 }
Zaitsev 10:41552d038a69 223 else
Zaitsev 10:41552d038a69 224 {
Zaitsev 10:41552d038a69 225 dac->CH0CTRL = tmp;
Zaitsev 10:41552d038a69 226 }
Zaitsev 10:41552d038a69 227 }
Zaitsev 10:41552d038a69 228
Zaitsev 10:41552d038a69 229
Zaitsev 10:41552d038a69 230 /***************************************************************************//**
Zaitsev 10:41552d038a69 231 * @brief
Zaitsev 10:41552d038a69 232 * Set the output signal of a DAC channel to a given value.
Zaitsev 10:41552d038a69 233 *
Zaitsev 10:41552d038a69 234 * @details
Zaitsev 10:41552d038a69 235 * This function sets the output signal of a DAC channel by writing @p value
Zaitsev 10:41552d038a69 236 * to the corresponding CHnDATA register.
Zaitsev 10:41552d038a69 237 *
Zaitsev 10:41552d038a69 238 * @param[in] dac
Zaitsev 10:41552d038a69 239 * Pointer to DAC peripheral register block.
Zaitsev 10:41552d038a69 240 *
Zaitsev 10:41552d038a69 241 * @param[in] channel
Zaitsev 10:41552d038a69 242 * Channel number to set output of.
Zaitsev 10:41552d038a69 243 *
Zaitsev 10:41552d038a69 244 * @param[in] value
Zaitsev 10:41552d038a69 245 * Value to write to the channel output register CHnDATA.
Zaitsev 10:41552d038a69 246 ******************************************************************************/
Zaitsev 10:41552d038a69 247 void DAC_ChannelOutputSet( DAC_TypeDef *dac,
Zaitsev 10:41552d038a69 248 unsigned int channel,
Zaitsev 10:41552d038a69 249 uint32_t value )
Zaitsev 10:41552d038a69 250 {
Zaitsev 10:41552d038a69 251 switch(channel)
Zaitsev 10:41552d038a69 252 {
Zaitsev 10:41552d038a69 253 case 0:
Zaitsev 10:41552d038a69 254 DAC_Channel0OutputSet(dac, value);
Zaitsev 10:41552d038a69 255 break;
Zaitsev 10:41552d038a69 256 case 1:
Zaitsev 10:41552d038a69 257 DAC_Channel1OutputSet(dac, value);
Zaitsev 10:41552d038a69 258 break;
Zaitsev 10:41552d038a69 259 default:
Zaitsev 10:41552d038a69 260 EFM_ASSERT(0);
Zaitsev 10:41552d038a69 261 break;
Zaitsev 10:41552d038a69 262 }
Zaitsev 10:41552d038a69 263 }
Zaitsev 10:41552d038a69 264
Zaitsev 10:41552d038a69 265
Zaitsev 10:41552d038a69 266 /***************************************************************************//**
Zaitsev 10:41552d038a69 267 * @brief
Zaitsev 10:41552d038a69 268 * Calculate prescaler value used to determine DAC clock.
Zaitsev 10:41552d038a69 269 *
Zaitsev 10:41552d038a69 270 * @details
Zaitsev 10:41552d038a69 271 * The DAC clock is given by: HFPERCLK / (prescale ^ 2). If the requested
Zaitsev 10:41552d038a69 272 * DAC frequency is low and the max prescaler value can not adjust the
Zaitsev 10:41552d038a69 273 * actual DAC frequency lower than the requested DAC frequency, then the
Zaitsev 10:41552d038a69 274 * max prescaler value is returned, resulting in a higher DAC frequency
Zaitsev 10:41552d038a69 275 * than requested.
Zaitsev 10:41552d038a69 276 *
Zaitsev 10:41552d038a69 277 * @param[in] dacFreq DAC frequency wanted. The frequency will automatically
Zaitsev 10:41552d038a69 278 * be adjusted to be below max allowed DAC clock.
Zaitsev 10:41552d038a69 279 *
Zaitsev 10:41552d038a69 280 * @param[in] hfperFreq Frequency in Hz of reference HFPER clock. Set to 0 to
Zaitsev 10:41552d038a69 281 * use currently defined HFPER clock setting.
Zaitsev 10:41552d038a69 282 *
Zaitsev 10:41552d038a69 283 * @return
Zaitsev 10:41552d038a69 284 * Prescaler value to use for DAC in order to achieve a clock value
Zaitsev 10:41552d038a69 285 * <= @p dacFreq.
Zaitsev 10:41552d038a69 286 ******************************************************************************/
Zaitsev 10:41552d038a69 287 uint8_t DAC_PrescaleCalc(uint32_t dacFreq, uint32_t hfperFreq)
Zaitsev 10:41552d038a69 288 {
Zaitsev 10:41552d038a69 289 uint32_t ret;
Zaitsev 10:41552d038a69 290
Zaitsev 10:41552d038a69 291 /* Make sure selected DAC clock is below max value */
Zaitsev 10:41552d038a69 292 if (dacFreq > DAC_MAX_CLOCK)
Zaitsev 10:41552d038a69 293 {
Zaitsev 10:41552d038a69 294 dacFreq = DAC_MAX_CLOCK;
Zaitsev 10:41552d038a69 295 }
Zaitsev 10:41552d038a69 296
Zaitsev 10:41552d038a69 297 /* Use current HFPER frequency? */
Zaitsev 10:41552d038a69 298 if (!hfperFreq)
Zaitsev 10:41552d038a69 299 {
Zaitsev 10:41552d038a69 300 hfperFreq = CMU_ClockFreqGet(cmuClock_HFPER);
Zaitsev 10:41552d038a69 301 }
Zaitsev 10:41552d038a69 302
Zaitsev 10:41552d038a69 303 /* Iterate in order to determine best prescale value. Only a few possible */
Zaitsev 10:41552d038a69 304 /* values. We start with lowest prescaler value in order to get first */
Zaitsev 10:41552d038a69 305 /* equal or below wanted DAC frequency value. */
Zaitsev 10:41552d038a69 306 for (ret = 0; ret <= (_DAC_CTRL_PRESC_MASK >> _DAC_CTRL_PRESC_SHIFT); ret++)
Zaitsev 10:41552d038a69 307 {
Zaitsev 10:41552d038a69 308 if ((hfperFreq >> ret) <= dacFreq)
Zaitsev 10:41552d038a69 309 break;
Zaitsev 10:41552d038a69 310 }
Zaitsev 10:41552d038a69 311
Zaitsev 10:41552d038a69 312 /* If ret is higher than the max prescaler value, make sure to return
Zaitsev 10:41552d038a69 313 the max value. */
Zaitsev 10:41552d038a69 314 if (ret > (_DAC_CTRL_PRESC_MASK >> _DAC_CTRL_PRESC_SHIFT))
Zaitsev 10:41552d038a69 315 {
Zaitsev 10:41552d038a69 316 ret = _DAC_CTRL_PRESC_MASK >> _DAC_CTRL_PRESC_SHIFT;
Zaitsev 10:41552d038a69 317 }
Zaitsev 10:41552d038a69 318
Zaitsev 10:41552d038a69 319 return (uint8_t)ret;
Zaitsev 10:41552d038a69 320 }
Zaitsev 10:41552d038a69 321
Zaitsev 10:41552d038a69 322
Zaitsev 10:41552d038a69 323 /***************************************************************************//**
Zaitsev 10:41552d038a69 324 * @brief
Zaitsev 10:41552d038a69 325 * Reset DAC to same state as after a HW reset.
Zaitsev 10:41552d038a69 326 *
Zaitsev 10:41552d038a69 327 * @param[in] dac
Zaitsev 10:41552d038a69 328 * Pointer to ADC peripheral register block.
Zaitsev 10:41552d038a69 329 ******************************************************************************/
Zaitsev 10:41552d038a69 330 void DAC_Reset(DAC_TypeDef *dac)
Zaitsev 10:41552d038a69 331 {
Zaitsev 10:41552d038a69 332 /* Disable channels, before resetting other registers. */
Zaitsev 10:41552d038a69 333 dac->CH0CTRL = _DAC_CH0CTRL_RESETVALUE;
Zaitsev 10:41552d038a69 334 dac->CH1CTRL = _DAC_CH1CTRL_RESETVALUE;
Zaitsev 10:41552d038a69 335 dac->CTRL = _DAC_CTRL_RESETVALUE;
Zaitsev 10:41552d038a69 336 dac->IEN = _DAC_IEN_RESETVALUE;
Zaitsev 10:41552d038a69 337 dac->IFC = _DAC_IFC_MASK;
Zaitsev 10:41552d038a69 338 dac->CAL = DEVINFO->DAC0CAL0;
Zaitsev 10:41552d038a69 339 dac->BIASPROG = _DAC_BIASPROG_RESETVALUE;
Zaitsev 10:41552d038a69 340 /* Do not reset route register, setting should be done independently */
Zaitsev 10:41552d038a69 341 }
Zaitsev 10:41552d038a69 342
Zaitsev 10:41552d038a69 343
Zaitsev 10:41552d038a69 344 /** @} (end addtogroup DAC) */
Zaitsev 10:41552d038a69 345 /** @} (end addtogroup emlib) */
Zaitsev 10:41552d038a69 346 #endif /* defined(DAC_COUNT) && (DAC_COUNT > 0) */