t

Fork of mbed-dev by mbed official

Committer:
<>
Date:
Fri Oct 28 11:17:30 2016 +0100
Revision:
149:156823d33999
Parent:
targets/hal/TARGET_Atmel/TARGET_SAM_CortexM0P/drivers/dac/TARGET_SAMD21/dac_feature.h@18:da299f395b9e
This updates the lib to the mbed lib v128

NOTE: This release includes a restructuring of the file and directory locations and thus some
include paths in your code may need updating accordingly.

Who changed what in which revision?

UserRevisionLine numberNew contents of line
mbed_official 15:a81a8d6c1dfe 1 /**
mbed_official 15:a81a8d6c1dfe 2 * \file
mbed_official 15:a81a8d6c1dfe 3 *
mbed_official 15:a81a8d6c1dfe 4 * \brief SAM Peripheral Digital-to-Analog Converter Driver
mbed_official 15:a81a8d6c1dfe 5 *
mbed_official 15:a81a8d6c1dfe 6 * Copyright (C) 2012-2015 Atmel Corporation. All rights reserved.
mbed_official 15:a81a8d6c1dfe 7 *
mbed_official 15:a81a8d6c1dfe 8 * \asf_license_start
mbed_official 15:a81a8d6c1dfe 9 *
mbed_official 15:a81a8d6c1dfe 10 * \page License
mbed_official 15:a81a8d6c1dfe 11 *
mbed_official 15:a81a8d6c1dfe 12 * Redistribution and use in source and binary forms, with or without
mbed_official 15:a81a8d6c1dfe 13 * modification, are permitted provided that the following conditions are met:
mbed_official 15:a81a8d6c1dfe 14 *
mbed_official 15:a81a8d6c1dfe 15 * 1. Redistributions of source code must retain the above copyright notice,
mbed_official 15:a81a8d6c1dfe 16 * this list of conditions and the following disclaimer.
mbed_official 15:a81a8d6c1dfe 17 *
mbed_official 15:a81a8d6c1dfe 18 * 2. Redistributions in binary form must reproduce the above copyright notice,
mbed_official 15:a81a8d6c1dfe 19 * this list of conditions and the following disclaimer in the documentation
mbed_official 15:a81a8d6c1dfe 20 * and/or other materials provided with the distribution.
mbed_official 15:a81a8d6c1dfe 21 *
mbed_official 15:a81a8d6c1dfe 22 * 3. The name of Atmel may not be used to endorse or promote products derived
mbed_official 15:a81a8d6c1dfe 23 * from this software without specific prior written permission.
mbed_official 15:a81a8d6c1dfe 24 *
mbed_official 15:a81a8d6c1dfe 25 * 4. This software may only be redistributed and used in connection with an
mbed_official 15:a81a8d6c1dfe 26 * Atmel microcontroller product.
mbed_official 15:a81a8d6c1dfe 27 *
mbed_official 15:a81a8d6c1dfe 28 * THIS SOFTWARE IS PROVIDED BY ATMEL "AS IS" AND ANY EXPRESS OR IMPLIED
mbed_official 15:a81a8d6c1dfe 29 * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
mbed_official 15:a81a8d6c1dfe 30 * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT ARE
mbed_official 15:a81a8d6c1dfe 31 * EXPRESSLY AND SPECIFICALLY DISCLAIMED. IN NO EVENT SHALL ATMEL BE LIABLE FOR
mbed_official 15:a81a8d6c1dfe 32 * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
mbed_official 15:a81a8d6c1dfe 33 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
mbed_official 15:a81a8d6c1dfe 34 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
mbed_official 15:a81a8d6c1dfe 35 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
mbed_official 15:a81a8d6c1dfe 36 * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
mbed_official 15:a81a8d6c1dfe 37 * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
mbed_official 15:a81a8d6c1dfe 38 * POSSIBILITY OF SUCH DAMAGE.
mbed_official 15:a81a8d6c1dfe 39 *
mbed_official 15:a81a8d6c1dfe 40 * \asf_license_stop
mbed_official 15:a81a8d6c1dfe 41 *
mbed_official 15:a81a8d6c1dfe 42 */
mbed_official 15:a81a8d6c1dfe 43 /*
mbed_official 15:a81a8d6c1dfe 44 * Support and FAQ: visit <a href="http://www.atmel.com/design-support/">Atmel Support</a>
mbed_official 15:a81a8d6c1dfe 45 */
mbed_official 15:a81a8d6c1dfe 46 #ifndef DAC_FEATURE_H_INCLUDED
mbed_official 15:a81a8d6c1dfe 47 #define DAC_FEATURE_H_INCLUDED
mbed_official 15:a81a8d6c1dfe 48
mbed_official 15:a81a8d6c1dfe 49 /**
mbed_official 15:a81a8d6c1dfe 50 * \defgroup asfdoc_sam0_dac_group SAM Digital-to-Analog Driver (DAC)
mbed_official 15:a81a8d6c1dfe 51 *
mbed_official 15:a81a8d6c1dfe 52 * This driver for Atmel&reg; | SMART ARM&reg;-based microcontrollers provides an interface for the conversion of
mbed_official 15:a81a8d6c1dfe 53 * digital values to analog voltage. The following driver API modes are covered
mbed_official 15:a81a8d6c1dfe 54 * by this manual:
mbed_official 15:a81a8d6c1dfe 55 *
mbed_official 15:a81a8d6c1dfe 56 * - Polled APIs
mbed_official 15:a81a8d6c1dfe 57 * \if DAC_CALLBACK_MODE
mbed_official 15:a81a8d6c1dfe 58 * - Callback APIs
mbed_official 15:a81a8d6c1dfe 59 * \endif
mbed_official 15:a81a8d6c1dfe 60 *
mbed_official 15:a81a8d6c1dfe 61 * The following peripherals are used by this module:
mbed_official 15:a81a8d6c1dfe 62 * - DAC (Digital-to-Analog Converter)
mbed_official 15:a81a8d6c1dfe 63 *
mbed_official 15:a81a8d6c1dfe 64 * The following devices can use this module:
mbed_official 15:a81a8d6c1dfe 65 * - Atmel | SMART SAM D20/D21
mbed_official 15:a81a8d6c1dfe 66 * - Atmel | SMART SAM D10/D11
mbed_official 15:a81a8d6c1dfe 67 * - Atmel | SMART SAM DA0/DA1
mbed_official 15:a81a8d6c1dfe 68 * - Atmel | SMART SAM C21
mbed_official 15:a81a8d6c1dfe 69 *
mbed_official 15:a81a8d6c1dfe 70 * The outline of this documentation is as follows:
mbed_official 15:a81a8d6c1dfe 71 * - \ref asfdoc_sam0_dac_prerequisites
mbed_official 15:a81a8d6c1dfe 72 * - \ref asfdoc_sam0_dac_module_overview
mbed_official 15:a81a8d6c1dfe 73 * - \ref asfdoc_sam0_dac_special_considerations
mbed_official 15:a81a8d6c1dfe 74 * - \ref asfdoc_sam0_dac_extra_info
mbed_official 15:a81a8d6c1dfe 75 * - \ref asfdoc_sam0_dac_examples
mbed_official 15:a81a8d6c1dfe 76 * - \ref asfdoc_sam0_dac_api_overview
mbed_official 15:a81a8d6c1dfe 77 *
mbed_official 15:a81a8d6c1dfe 78 *
mbed_official 15:a81a8d6c1dfe 79 * \section asfdoc_sam0_dac_prerequisites Prerequisites
mbed_official 15:a81a8d6c1dfe 80 *
mbed_official 15:a81a8d6c1dfe 81 * There are no prerequisites for this module.
mbed_official 15:a81a8d6c1dfe 82 *
mbed_official 15:a81a8d6c1dfe 83 *
mbed_official 15:a81a8d6c1dfe 84 * \section asfdoc_sam0_dac_module_overview Module Overview
mbed_official 15:a81a8d6c1dfe 85 *
mbed_official 15:a81a8d6c1dfe 86 * The Digital-to-Analog converter converts a digital value to analog voltage.
mbed_official 15:a81a8d6c1dfe 87 * The SAM DAC module has one channel with 10-bit resolution,
mbed_official 15:a81a8d6c1dfe 88 * and is capable of converting up to 350k samples per second (ksps).
mbed_official 15:a81a8d6c1dfe 89 *
mbed_official 15:a81a8d6c1dfe 90 * A common use of DAC is to generate audio signals by connecting the DAC
mbed_official 15:a81a8d6c1dfe 91 * output to a speaker, or to generate a reference voltage; either for an
mbed_official 15:a81a8d6c1dfe 92 * external circuit or an internal peripheral such as the Analog Comparator.
mbed_official 15:a81a8d6c1dfe 93 *
mbed_official 15:a81a8d6c1dfe 94 * After being set up, the DAC will convert new digital values written to the
mbed_official 15:a81a8d6c1dfe 95 * conversion data register (DATA) to an analog value either on the VOUT pin of
mbed_official 15:a81a8d6c1dfe 96 * the device, or internally for use as an input to the AC, ADC, and other analog
mbed_official 15:a81a8d6c1dfe 97 * modules.
mbed_official 15:a81a8d6c1dfe 98 *
mbed_official 15:a81a8d6c1dfe 99 * Writing the DATA register will start a new conversion. It is also possible
mbed_official 15:a81a8d6c1dfe 100 * to trigger the conversion from the event system.
mbed_official 15:a81a8d6c1dfe 101 *
mbed_official 15:a81a8d6c1dfe 102 * A simplified block diagram of the DAC can be seen in
mbed_official 15:a81a8d6c1dfe 103 * \ref asfdoc_sam0_dac_module_block_diagram "the figure below".
mbed_official 15:a81a8d6c1dfe 104 *
mbed_official 15:a81a8d6c1dfe 105 * \anchor asfdoc_sam0_dac_module_block_diagram
mbed_official 15:a81a8d6c1dfe 106 * \image html dac_block_diagram.svg "DAC Block Diagram"
mbed_official 15:a81a8d6c1dfe 107 *
mbed_official 15:a81a8d6c1dfe 108 * \subsection asfdoc_sam0_dac_conversion_range Conversion Range
mbed_official 15:a81a8d6c1dfe 109 * The conversion range is between GND and the selected voltage reference.
mbed_official 15:a81a8d6c1dfe 110 * Available voltage references are:
mbed_official 15:a81a8d6c1dfe 111 * \li AVCC voltage reference
mbed_official 15:a81a8d6c1dfe 112 * \li Internal 1V reference (INT1V)
mbed_official 15:a81a8d6c1dfe 113 * \li External voltage reference (AREF)
mbed_official 15:a81a8d6c1dfe 114 *
mbed_official 15:a81a8d6c1dfe 115 * \note Internal references will be enabled by the driver, but not disabled.
mbed_official 15:a81a8d6c1dfe 116 * Any reference not used by the application should be disabled by the application.
mbed_official 15:a81a8d6c1dfe 117 *
mbed_official 15:a81a8d6c1dfe 118 * The output voltage from a DAC channel is given as:
mbed_official 15:a81a8d6c1dfe 119 * \f[
mbed_official 15:a81a8d6c1dfe 120 * V_{OUT} = \frac{DATA}{0x3FF} \times VREF
mbed_official 15:a81a8d6c1dfe 121 * \f]
mbed_official 15:a81a8d6c1dfe 122 *
mbed_official 15:a81a8d6c1dfe 123 * \subsection asfdoc_sam0_dac_conversion Conversion
mbed_official 15:a81a8d6c1dfe 124 * The digital value written to the conversion data register (DATA) will be
mbed_official 15:a81a8d6c1dfe 125 * converted to an analog value.
mbed_official 15:a81a8d6c1dfe 126 * Writing the DATA register will start a new conversion.
mbed_official 15:a81a8d6c1dfe 127 * It is also possible to write the conversion data to the DATABUF register,
mbed_official 15:a81a8d6c1dfe 128 * the writing of the DATA register can then be triggered from the event
mbed_official 15:a81a8d6c1dfe 129 * system, which will load the value from DATABUF to DATA.
mbed_official 15:a81a8d6c1dfe 130 *
mbed_official 15:a81a8d6c1dfe 131 * \subsection asfdoc_sam0_dac_analog_output Analog Output
mbed_official 15:a81a8d6c1dfe 132 * The analog output value can be output to either the VOUT pin or internally,
mbed_official 15:a81a8d6c1dfe 133 * but not both at the same time.
mbed_official 15:a81a8d6c1dfe 134 *
mbed_official 15:a81a8d6c1dfe 135 * \subsubsection asfdoc_sam0_dac_analog_output_external External Output
mbed_official 15:a81a8d6c1dfe 136 * The output buffer must be enabled in order to drive the DAC output to the
mbed_official 15:a81a8d6c1dfe 137 * VOUT pin. Due to the output buffer, the DAC has high drive strength, and is
mbed_official 15:a81a8d6c1dfe 138 * capable of driving both resistive and capacitive loads, as well as loads
mbed_official 15:a81a8d6c1dfe 139 * which combine both.
mbed_official 15:a81a8d6c1dfe 140 *
mbed_official 15:a81a8d6c1dfe 141 * \subsubsection asfdoc_sam0_dac_analog_output_internal Internal Output
mbed_official 15:a81a8d6c1dfe 142 * The analog value can be internally available for use as input to the
mbed_official 15:a81a8d6c1dfe 143 * AC or ADC modules.
mbed_official 15:a81a8d6c1dfe 144 *
mbed_official 15:a81a8d6c1dfe 145 * \subsection asfdoc_sam0_dac_events Events
mbed_official 15:a81a8d6c1dfe 146 * Events generation and event actions are configurable in the DAC.
mbed_official 15:a81a8d6c1dfe 147 * The DAC has one event line input and one event output: <i>Start Conversion</i>
mbed_official 15:a81a8d6c1dfe 148 * and <i>Data Buffer Empty</i>.
mbed_official 15:a81a8d6c1dfe 149 *
mbed_official 15:a81a8d6c1dfe 150 * If the Start Conversion input event is enabled in the module configuration,
mbed_official 15:a81a8d6c1dfe 151 * an incoming event will load data from the data buffer to the data register
mbed_official 15:a81a8d6c1dfe 152 * and start a new conversion. This method synchronizes conversions with
mbed_official 15:a81a8d6c1dfe 153 * external events (such as those from a timer module) and ensures regular and
mbed_official 15:a81a8d6c1dfe 154 * fixed conversion intervals.
mbed_official 15:a81a8d6c1dfe 155 *
mbed_official 15:a81a8d6c1dfe 156 * If the Data Buffer Empty output event is enabled in the module configuration,
mbed_official 15:a81a8d6c1dfe 157 * events will be generated when the DAC data buffer register becomes empty and
mbed_official 15:a81a8d6c1dfe 158 * new data can be loaded to the buffer.
mbed_official 15:a81a8d6c1dfe 159 *
mbed_official 15:a81a8d6c1dfe 160 * \note The connection of events between modules requires the use of the
mbed_official 15:a81a8d6c1dfe 161 * \ref asfdoc_sam0_events_group "SAM Event System Driver (EVENTS)"
mbed_official 15:a81a8d6c1dfe 162 * to route output event of one module to the the input event of another.
mbed_official 15:a81a8d6c1dfe 163 * For more information on event routing, refer to the event driver
mbed_official 15:a81a8d6c1dfe 164 * documentation.
mbed_official 15:a81a8d6c1dfe 165 *
mbed_official 15:a81a8d6c1dfe 166 * \subsection asfdoc_sam0_dac_data_adjust Left and Right Adjusted Values
mbed_official 15:a81a8d6c1dfe 167 * The 10-bit input value to the DAC is contained in a 16-bit register. This
mbed_official 15:a81a8d6c1dfe 168 * can be configured to be either left or right adjusted. In
mbed_official 15:a81a8d6c1dfe 169 * \ref asfdoc_sam0_dac_module_adj_modes "the figure below" both options are
mbed_official 15:a81a8d6c1dfe 170 * shown, and the position of the most (MSB) and the least (LSB) significant bits
mbed_official 15:a81a8d6c1dfe 171 * are indicated. The unused bits should always be written to zero.
mbed_official 15:a81a8d6c1dfe 172 *
mbed_official 15:a81a8d6c1dfe 173 * \anchor asfdoc_sam0_dac_module_adj_modes
mbed_official 15:a81a8d6c1dfe 174 * \dot
mbed_official 15:a81a8d6c1dfe 175 * digraph {
mbed_official 15:a81a8d6c1dfe 176 * subgraph cluster_right {
mbed_official 15:a81a8d6c1dfe 177 * msbl [label="MSB", shape=none, group="msbl"];
mbed_official 15:a81a8d6c1dfe 178 * lsbl [label="LSB", shape=none];
mbed_official 15:a81a8d6c1dfe 179 * node [shape=none];
mbed_official 15:a81a8d6c1dfe 180 * color="white";
mbed_official 15:a81a8d6c1dfe 181 * reg_left [label=<
mbed_official 15:a81a8d6c1dfe 182 * <table cellspacing="0" cellpadding="2" width="100%">
mbed_official 15:a81a8d6c1dfe 183 * <tr>
mbed_official 15:a81a8d6c1dfe 184 * <td port="msb">15</td>
mbed_official 15:a81a8d6c1dfe 185 * <td>14</td>
mbed_official 15:a81a8d6c1dfe 186 * <td>13</td>
mbed_official 15:a81a8d6c1dfe 187 * <td>12</td>
mbed_official 15:a81a8d6c1dfe 188 * <td>11</td>
mbed_official 15:a81a8d6c1dfe 189 * <td>10</td>
mbed_official 15:a81a8d6c1dfe 190 * <td>9</td>
mbed_official 15:a81a8d6c1dfe 191 * <td>8</td>
mbed_official 15:a81a8d6c1dfe 192 * <td>7</td>
mbed_official 15:a81a8d6c1dfe 193 * <td port="lsb">6</td>
mbed_official 15:a81a8d6c1dfe 194 * <td>5</td>
mbed_official 15:a81a8d6c1dfe 195 * <td>4</td>
mbed_official 15:a81a8d6c1dfe 196 * <td>3</td>
mbed_official 15:a81a8d6c1dfe 197 * <td>2</td>
mbed_official 15:a81a8d6c1dfe 198 * <td>1</td>
mbed_official 15:a81a8d6c1dfe 199 * <td>0</td>
mbed_official 15:a81a8d6c1dfe 200 * </tr>
mbed_official 15:a81a8d6c1dfe 201 * <tr>
mbed_official 15:a81a8d6c1dfe 202 * <td COLSPAN="10"> DATA[9:0] </td>
mbed_official 15:a81a8d6c1dfe 203 * <td BGCOLOR="lightgray"> </td>
mbed_official 15:a81a8d6c1dfe 204 * <td BGCOLOR="lightgray"> </td>
mbed_official 15:a81a8d6c1dfe 205 * <td BGCOLOR="lightgray"> </td>
mbed_official 15:a81a8d6c1dfe 206 * <td BGCOLOR="lightgray"> </td>
mbed_official 15:a81a8d6c1dfe 207 * <td BGCOLOR="lightgray"> </td>
mbed_official 15:a81a8d6c1dfe 208 * <td BGCOLOR="lightgray"> </td>
mbed_official 15:a81a8d6c1dfe 209 * </tr>
mbed_official 15:a81a8d6c1dfe 210 * </table>
mbed_official 15:a81a8d6c1dfe 211 * >];
mbed_official 15:a81a8d6c1dfe 212 * msbl -> reg_left:msb:n;
mbed_official 15:a81a8d6c1dfe 213 * lsbl -> reg_left:lsb;
mbed_official 15:a81a8d6c1dfe 214 * label ="Left adjusted.\n";
mbed_official 15:a81a8d6c1dfe 215 * }
mbed_official 15:a81a8d6c1dfe 216 * subgraph cluster_left {
mbed_official 15:a81a8d6c1dfe 217 * rankdir=TB;
mbed_official 15:a81a8d6c1dfe 218 * msb [label="MSB", shape=none];
mbed_official 15:a81a8d6c1dfe 219 * lsb [label="LSB", shape=none];
mbed_official 15:a81a8d6c1dfe 220 * color="white";
mbed_official 15:a81a8d6c1dfe 221 * node [shape=none];
mbed_official 15:a81a8d6c1dfe 222 * reg_right [label=<
mbed_official 15:a81a8d6c1dfe 223 * <table cellspacing="0" cellpadding="2">
mbed_official 15:a81a8d6c1dfe 224 * <tr>
mbed_official 15:a81a8d6c1dfe 225 * <td>15</td>
mbed_official 15:a81a8d6c1dfe 226 * <td>14</td>
mbed_official 15:a81a8d6c1dfe 227 * <td>13</td>
mbed_official 15:a81a8d6c1dfe 228 * <td>12</td>
mbed_official 15:a81a8d6c1dfe 229 * <td>11</td>
mbed_official 15:a81a8d6c1dfe 230 * <td>10</td>
mbed_official 15:a81a8d6c1dfe 231 * <td port="msb">9</td>
mbed_official 15:a81a8d6c1dfe 232 * <td>8</td>
mbed_official 15:a81a8d6c1dfe 233 * <td>7</td>
mbed_official 15:a81a8d6c1dfe 234 * <td>6</td>
mbed_official 15:a81a8d6c1dfe 235 * <td>5</td>
mbed_official 15:a81a8d6c1dfe 236 * <td>4</td>
mbed_official 15:a81a8d6c1dfe 237 * <td>3</td>
mbed_official 15:a81a8d6c1dfe 238 * <td>2</td>
mbed_official 15:a81a8d6c1dfe 239 * <td>1</td>
mbed_official 15:a81a8d6c1dfe 240 * <td port="lsb">0</td>
mbed_official 15:a81a8d6c1dfe 241 * </tr>
mbed_official 15:a81a8d6c1dfe 242 * <tr>
mbed_official 15:a81a8d6c1dfe 243 * <td BGCOLOR="lightgray"></td>
mbed_official 15:a81a8d6c1dfe 244 * <td BGCOLOR="lightgray"></td>
mbed_official 15:a81a8d6c1dfe 245 * <td BGCOLOR="lightgray"></td>
mbed_official 15:a81a8d6c1dfe 246 * <td BGCOLOR="lightgray"></td>
mbed_official 15:a81a8d6c1dfe 247 * <td BGCOLOR="lightgray"></td>
mbed_official 15:a81a8d6c1dfe 248 * <td BGCOLOR="lightgray"></td>
mbed_official 15:a81a8d6c1dfe 249 * <td COLSPAN="10"> DATA[9:0] </td>
mbed_official 15:a81a8d6c1dfe 250 * </tr>
mbed_official 15:a81a8d6c1dfe 251 * </table>
mbed_official 15:a81a8d6c1dfe 252 * >];
mbed_official 15:a81a8d6c1dfe 253 * msb -> reg_right:msb;
mbed_official 15:a81a8d6c1dfe 254 * lsb -> reg_right:lsb:n;
mbed_official 15:a81a8d6c1dfe 255 * label = "Right adjusted.\n";
mbed_official 15:a81a8d6c1dfe 256 * graph [shape=none];
mbed_official 15:a81a8d6c1dfe 257 * }
mbed_official 15:a81a8d6c1dfe 258 * }
mbed_official 15:a81a8d6c1dfe 259 * \enddot
mbed_official 15:a81a8d6c1dfe 260 *
mbed_official 15:a81a8d6c1dfe 261 * \subsection asfdoc_sam0_dac_clk_sources Clock Sources
mbed_official 15:a81a8d6c1dfe 262 * The clock for the DAC interface (CLK_DAC) is generated by the Power Manager.
mbed_official 15:a81a8d6c1dfe 263 * This clock is turned on by default, and can be enabled and disabled in the
mbed_official 15:a81a8d6c1dfe 264 * Power Manager.
mbed_official 15:a81a8d6c1dfe 265 *
mbed_official 15:a81a8d6c1dfe 266 * Additionally, an asynchronous clock source (GCLK_DAC) is required.
mbed_official 15:a81a8d6c1dfe 267 * These clocks are normally disabled by default. The selected clock source
mbed_official 15:a81a8d6c1dfe 268 * must be enabled in the Power Manager before it can be used by the DAC.
mbed_official 15:a81a8d6c1dfe 269 * The DAC core operates asynchronously from the user interface and
mbed_official 15:a81a8d6c1dfe 270 * peripheral bus. As a consequence, the DAC needs two clock cycles of both
mbed_official 15:a81a8d6c1dfe 271 * CLK_DAC and GCLK_DAC to synchronize the values written to some of the
mbed_official 15:a81a8d6c1dfe 272 * control and data registers.
mbed_official 15:a81a8d6c1dfe 273 * The oscillator source for the GCLK_DAC clock is selected in the System
mbed_official 15:a81a8d6c1dfe 274 * Control Interface (SCIF).
mbed_official 15:a81a8d6c1dfe 275 *
mbed_official 15:a81a8d6c1dfe 276 * \section asfdoc_sam0_dac_special_considerations Special Considerations
mbed_official 15:a81a8d6c1dfe 277 *
mbed_official 15:a81a8d6c1dfe 278 * \subsection asfdoc_sam0_dac_special_considerations_output_buffer Output Driver
mbed_official 15:a81a8d6c1dfe 279 * The DAC can only do conversions in Active or Idle modes. However, if the
mbed_official 15:a81a8d6c1dfe 280 * output buffer is enabled it will draw current even if the system is in
mbed_official 15:a81a8d6c1dfe 281 * sleep mode. Therefore, always make sure that the output buffer is not
mbed_official 15:a81a8d6c1dfe 282 * enabled when it is not needed, to ensure minimum power consumption.
mbed_official 15:a81a8d6c1dfe 283 *
mbed_official 15:a81a8d6c1dfe 284 * \subsection asfdoc_sam0_dac_special_considerations_conversion_time Conversion Time
mbed_official 15:a81a8d6c1dfe 285 * DAC conversion time is approximately 2.85µs. The user must ensure that new
mbed_official 15:a81a8d6c1dfe 286 * data is not written to the DAC before the last conversion is complete.
mbed_official 15:a81a8d6c1dfe 287 * Conversions should be triggered by a periodic event from a Timer/Counter or
mbed_official 15:a81a8d6c1dfe 288 * another peripheral.
mbed_official 15:a81a8d6c1dfe 289 *
mbed_official 15:a81a8d6c1dfe 290 *
mbed_official 15:a81a8d6c1dfe 291 * \section asfdoc_sam0_dac_extra_info Extra Information
mbed_official 15:a81a8d6c1dfe 292 *
mbed_official 15:a81a8d6c1dfe 293 * For extra information, see \ref asfdoc_sam0_dac_extra. This includes:
mbed_official 15:a81a8d6c1dfe 294 * - \ref asfdoc_sam0_dac_extra_acronyms
mbed_official 15:a81a8d6c1dfe 295 * - \ref asfdoc_sam0_dac_extra_dependencies
mbed_official 15:a81a8d6c1dfe 296 * - \ref asfdoc_sam0_dac_extra_errata
mbed_official 15:a81a8d6c1dfe 297 * - \ref asfdoc_sam0_dac_extra_history
mbed_official 15:a81a8d6c1dfe 298 *
mbed_official 15:a81a8d6c1dfe 299 *
mbed_official 15:a81a8d6c1dfe 300 * \section asfdoc_sam0_dac_examples Examples
mbed_official 15:a81a8d6c1dfe 301 *
mbed_official 15:a81a8d6c1dfe 302 * For a list of examples related to this driver, see
mbed_official 15:a81a8d6c1dfe 303 * \ref asfdoc_sam0_dac_exqsg.
mbed_official 15:a81a8d6c1dfe 304 *
mbed_official 15:a81a8d6c1dfe 305 *
mbed_official 15:a81a8d6c1dfe 306 * \section asfdoc_sam0_dac_api_overview API Overview
mbed_official 15:a81a8d6c1dfe 307 * @{
mbed_official 15:a81a8d6c1dfe 308 */
mbed_official 15:a81a8d6c1dfe 309
mbed_official 15:a81a8d6c1dfe 310 #ifdef __cplusplus
mbed_official 15:a81a8d6c1dfe 311 extern "C" {
mbed_official 15:a81a8d6c1dfe 312 #endif
mbed_official 15:a81a8d6c1dfe 313
mbed_official 15:a81a8d6c1dfe 314 #include <compiler.h>
mbed_official 15:a81a8d6c1dfe 315 #include <clock.h>
mbed_official 15:a81a8d6c1dfe 316 #include <gclk.h>
mbed_official 15:a81a8d6c1dfe 317
mbed_official 15:a81a8d6c1dfe 318
mbed_official 15:a81a8d6c1dfe 319 /**
mbed_official 15:a81a8d6c1dfe 320 * \name DAC Status Flags
mbed_official 15:a81a8d6c1dfe 321 *
mbed_official 15:a81a8d6c1dfe 322 * DAC status flags, returned by \ref dac_get_status() and cleared by
mbed_official 15:a81a8d6c1dfe 323 * \ref dac_clear_status().
mbed_official 15:a81a8d6c1dfe 324 * @{
mbed_official 15:a81a8d6c1dfe 325 */
mbed_official 15:a81a8d6c1dfe 326
mbed_official 15:a81a8d6c1dfe 327 /** Data Buffer Empty Channel 0 - Set when data is transferred from DATABUF
mbed_official 15:a81a8d6c1dfe 328 * to DATA by a start conversion event and DATABUF is ready for new data.
mbed_official 15:a81a8d6c1dfe 329 */
mbed_official 15:a81a8d6c1dfe 330 #define DAC_STATUS_CHANNEL_0_EMPTY (1UL << 0)
mbed_official 15:a81a8d6c1dfe 331
mbed_official 15:a81a8d6c1dfe 332 /** Under-run Channel 0 - Set when a start conversion event occurs when
mbed_official 15:a81a8d6c1dfe 333 * DATABUF is empty.
mbed_official 15:a81a8d6c1dfe 334 */
mbed_official 15:a81a8d6c1dfe 335 #define DAC_STATUS_CHANNEL_0_UNDERRUN (1UL << 1)
mbed_official 15:a81a8d6c1dfe 336
mbed_official 15:a81a8d6c1dfe 337 /** @} */
mbed_official 15:a81a8d6c1dfe 338
mbed_official 15:a81a8d6c1dfe 339 /**
mbed_official 15:a81a8d6c1dfe 340 * \brief DAC reference voltage enum.
mbed_official 15:a81a8d6c1dfe 341 *
mbed_official 15:a81a8d6c1dfe 342 * Enum for the possible reference voltages for the DAC.
mbed_official 15:a81a8d6c1dfe 343 */
mbed_official 15:a81a8d6c1dfe 344 enum dac_reference {
mbed_official 15:a81a8d6c1dfe 345 /** 1V from the internal band-gap reference.*/
mbed_official 15:a81a8d6c1dfe 346 DAC_REFERENCE_INT1V = DAC_CTRLB_REFSEL(0),
mbed_official 15:a81a8d6c1dfe 347 /** Analog V<SUB>CC</SUB> as reference. */
mbed_official 15:a81a8d6c1dfe 348 DAC_REFERENCE_AVCC = DAC_CTRLB_REFSEL(1),
mbed_official 15:a81a8d6c1dfe 349 /** External reference on AREF. */
mbed_official 15:a81a8d6c1dfe 350 DAC_REFERENCE_AREF = DAC_CTRLB_REFSEL(2),
mbed_official 15:a81a8d6c1dfe 351 };
mbed_official 15:a81a8d6c1dfe 352
mbed_official 15:a81a8d6c1dfe 353 /**
mbed_official 15:a81a8d6c1dfe 354 * \brief DAC output selection enum.
mbed_official 15:a81a8d6c1dfe 355 *
mbed_official 15:a81a8d6c1dfe 356 * Enum for the DAC output selection.
mbed_official 15:a81a8d6c1dfe 357 */
mbed_official 15:a81a8d6c1dfe 358 enum dac_output {
mbed_official 15:a81a8d6c1dfe 359 /** DAC output to VOUT pin */
mbed_official 15:a81a8d6c1dfe 360 DAC_OUTPUT_EXTERNAL = DAC_CTRLB_EOEN,
mbed_official 15:a81a8d6c1dfe 361 /** DAC output as internal reference */
mbed_official 15:a81a8d6c1dfe 362 DAC_OUTPUT_INTERNAL = DAC_CTRLB_IOEN,
mbed_official 15:a81a8d6c1dfe 363 /** No output */
mbed_official 15:a81a8d6c1dfe 364 DAC_OUTPUT_NONE = 0,
mbed_official 15:a81a8d6c1dfe 365 };
mbed_official 15:a81a8d6c1dfe 366
mbed_official 15:a81a8d6c1dfe 367 /**
mbed_official 15:a81a8d6c1dfe 368 * \brief DAC channel selection enum.
mbed_official 15:a81a8d6c1dfe 369 *
mbed_official 15:a81a8d6c1dfe 370 * Enum for the DAC channel selection.
mbed_official 15:a81a8d6c1dfe 371 */
mbed_official 15:a81a8d6c1dfe 372 enum dac_channel {
mbed_official 15:a81a8d6c1dfe 373 /** DAC output channel 0. */
mbed_official 15:a81a8d6c1dfe 374 DAC_CHANNEL_0,
mbed_official 15:a81a8d6c1dfe 375 };
mbed_official 15:a81a8d6c1dfe 376
mbed_official 15:a81a8d6c1dfe 377 /**
mbed_official 15:a81a8d6c1dfe 378 * \brief DAC software device instance structure.
mbed_official 15:a81a8d6c1dfe 379 *
mbed_official 15:a81a8d6c1dfe 380 * DAC software instance structure, used to retain software state information
mbed_official 15:a81a8d6c1dfe 381 * of an associated hardware module instance.
mbed_official 15:a81a8d6c1dfe 382 *
mbed_official 15:a81a8d6c1dfe 383 * \note The fields of this structure should not be altered by the user
mbed_official 15:a81a8d6c1dfe 384 * application; they are reserved for module-internal use only.
mbed_official 15:a81a8d6c1dfe 385 */
mbed_official 15:a81a8d6c1dfe 386 struct dac_module {
mbed_official 15:a81a8d6c1dfe 387 #if !defined(__DOXYGEN__)
mbed_official 15:a81a8d6c1dfe 388 /** DAC hardware module. */
mbed_official 15:a81a8d6c1dfe 389 Dac *hw;
mbed_official 15:a81a8d6c1dfe 390 /** DAC output selection. */
mbed_official 15:a81a8d6c1dfe 391 enum dac_output output;
mbed_official 15:a81a8d6c1dfe 392 /** Reference selection. */
mbed_official 15:a81a8d6c1dfe 393 enum dac_reference reference;
mbed_official 15:a81a8d6c1dfe 394 /** DAC event selection. */
mbed_official 15:a81a8d6c1dfe 395 bool start_on_event;
mbed_official 15:a81a8d6c1dfe 396 # if DAC_CALLBACK_MODE == true
mbed_official 15:a81a8d6c1dfe 397 /** Pointer to buffer used for ADC results. */
mbed_official 15:a81a8d6c1dfe 398 volatile uint16_t *job_buffer;
mbed_official 15:a81a8d6c1dfe 399 /** Remaining number of conversions in current job. */
mbed_official 15:a81a8d6c1dfe 400 volatile uint16_t remaining_conversions;
mbed_official 15:a81a8d6c1dfe 401 /** Transferred number of conversions in current job. */
mbed_official 15:a81a8d6c1dfe 402 volatile uint16_t transferred_conversions;
mbed_official 15:a81a8d6c1dfe 403 /** DAC callback enable. */
mbed_official 15:a81a8d6c1dfe 404 bool callback_enable[DAC_CALLBACK_N];
mbed_official 15:a81a8d6c1dfe 405 /** DAC registered callback functions. */
mbed_official 15:a81a8d6c1dfe 406 dac_callback_t callback[DAC_CALLBACK_N];
mbed_official 15:a81a8d6c1dfe 407 /** Holds the status of the ongoing or last conversion job. */
mbed_official 15:a81a8d6c1dfe 408 volatile enum status_code job_status;
mbed_official 15:a81a8d6c1dfe 409 # endif
mbed_official 15:a81a8d6c1dfe 410 #endif
mbed_official 15:a81a8d6c1dfe 411 };
mbed_official 15:a81a8d6c1dfe 412
mbed_official 15:a81a8d6c1dfe 413 /**
mbed_official 15:a81a8d6c1dfe 414 * \brief DAC configuration structure.
mbed_official 15:a81a8d6c1dfe 415 *
mbed_official 15:a81a8d6c1dfe 416 * Configuration structure for a DAC instance. This structure should be
mbed_official 15:a81a8d6c1dfe 417 * initialized by the \ref dac_get_config_defaults()
mbed_official 15:a81a8d6c1dfe 418 * function before being modified by the user application.
mbed_official 15:a81a8d6c1dfe 419 */
mbed_official 15:a81a8d6c1dfe 420 struct dac_config {
mbed_official 15:a81a8d6c1dfe 421 /** Reference voltage. */
mbed_official 15:a81a8d6c1dfe 422 enum dac_reference reference;
mbed_official 15:a81a8d6c1dfe 423 /** Select DAC output. */
mbed_official 15:a81a8d6c1dfe 424 enum dac_output output;
mbed_official 15:a81a8d6c1dfe 425 /** Left adjusted data. */
mbed_official 15:a81a8d6c1dfe 426 bool left_adjust;
mbed_official 15:a81a8d6c1dfe 427 /** GCLK generator used to clock the peripheral. */
mbed_official 15:a81a8d6c1dfe 428 enum gclk_generator clock_source;
mbed_official 15:a81a8d6c1dfe 429 #ifdef FEATURE_DAC_DATABUF_WRITE_PROTECTION
mbed_official 15:a81a8d6c1dfe 430 /** Bypass DATABUF write protection. */
mbed_official 15:a81a8d6c1dfe 431 bool databuf_protection_bypass;
mbed_official 15:a81a8d6c1dfe 432 #endif
mbed_official 15:a81a8d6c1dfe 433 /** Voltage pump disable. */
mbed_official 15:a81a8d6c1dfe 434 bool voltage_pump_disable;
mbed_official 15:a81a8d6c1dfe 435 /**
mbed_official 15:a81a8d6c1dfe 436 * The DAC behaves as in normal mode when the chip enters STANDBY sleep
mbed_official 15:a81a8d6c1dfe 437 * mode.
mbed_official 15:a81a8d6c1dfe 438 */
mbed_official 15:a81a8d6c1dfe 439 bool run_in_standby;
mbed_official 15:a81a8d6c1dfe 440 #if (SAMC21)
mbed_official 15:a81a8d6c1dfe 441 /** Dither mode enable data. */
mbed_official 15:a81a8d6c1dfe 442 bool dither_mode;
mbed_official 15:a81a8d6c1dfe 443 #endif
mbed_official 15:a81a8d6c1dfe 444 };
mbed_official 15:a81a8d6c1dfe 445
mbed_official 15:a81a8d6c1dfe 446 /**
mbed_official 15:a81a8d6c1dfe 447 * \brief DAC event enable/disable structure.
mbed_official 15:a81a8d6c1dfe 448 *
mbed_official 15:a81a8d6c1dfe 449 * Event flags for the DAC module. This is used to enable and
mbed_official 15:a81a8d6c1dfe 450 * disable events via \ref dac_enable_events() and \ref dac_disable_events().
mbed_official 15:a81a8d6c1dfe 451 */
mbed_official 15:a81a8d6c1dfe 452 struct dac_events {
mbed_official 15:a81a8d6c1dfe 453 /** Start a new DAC conversion. */
mbed_official 15:a81a8d6c1dfe 454 bool on_event_start_conversion;
mbed_official 15:a81a8d6c1dfe 455 /** Enable event generation on data buffer empty. */
mbed_official 15:a81a8d6c1dfe 456 bool generate_event_on_buffer_empty;
mbed_official 15:a81a8d6c1dfe 457 #if (SAMC21)
mbed_official 15:a81a8d6c1dfe 458 /** Enable the falling edge of the input event for DAC1. */
mbed_official 15:a81a8d6c1dfe 459 bool generate_event_on_chan_falling_edge;
mbed_official 15:a81a8d6c1dfe 460 #endif
mbed_official 15:a81a8d6c1dfe 461 };
mbed_official 15:a81a8d6c1dfe 462
mbed_official 15:a81a8d6c1dfe 463 /**
mbed_official 15:a81a8d6c1dfe 464 * \brief DAC channel configuration structure
mbed_official 15:a81a8d6c1dfe 465 *
mbed_official 15:a81a8d6c1dfe 466 * Configuration for a DAC channel. This structure should be initialized by the
mbed_official 15:a81a8d6c1dfe 467 * \ref dac_chan_get_config_defaults() function before being modified by the
mbed_official 15:a81a8d6c1dfe 468 * user application.
mbed_official 15:a81a8d6c1dfe 469 */
mbed_official 15:a81a8d6c1dfe 470 struct dac_chan_config {
mbed_official 15:a81a8d6c1dfe 471 #if !defined(__DOXYGEN__)
mbed_official 15:a81a8d6c1dfe 472 /** Dummy value to ensure the struct has at least one member. */
mbed_official 15:a81a8d6c1dfe 473 uint8_t _dummy;
mbed_official 15:a81a8d6c1dfe 474 #endif
mbed_official 15:a81a8d6c1dfe 475 };
mbed_official 15:a81a8d6c1dfe 476
mbed_official 15:a81a8d6c1dfe 477 /**
mbed_official 15:a81a8d6c1dfe 478 * \name Configuration and Initialization (Channel)
mbed_official 15:a81a8d6c1dfe 479 * @{
mbed_official 15:a81a8d6c1dfe 480 */
mbed_official 15:a81a8d6c1dfe 481
mbed_official 15:a81a8d6c1dfe 482 void dac_chan_enable_output_buffer(
mbed_official 15:a81a8d6c1dfe 483 struct dac_module *const dev_inst,
mbed_official 15:a81a8d6c1dfe 484 const enum dac_channel channel);
mbed_official 15:a81a8d6c1dfe 485
mbed_official 15:a81a8d6c1dfe 486 void dac_chan_disable_output_buffer(
mbed_official 15:a81a8d6c1dfe 487 struct dac_module *const dev_inst,
mbed_official 15:a81a8d6c1dfe 488 const enum dac_channel channel);
mbed_official 15:a81a8d6c1dfe 489
mbed_official 15:a81a8d6c1dfe 490 /** @} */
mbed_official 15:a81a8d6c1dfe 491
mbed_official 15:a81a8d6c1dfe 492 /** @} */
mbed_official 15:a81a8d6c1dfe 493
mbed_official 15:a81a8d6c1dfe 494 /**
mbed_official 15:a81a8d6c1dfe 495 * \page asfdoc_sam0_dac_extra Extra Information for DAC Driver
mbed_official 15:a81a8d6c1dfe 496 *
mbed_official 15:a81a8d6c1dfe 497 * \section asfdoc_sam0_dac_extra_acronyms Acronyms
mbed_official 15:a81a8d6c1dfe 498 * The table below presents the acronyms used in this module:
mbed_official 15:a81a8d6c1dfe 499 *
mbed_official 15:a81a8d6c1dfe 500 * <table>
mbed_official 15:a81a8d6c1dfe 501 * <tr>
mbed_official 15:a81a8d6c1dfe 502 * <th>Acronym</th>
mbed_official 15:a81a8d6c1dfe 503 * <th>Description</th>
mbed_official 15:a81a8d6c1dfe 504 * </tr>
mbed_official 15:a81a8d6c1dfe 505 * <tr>
mbed_official 15:a81a8d6c1dfe 506 * <td>ADC</td>
mbed_official 15:a81a8d6c1dfe 507 * <td>Analog-to-Digital Converter</td>
mbed_official 15:a81a8d6c1dfe 508 * </tr>
mbed_official 15:a81a8d6c1dfe 509 * <tr>
mbed_official 15:a81a8d6c1dfe 510 * <td>AC</td>
mbed_official 15:a81a8d6c1dfe 511 * <td>Analog Comparator</td>
mbed_official 15:a81a8d6c1dfe 512 * </tr>
mbed_official 15:a81a8d6c1dfe 513 * <tr>
mbed_official 15:a81a8d6c1dfe 514 * <td>DAC</td>
mbed_official 15:a81a8d6c1dfe 515 * <td>Digital-to-Analog Converter</td>
mbed_official 15:a81a8d6c1dfe 516 * </tr>
mbed_official 15:a81a8d6c1dfe 517 * <tr>
mbed_official 15:a81a8d6c1dfe 518 * <td>LSB</td>
mbed_official 15:a81a8d6c1dfe 519 * <td>Least Significant Bit</td>
mbed_official 15:a81a8d6c1dfe 520 * </tr>
mbed_official 15:a81a8d6c1dfe 521 * <tr>
mbed_official 15:a81a8d6c1dfe 522 * <td>MSB</td>
mbed_official 15:a81a8d6c1dfe 523 * <td>Most Significant Bit</td>
mbed_official 15:a81a8d6c1dfe 524 * </tr>
mbed_official 15:a81a8d6c1dfe 525 * <tr>
mbed_official 15:a81a8d6c1dfe 526 * <td>DMA</td>
mbed_official 15:a81a8d6c1dfe 527 * <td>Direct Memory Access</td>
mbed_official 15:a81a8d6c1dfe 528 * </tr>
mbed_official 15:a81a8d6c1dfe 529 * </table>
mbed_official 15:a81a8d6c1dfe 530 *
mbed_official 15:a81a8d6c1dfe 531 *
mbed_official 15:a81a8d6c1dfe 532 * \section asfdoc_sam0_dac_extra_dependencies Dependencies
mbed_official 15:a81a8d6c1dfe 533 * This driver has the following dependencies:
mbed_official 15:a81a8d6c1dfe 534 *
mbed_official 15:a81a8d6c1dfe 535 * - \ref asfdoc_sam0_system_pinmux_group "System Pin Multiplexer Driver"
mbed_official 15:a81a8d6c1dfe 536 *
mbed_official 15:a81a8d6c1dfe 537 *
mbed_official 15:a81a8d6c1dfe 538 * \section asfdoc_sam0_dac_extra_errata Errata
mbed_official 15:a81a8d6c1dfe 539 * There are no errata related to this driver.
mbed_official 15:a81a8d6c1dfe 540 *
mbed_official 15:a81a8d6c1dfe 541 *
mbed_official 15:a81a8d6c1dfe 542 * \section asfdoc_sam0_dac_extra_history Module History
mbed_official 15:a81a8d6c1dfe 543 * An overview of the module history is presented in the table below, with
mbed_official 15:a81a8d6c1dfe 544 * details on the enhancements and fixes made to the module since its first
mbed_official 15:a81a8d6c1dfe 545 * release. The current version of this corresponds to the newest version in
mbed_official 15:a81a8d6c1dfe 546 * the table.
mbed_official 15:a81a8d6c1dfe 547 *
mbed_official 15:a81a8d6c1dfe 548 * <table>
mbed_official 15:a81a8d6c1dfe 549 * <tr>
mbed_official 15:a81a8d6c1dfe 550 * <th>Changelog</th>
mbed_official 15:a81a8d6c1dfe 551 * </tr>
mbed_official 15:a81a8d6c1dfe 552 * <tr>
mbed_official 15:a81a8d6c1dfe 553 * <td>Add configuration for using 14-bit hardware dithering (SAMC21 support)</td>
mbed_official 15:a81a8d6c1dfe 554 * </tr>
mbed_official 15:a81a8d6c1dfe 555 * <tr>
mbed_official 15:a81a8d6c1dfe 556 * <td>Added new configuration parameters \c databuf_protection_bypass,
mbed_official 15:a81a8d6c1dfe 557 * \c voltage_pump_disable. Added new callback functions
mbed_official 15:a81a8d6c1dfe 558 * \c dac_chan_write_buffer_wait,
mbed_official 15:a81a8d6c1dfe 559 * \c dac_chan_write_buffer_job, \c dac_chan_write_job,
mbed_official 15:a81a8d6c1dfe 560 * \c dac_get_job_status, \c dac_abort_job and new callback type
mbed_official 15:a81a8d6c1dfe 561 * \c DAC_CALLBACK_TRANSFER_COMPLETE for DAC conversion job</td>
mbed_official 15:a81a8d6c1dfe 562 * </tr>
mbed_official 15:a81a8d6c1dfe 563 * <tr>
mbed_official 15:a81a8d6c1dfe 564 * <td>Initial Release</td>
mbed_official 15:a81a8d6c1dfe 565 * </tr>
mbed_official 15:a81a8d6c1dfe 566 * </table>
mbed_official 15:a81a8d6c1dfe 567 */
mbed_official 15:a81a8d6c1dfe 568
mbed_official 15:a81a8d6c1dfe 569 /**
mbed_official 15:a81a8d6c1dfe 570 * \page asfdoc_sam0_dac_exqsg Examples for DAC Driver
mbed_official 15:a81a8d6c1dfe 571 *
mbed_official 15:a81a8d6c1dfe 572 * This is a list of the available Quick Start guides (QSGs) and example
mbed_official 15:a81a8d6c1dfe 573 * applications for \ref asfdoc_sam0_dac_group. QSGs are simple examples with
mbed_official 15:a81a8d6c1dfe 574 * step-by-step instructions to configure and use this driver in a selection of
mbed_official 15:a81a8d6c1dfe 575 * use cases. Note that a QSG can be compiled as a standalone application or be
mbed_official 15:a81a8d6c1dfe 576 * added to the user application.
mbed_official 15:a81a8d6c1dfe 577 *
mbed_official 15:a81a8d6c1dfe 578 * - \subpage asfdoc_sam0_dac_basic_use_case
mbed_official 15:a81a8d6c1dfe 579 * \if DAC_CALLBACK_MODE
mbed_official 15:a81a8d6c1dfe 580 * - \subpage asfdoc_sam0_dac_basic_use_case_callback
mbed_official 15:a81a8d6c1dfe 581 * \endif
mbed_official 15:a81a8d6c1dfe 582 * \if DAC_DMA_USE_MODE_SELECTION
mbed_official 15:a81a8d6c1dfe 583 * - \subpage asfdoc_sam0_adc_dma_use_case_dac_in_dma
mbed_official 15:a81a8d6c1dfe 584 * \endif
mbed_official 15:a81a8d6c1dfe 585 *
mbed_official 15:a81a8d6c1dfe 586 * \if DAC_DMA_USE_MODE_SELECTION
mbed_official 15:a81a8d6c1dfe 587 * \page asfdoc_sam0_adc_dma_use_case_dac_in_dma Quick Start Guide for Using DMA with ADC/DAC
mbed_official 15:a81a8d6c1dfe 588 * For this examples, see
mbed_official 15:a81a8d6c1dfe 589 * \ref asfdoc_sam0_adc_dma_use_case
mbed_official 15:a81a8d6c1dfe 590 * \endif
mbed_official 15:a81a8d6c1dfe 591 *
mbed_official 15:a81a8d6c1dfe 592 * \page asfdoc_sam0_dac_document_revision_history Document Revision History
mbed_official 15:a81a8d6c1dfe 593 *
mbed_official 15:a81a8d6c1dfe 594 * <table>
mbed_official 15:a81a8d6c1dfe 595 * <tr>
mbed_official 15:a81a8d6c1dfe 596 * <th>Doc. Rev.</td>
mbed_official 15:a81a8d6c1dfe 597 * <th>Date</td>
mbed_official 15:a81a8d6c1dfe 598 * <th>Comments</td>
mbed_official 15:a81a8d6c1dfe 599 * </tr>
mbed_official 15:a81a8d6c1dfe 600 * <tr>
mbed_official 15:a81a8d6c1dfe 601 * <td>42110E</td>
mbed_official 15:a81a8d6c1dfe 602 * <td>06/2015</td>
mbed_official 15:a81a8d6c1dfe 603 * <td>Add SAMC21 and SAMDAx support</td>
mbed_official 15:a81a8d6c1dfe 604 * </tr>
mbed_official 15:a81a8d6c1dfe 605 * <tr>
mbed_official 15:a81a8d6c1dfe 606 * <td>42110D</td>
mbed_official 15:a81a8d6c1dfe 607 * <td>12/2014</td>
mbed_official 15:a81a8d6c1dfe 608 * <td>Add SAMD10/D11 support</td>
mbed_official 15:a81a8d6c1dfe 609 * </tr>
mbed_official 15:a81a8d6c1dfe 610 * <tr>
mbed_official 15:a81a8d6c1dfe 611 * <td>42110C</td>
mbed_official 15:a81a8d6c1dfe 612 * <td>01/2014</td>
mbed_official 15:a81a8d6c1dfe 613 * <td>Add SAMD21 support</td>
mbed_official 15:a81a8d6c1dfe 614 * </tr>
mbed_official 15:a81a8d6c1dfe 615 * <tr>
mbed_official 15:a81a8d6c1dfe 616 * <td>42110B</td>
mbed_official 15:a81a8d6c1dfe 617 * <td>06/2013</td>
mbed_official 15:a81a8d6c1dfe 618 * <td>Added additional documentation on the event system. Corrected
mbed_official 15:a81a8d6c1dfe 619 * documentation typos.</td>
mbed_official 15:a81a8d6c1dfe 620 * </tr>
mbed_official 15:a81a8d6c1dfe 621 * <tr>
mbed_official 15:a81a8d6c1dfe 622 * <td>42110A</td>
mbed_official 15:a81a8d6c1dfe 623 * <td>06/2013</td>
mbed_official 15:a81a8d6c1dfe 624 * <td>Initial document release</td>
mbed_official 15:a81a8d6c1dfe 625 * </tr>
mbed_official 15:a81a8d6c1dfe 626 * </table>
mbed_official 15:a81a8d6c1dfe 627 */
mbed_official 15:a81a8d6c1dfe 628
mbed_official 15:a81a8d6c1dfe 629 #ifdef __cplusplus
mbed_official 15:a81a8d6c1dfe 630 }
mbed_official 15:a81a8d6c1dfe 631 #endif
mbed_official 15:a81a8d6c1dfe 632
mbed_official 15:a81a8d6c1dfe 633
mbed_official 15:a81a8d6c1dfe 634 #endif /* DAC_FEATURE_H_INCLUDED */
mbed_official 15:a81a8d6c1dfe 635