The official Mbed 2 C/C++ SDK provides the software platform and libraries to build your applications.

Dependents:   hello SerialTestv11 SerialTestv12 Sierpinski ... more

mbed 2

This is the mbed 2 library. If you'd like to learn about Mbed OS please see the mbed-os docs.

Committer:
AnnaBridge
Date:
Wed Feb 20 20:53:29 2019 +0000
Revision:
172:65be27845400
Parent:
171:3a7713b1edbc
mbed library release version 165

Who changed what in which revision?

UserRevisionLine numberNew contents of line
Kojto 111:4336505e4b1c 1 /**
Kojto 111:4336505e4b1c 2 * \file
Kojto 111:4336505e4b1c 3 *
Kojto 111:4336505e4b1c 4 * \brief SAM External Interrupt Driver
Kojto 111:4336505e4b1c 5 *
Kojto 111:4336505e4b1c 6 * Copyright (C) 2012-2015 Atmel Corporation. All rights reserved.
Kojto 111:4336505e4b1c 7 *
Kojto 111:4336505e4b1c 8 * \asf_license_start
Kojto 111:4336505e4b1c 9 *
Kojto 111:4336505e4b1c 10 * \page License
Kojto 111:4336505e4b1c 11 *
Kojto 111:4336505e4b1c 12 * Redistribution and use in source and binary forms, with or without
Kojto 111:4336505e4b1c 13 * modification, are permitted provided that the following conditions are met:
Kojto 111:4336505e4b1c 14 *
Kojto 111:4336505e4b1c 15 * 1. Redistributions of source code must retain the above copyright notice,
Kojto 111:4336505e4b1c 16 * this list of conditions and the following disclaimer.
Kojto 111:4336505e4b1c 17 *
Kojto 111:4336505e4b1c 18 * 2. Redistributions in binary form must reproduce the above copyright notice,
Kojto 111:4336505e4b1c 19 * this list of conditions and the following disclaimer in the documentation
Kojto 111:4336505e4b1c 20 * and/or other materials provided with the distribution.
Kojto 111:4336505e4b1c 21 *
Kojto 111:4336505e4b1c 22 * 3. The name of Atmel may not be used to endorse or promote products derived
Kojto 111:4336505e4b1c 23 * from this software without specific prior written permission.
Kojto 111:4336505e4b1c 24 *
Kojto 111:4336505e4b1c 25 * 4. This software may only be redistributed and used in connection with an
Kojto 111:4336505e4b1c 26 * Atmel microcontroller product.
Kojto 111:4336505e4b1c 27 *
Kojto 111:4336505e4b1c 28 * THIS SOFTWARE IS PROVIDED BY ATMEL "AS IS" AND ANY EXPRESS OR IMPLIED
Kojto 111:4336505e4b1c 29 * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
Kojto 111:4336505e4b1c 30 * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT ARE
Kojto 111:4336505e4b1c 31 * EXPRESSLY AND SPECIFICALLY DISCLAIMED. IN NO EVENT SHALL ATMEL BE LIABLE FOR
Kojto 111:4336505e4b1c 32 * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
Kojto 111:4336505e4b1c 33 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
Kojto 111:4336505e4b1c 34 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
Kojto 111:4336505e4b1c 35 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
Kojto 111:4336505e4b1c 36 * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
Kojto 111:4336505e4b1c 37 * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
Kojto 111:4336505e4b1c 38 * POSSIBILITY OF SUCH DAMAGE.
Kojto 111:4336505e4b1c 39 *
Kojto 111:4336505e4b1c 40 * \asf_license_stop
Kojto 111:4336505e4b1c 41 *
Kojto 111:4336505e4b1c 42 */
Kojto 111:4336505e4b1c 43 /*
Kojto 111:4336505e4b1c 44 * Support and FAQ: visit <a href="http://www.atmel.com/design-support/">Atmel Support</a>
Kojto 111:4336505e4b1c 45 */
Kojto 111:4336505e4b1c 46 #ifndef EXTINT_H_INCLUDED
Kojto 111:4336505e4b1c 47 #define EXTINT_H_INCLUDED
Kojto 111:4336505e4b1c 48
Kojto 111:4336505e4b1c 49 /**
Kojto 111:4336505e4b1c 50 * \defgroup asfdoc_sam0_extint_group SAM External Interrupt Driver (EXTINT)
Kojto 111:4336505e4b1c 51 *
Kojto 111:4336505e4b1c 52 * This driver for Atmel&reg; | SMART SAM devices provides an interface for the configuration
Kojto 111:4336505e4b1c 53 * and management of external interrupts generated by the physical device pins,
Kojto 111:4336505e4b1c 54 * including edge detection. The following driver API modes are covered by this
Kojto 111:4336505e4b1c 55 * manual:
Kojto 111:4336505e4b1c 56 *
Kojto 111:4336505e4b1c 57 * - Polled APIs
Kojto 111:4336505e4b1c 58 * \if EXTINT_CALLBACK_MODE
Kojto 111:4336505e4b1c 59 * - Callback APIs
Kojto 111:4336505e4b1c 60 * \endif
Kojto 111:4336505e4b1c 61 *
Kojto 111:4336505e4b1c 62 * The following peripherals are used by this module:
Kojto 111:4336505e4b1c 63 * - EIC (External Interrupt Controller)
Kojto 111:4336505e4b1c 64 *
Kojto 111:4336505e4b1c 65 * The following devices can use this module:
Kojto 111:4336505e4b1c 66 * - Atmel | SMART SAM D20/D21
Kojto 111:4336505e4b1c 67 * - Atmel | SMART SAM R21
Kojto 111:4336505e4b1c 68 * - Atmel | SMART SAM D10/D11
Kojto 111:4336505e4b1c 69 * - Atmel | SMART SAM L21
Kojto 111:4336505e4b1c 70 * - Atmel | SMART SAM DAx
Kojto 111:4336505e4b1c 71 * - Atmel | SMART SAM C20/C21
Kojto 111:4336505e4b1c 72 *
Kojto 111:4336505e4b1c 73 * The outline of this documentation is as follows:
Kojto 111:4336505e4b1c 74 * - \ref asfdoc_sam0_extint_prerequisites
Kojto 111:4336505e4b1c 75 * - \ref asfdoc_sam0_extint_module_overview
Kojto 111:4336505e4b1c 76 * - \ref asfdoc_sam0_extint_special_considerations
Kojto 111:4336505e4b1c 77 * - \ref asfdoc_sam0_extint_extra_info
Kojto 111:4336505e4b1c 78 * - \ref asfdoc_sam0_extint_examples
Kojto 111:4336505e4b1c 79 * - \ref asfdoc_sam0_extint_api_overview
Kojto 111:4336505e4b1c 80 *
Kojto 111:4336505e4b1c 81 *
Kojto 111:4336505e4b1c 82 * \section asfdoc_sam0_extint_prerequisites Prerequisites
Kojto 111:4336505e4b1c 83 *
Kojto 111:4336505e4b1c 84 * There are no prerequisites for this module.
Kojto 111:4336505e4b1c 85 *
Kojto 111:4336505e4b1c 86 *
Kojto 111:4336505e4b1c 87 * \section asfdoc_sam0_extint_module_overview Module Overview
Kojto 111:4336505e4b1c 88 *
Kojto 111:4336505e4b1c 89 * The External Interrupt (EXTINT) module provides a method of asynchronously
Kojto 111:4336505e4b1c 90 * detecting rising edge, falling edge or specific level detection on individual
Kojto 111:4336505e4b1c 91 * I/O pins of a device. This detection can then be used to trigger a software
Kojto 111:4336505e4b1c 92 * interrupt or event, or polled for later use if required. External interrupts
Kojto 111:4336505e4b1c 93 * can also optionally be used to automatically wake up the device from sleep
Kojto 111:4336505e4b1c 94 * mode, allowing the device to conserve power while still being able to react
Kojto 111:4336505e4b1c 95 * to an external stimulus in a timely manner.
Kojto 111:4336505e4b1c 96 *
Kojto 111:4336505e4b1c 97 * \subsection asfdoc_sam0_extint_logical_channels Logical Channels
Kojto 111:4336505e4b1c 98 * The External Interrupt module contains a number of logical channels, each of
Kojto 111:4336505e4b1c 99 * which is capable of being individually configured for a given pin routing,
Kojto 111:4336505e4b1c 100 * detection mode, and filtering/wake up characteristics.
Kojto 111:4336505e4b1c 101 *
Kojto 111:4336505e4b1c 102 * Each individual logical external interrupt channel may be routed to a single
Kojto 111:4336505e4b1c 103 * physical device I/O pin in order to detect a particular edge or level of the
Kojto 111:4336505e4b1c 104 * incoming signal.
Kojto 111:4336505e4b1c 105 *
Kojto 111:4336505e4b1c 106 * \subsection asfdoc_sam0_extint_module_overview_nmi_chanel NMI Channels
Kojto 111:4336505e4b1c 107 *
Kojto 111:4336505e4b1c 108 * One or more Non Maskable Interrupt (NMI) channels are provided within each
Kojto 111:4336505e4b1c 109 * physical External Interrupt Controller module, allowing a single physical pin
Kojto 111:4336505e4b1c 110 * of the device to fire a single NMI interrupt in response to a particular
Kojto 111:4336505e4b1c 111 * edge or level stimulus. A NMI cannot, as the name suggests, be disabled in
Kojto 111:4336505e4b1c 112 * firmware and will take precedence over any in-progress interrupt sources.
Kojto 111:4336505e4b1c 113 *
Kojto 111:4336505e4b1c 114 * NMIs can be used to implement critical device features such as forced
Kojto 111:4336505e4b1c 115 * software reset or other functionality where the action should be executed in
Kojto 111:4336505e4b1c 116 * preference to all other running code with a minimum amount of latency.
Kojto 111:4336505e4b1c 117 *
Kojto 111:4336505e4b1c 118 * \subsection asfdoc_sam0_extint_module_overview_filtering Input Filtering and Detection
Kojto 111:4336505e4b1c 119 *
Kojto 111:4336505e4b1c 120 * To reduce the possibility of noise or other transient signals causing
Kojto 111:4336505e4b1c 121 * unwanted device wake-ups, interrupts and/or events via an external interrupt
Kojto 111:4336505e4b1c 122 * channel, a hardware signal filter can be enabled on individual channels. This
Kojto 111:4336505e4b1c 123 * filter provides a Majority-of-Three voter filter on the incoming signal, so
Kojto 111:4336505e4b1c 124 * that the input state is considered to be the majority vote of three
Kojto 111:4336505e4b1c 125 * subsequent samples of the pin input buffer. The possible sampled input and
Kojto 111:4336505e4b1c 126 * resulting filtered output when the filter is enabled is shown in
Kojto 111:4336505e4b1c 127 * \ref asfdoc_sam0_extint_filter_table "the table below".
Kojto 111:4336505e4b1c 128 *
Kojto 111:4336505e4b1c 129 * \anchor asfdoc_sam0_extint_filter_table
Kojto 111:4336505e4b1c 130 * <table>
Kojto 111:4336505e4b1c 131 * <caption>Sampled Input and Rresulting Filtered Output</caption>
Kojto 111:4336505e4b1c 132 * <tr>
Kojto 111:4336505e4b1c 133 * <th>Input Sample 1</th>
Kojto 111:4336505e4b1c 134 * <th>Input Sample 2</th>
Kojto 111:4336505e4b1c 135 * <th>Input Sample 3</th>
Kojto 111:4336505e4b1c 136 * <th>Filtered Output</th>
Kojto 111:4336505e4b1c 137 * </tr>
Kojto 111:4336505e4b1c 138 * <tr>
Kojto 111:4336505e4b1c 139 * <td>0</td> <td>0</td> <td>0</td> <td>0</td>
Kojto 111:4336505e4b1c 140 * </tr>
Kojto 111:4336505e4b1c 141 * <tr>
Kojto 111:4336505e4b1c 142 * <td>0</td> <td>0</td> <td>1</td> <td>0</td>
Kojto 111:4336505e4b1c 143 * </tr>
Kojto 111:4336505e4b1c 144 * <tr>
Kojto 111:4336505e4b1c 145 * <td>0</td> <td>1</td> <td>0</td> <td>0</td>
Kojto 111:4336505e4b1c 146 * </tr>
Kojto 111:4336505e4b1c 147 * <tr>
Kojto 111:4336505e4b1c 148 * <td>0</td> <td>1</td> <td>1</td> <td>1</td>
Kojto 111:4336505e4b1c 149 * </tr>
Kojto 111:4336505e4b1c 150 * <tr>
Kojto 111:4336505e4b1c 151 * <td>1</td> <td>0</td> <td>0</td> <td>0</td>
Kojto 111:4336505e4b1c 152 * </tr>
Kojto 111:4336505e4b1c 153 * <tr>
Kojto 111:4336505e4b1c 154 * <td>1</td> <td>0</td> <td>1</td> <td>1</td>
Kojto 111:4336505e4b1c 155 * </tr>
Kojto 111:4336505e4b1c 156 * <tr>
Kojto 111:4336505e4b1c 157 * <td>1</td> <td>1</td> <td>0</td> <td>1</td>
Kojto 111:4336505e4b1c 158 * </tr>
Kojto 111:4336505e4b1c 159 * <tr>
Kojto 111:4336505e4b1c 160 * <td>1</td> <td>1</td> <td>1</td> <td>1</td>
Kojto 111:4336505e4b1c 161 * </tr>
Kojto 111:4336505e4b1c 162 * </table>
Kojto 111:4336505e4b1c 163 *
Kojto 111:4336505e4b1c 164 * \subsection asfdoc_sam0_extint_module_overview_events Events and Interrupts
Kojto 111:4336505e4b1c 165 *
Kojto 111:4336505e4b1c 166 * Channel detection states may be polled inside the application for synchronous
Kojto 111:4336505e4b1c 167 * detection, or events and interrupts may be used for asynchronous behavior.
Kojto 111:4336505e4b1c 168 * Each channel can be configured to give an asynchronous hardware event (which
Kojto 111:4336505e4b1c 169 * may in turn trigger actions in other hardware modules) or an asynchronous
Kojto 111:4336505e4b1c 170 * software interrupt.
Kojto 111:4336505e4b1c 171 *
Kojto 111:4336505e4b1c 172 * \note The connection of events between modules requires the use of the
Kojto 111:4336505e4b1c 173 * \ref asfdoc_sam0_events_group "SAM Event System Driver (EVENTS)"
Kojto 111:4336505e4b1c 174 * to route output event of one module to the input event of another.
Kojto 111:4336505e4b1c 175 * For more information on event routing, refer to the event driver
Kojto 111:4336505e4b1c 176 * documentation.
Kojto 111:4336505e4b1c 177 *
Kojto 111:4336505e4b1c 178 * \subsection asfdoc_sam0_extint_module_overview_physical Physical Connection
Kojto 111:4336505e4b1c 179 *
Kojto 111:4336505e4b1c 180 * \ref asfdoc_sam0_extint_int_connections "The diagram below" shows how this
Kojto 111:4336505e4b1c 181 * module is interconnected within the device.
Kojto 111:4336505e4b1c 182 *
Kojto 111:4336505e4b1c 183 * \anchor asfdoc_sam0_extint_int_connections
Kojto 111:4336505e4b1c 184 * \dot
Kojto 111:4336505e4b1c 185 * digraph overview {
Kojto 111:4336505e4b1c 186 * node [label="Port Pad" shape=square] pad;
Kojto 111:4336505e4b1c 187 *
Kojto 111:4336505e4b1c 188 * subgraph driver {
Kojto 111:4336505e4b1c 189 * node [label="Peripheral MUX" shape=trapezium] pinmux;
Kojto 111:4336505e4b1c 190 * node [label="EIC Module" shape=ellipse] eic;
Kojto 111:4336505e4b1c 191 * node [label="Other Peripheral Modules" shape=ellipse style=filled fillcolor=lightgray] peripherals;
Kojto 111:4336505e4b1c 192 * }
Kojto 111:4336505e4b1c 193 *
Kojto 111:4336505e4b1c 194 * pinmux -> eic;
Kojto 111:4336505e4b1c 195 * pad -> pinmux;
Kojto 111:4336505e4b1c 196 * pinmux -> peripherals;
Kojto 111:4336505e4b1c 197 * }
Kojto 111:4336505e4b1c 198 * \enddot
Kojto 111:4336505e4b1c 199 *
Kojto 111:4336505e4b1c 200 * \section asfdoc_sam0_extint_special_considerations Special Considerations
Kojto 111:4336505e4b1c 201 *
Kojto 111:4336505e4b1c 202 * Not all devices support disabling of the NMI channel(s) detection mode - see
Kojto 111:4336505e4b1c 203 * your device datasheet.
Kojto 111:4336505e4b1c 204 *
Kojto 111:4336505e4b1c 205 *
Kojto 111:4336505e4b1c 206 * \section asfdoc_sam0_extint_extra_info Extra Information
Kojto 111:4336505e4b1c 207 *
Kojto 111:4336505e4b1c 208 * For extra information, see \ref asfdoc_sam0_extint_extra. This includes:
Kojto 111:4336505e4b1c 209 * - \ref asfdoc_sam0_extint_extra_acronyms
Kojto 111:4336505e4b1c 210 * - \ref asfdoc_sam0_extint_extra_dependencies
Kojto 111:4336505e4b1c 211 * - \ref asfdoc_sam0_extint_extra_errata
Kojto 111:4336505e4b1c 212 * - \ref asfdoc_sam0_extint_extra_history
Kojto 111:4336505e4b1c 213 *
Kojto 111:4336505e4b1c 214 *
Kojto 111:4336505e4b1c 215 * \section asfdoc_sam0_extint_examples Examples
Kojto 111:4336505e4b1c 216 *
Kojto 111:4336505e4b1c 217 * For a list of examples related to this driver, see
Kojto 111:4336505e4b1c 218 * \ref asfdoc_sam0_extint_exqsg.
Kojto 111:4336505e4b1c 219 *
Kojto 111:4336505e4b1c 220 *
Kojto 111:4336505e4b1c 221 * \section asfdoc_sam0_extint_api_overview API Overview
Kojto 111:4336505e4b1c 222 * @{
Kojto 111:4336505e4b1c 223 */
Kojto 111:4336505e4b1c 224
Kojto 111:4336505e4b1c 225 #include <compiler.h>
Kojto 111:4336505e4b1c 226 #include <pinmux.h>
Kojto 111:4336505e4b1c 227
Kojto 111:4336505e4b1c 228 #ifdef __cplusplus
Kojto 111:4336505e4b1c 229 extern "C" {
Kojto 111:4336505e4b1c 230 #endif
Kojto 111:4336505e4b1c 231
Kojto 111:4336505e4b1c 232 /**
Kojto 111:4336505e4b1c 233 * \brief External interrupt edge detection configuration enum.
Kojto 111:4336505e4b1c 234 *
Kojto 111:4336505e4b1c 235 * Enum for the possible signal edge detection modes of the External
Kojto 111:4336505e4b1c 236 * Interrupt Controller module.
Kojto 111:4336505e4b1c 237 */
Kojto 111:4336505e4b1c 238 enum extint_detect {
Kojto 111:4336505e4b1c 239 /** No edge detection. Not allowed as a NMI detection mode on some
Kojto 111:4336505e4b1c 240 * devices. */
Kojto 111:4336505e4b1c 241 EXTINT_DETECT_NONE = 0,
Kojto 111:4336505e4b1c 242 /** Detect rising signal edges. */
Kojto 111:4336505e4b1c 243 EXTINT_DETECT_RISING = 1,
Kojto 111:4336505e4b1c 244 /** Detect falling signal edges. */
Kojto 111:4336505e4b1c 245 EXTINT_DETECT_FALLING = 2,
Kojto 111:4336505e4b1c 246 /** Detect both signal edges. */
Kojto 111:4336505e4b1c 247 EXTINT_DETECT_BOTH = 3,
Kojto 111:4336505e4b1c 248 /** Detect high signal levels. */
Kojto 111:4336505e4b1c 249 EXTINT_DETECT_HIGH = 4,
Kojto 111:4336505e4b1c 250 /** Detect low signal levels. */
Kojto 111:4336505e4b1c 251 EXTINT_DETECT_LOW = 5,
Kojto 111:4336505e4b1c 252 };
Kojto 111:4336505e4b1c 253
Kojto 111:4336505e4b1c 254 /**
Kojto 111:4336505e4b1c 255 * \brief External interrupt internal pull configuration enum.
Kojto 111:4336505e4b1c 256 *
Kojto 111:4336505e4b1c 257 * Enum for the possible pin internal pull configurations.
Kojto 111:4336505e4b1c 258 *
Kojto 111:4336505e4b1c 259 * \note Disabling the internal pull resistor is not recommended if the driver
Kojto 111:4336505e4b1c 260 * is used in interrupt (callback) mode, due the possibility of floating
Kojto 111:4336505e4b1c 261 * inputs generating continuous interrupts.
Kojto 111:4336505e4b1c 262 */
Kojto 111:4336505e4b1c 263 enum extint_pull {
Kojto 111:4336505e4b1c 264 /** Internal pull-up resistor is enabled on the pin. */
Kojto 111:4336505e4b1c 265 EXTINT_PULL_UP = SYSTEM_PINMUX_PIN_PULL_UP,
Kojto 111:4336505e4b1c 266 /** Internal pull-down resistor is enabled on the pin. */
Kojto 111:4336505e4b1c 267 EXTINT_PULL_DOWN = SYSTEM_PINMUX_PIN_PULL_DOWN,
Kojto 111:4336505e4b1c 268 /** Internal pull resistor is disconnected from the pin. */
Kojto 111:4336505e4b1c 269 EXTINT_PULL_NONE = SYSTEM_PINMUX_PIN_PULL_NONE,
Kojto 111:4336505e4b1c 270 };
Kojto 111:4336505e4b1c 271
Kojto 111:4336505e4b1c 272 /** The EIC is clocked by GCLK_EIC. */
Kojto 111:4336505e4b1c 273 #define EXTINT_CLK_GCLK 0
Kojto 111:4336505e4b1c 274 /** The EIC is clocked by CLK_ULP32K. */
Kojto 111:4336505e4b1c 275 #define EXTINT_CLK_ULP32K 1
Kojto 111:4336505e4b1c 276
Kojto 111:4336505e4b1c 277 /**
Kojto 111:4336505e4b1c 278 * \brief External Interrupt Controller channel configuration structure.
Kojto 111:4336505e4b1c 279 *
Kojto 111:4336505e4b1c 280 * Configuration structure for the edge detection mode of an external
Kojto 111:4336505e4b1c 281 * interrupt channel.
Kojto 111:4336505e4b1c 282 */
Kojto 111:4336505e4b1c 283 struct extint_chan_conf {
Kojto 111:4336505e4b1c 284 /** GPIO pin the NMI should be connected to. */
Kojto 111:4336505e4b1c 285 uint32_t gpio_pin;
Kojto 111:4336505e4b1c 286 /** MUX position the GPIO pin should be configured to. */
Kojto 111:4336505e4b1c 287 uint32_t gpio_pin_mux;
Kojto 111:4336505e4b1c 288 /** Internal pull to enable on the input pin. */
Kojto 111:4336505e4b1c 289 enum extint_pull gpio_pin_pull;
Kojto 111:4336505e4b1c 290 #if (SAML21) || (SAMC20) || (SAMC21)
Kojto 111:4336505e4b1c 291 /** Enable asynchronous edge detection. */
Kojto 111:4336505e4b1c 292 bool enable_async_edge_detection;
Kojto 111:4336505e4b1c 293 #else
Kojto 111:4336505e4b1c 294 /** Wake up the device if the channel interrupt fires during sleep mode. */
Kojto 111:4336505e4b1c 295 bool wake_if_sleeping;
Kojto 111:4336505e4b1c 296 #endif
Kojto 111:4336505e4b1c 297 /** Filter the raw input signal to prevent noise from triggering an
Kojto 111:4336505e4b1c 298 * interrupt accidentally, using a 3 sample majority filter. */
Kojto 111:4336505e4b1c 299 bool filter_input_signal;
Kojto 111:4336505e4b1c 300 /** Edge detection mode to use. */
Kojto 111:4336505e4b1c 301 enum extint_detect detection_criteria;
Kojto 111:4336505e4b1c 302 };
Kojto 111:4336505e4b1c 303
Kojto 111:4336505e4b1c 304 /**
Kojto 111:4336505e4b1c 305 * \brief External Interrupt event enable/disable structure.
Kojto 111:4336505e4b1c 306 *
Kojto 111:4336505e4b1c 307 * Event flags for the \ref extint_enable_events() and
Kojto 111:4336505e4b1c 308 * \ref extint_disable_events().
Kojto 111:4336505e4b1c 309 */
Kojto 111:4336505e4b1c 310 struct extint_events {
Kojto 111:4336505e4b1c 311 /** If \c true, an event will be generated when an external interrupt
Kojto 111:4336505e4b1c 312 * channel detection state changes. */
Kojto 111:4336505e4b1c 313 bool generate_event_on_detect[32 * EIC_INST_NUM];
Kojto 111:4336505e4b1c 314 };
Kojto 111:4336505e4b1c 315
Kojto 111:4336505e4b1c 316 /**
Kojto 111:4336505e4b1c 317 * \brief External Interrupt Controller NMI configuration structure.
Kojto 111:4336505e4b1c 318 *
Kojto 111:4336505e4b1c 319 * Configuration structure for the edge detection mode of an external
Kojto 111:4336505e4b1c 320 * interrupt NMI channel.
Kojto 111:4336505e4b1c 321 */
Kojto 111:4336505e4b1c 322 struct extint_nmi_conf {
Kojto 111:4336505e4b1c 323 /** GPIO pin the NMI should be connected to. */
Kojto 111:4336505e4b1c 324 uint32_t gpio_pin;
Kojto 111:4336505e4b1c 325 /** MUX position the GPIO pin should be configured to. */
Kojto 111:4336505e4b1c 326 uint32_t gpio_pin_mux;
Kojto 111:4336505e4b1c 327 /** Internal pull to enable on the input pin. */
Kojto 111:4336505e4b1c 328 enum extint_pull gpio_pin_pull;
Kojto 111:4336505e4b1c 329 /** Filter the raw input signal to prevent noise from triggering an
Kojto 111:4336505e4b1c 330 * interrupt accidentally, using a 3 sample majority filter. */
Kojto 111:4336505e4b1c 331 bool filter_input_signal;
Kojto 111:4336505e4b1c 332 /** Edge detection mode to use. Not all devices support all possible
Kojto 111:4336505e4b1c 333 * detection modes for NMIs.
Kojto 111:4336505e4b1c 334 */
Kojto 111:4336505e4b1c 335 enum extint_detect detection_criteria;
Kojto 111:4336505e4b1c 336 #if (SAML21) || (SAMC20) || (SAMC21)
Kojto 111:4336505e4b1c 337 /** Enable asynchronous edge detection. */
Kojto 111:4336505e4b1c 338 bool enable_async_edge_detection;
Kojto 111:4336505e4b1c 339 #endif
Kojto 111:4336505e4b1c 340 };
Kojto 111:4336505e4b1c 341
Kojto 111:4336505e4b1c 342 #if EXTINT_CALLBACK_MODE == true
Kojto 111:4336505e4b1c 343 /** Type definition for an EXTINT module callback function. */
Kojto 111:4336505e4b1c 344 typedef void (*extint_callback_t)(void);
Kojto 111:4336505e4b1c 345
Kojto 111:4336505e4b1c 346 #ifndef EIC_NUMBER_OF_INTERRUPTS
Kojto 111:4336505e4b1c 347 # define EIC_NUMBER_OF_INTERRUPTS 16
Kojto 111:4336505e4b1c 348 #endif
Kojto 111:4336505e4b1c 349 #endif
Kojto 111:4336505e4b1c 350
Kojto 111:4336505e4b1c 351 #if !defined(__DOXYGEN__)
Kojto 111:4336505e4b1c 352 /** \internal
Kojto 111:4336505e4b1c 353 * Internal EXTINT module device instance structure definition.
Kojto 111:4336505e4b1c 354 */
Kojto 111:4336505e4b1c 355 struct _extint_module {
Kojto 111:4336505e4b1c 356 # if EXTINT_CALLBACK_MODE == true
Kojto 111:4336505e4b1c 357 /** Asynchronous channel callback table, for user-registered handlers. */
Kojto 111:4336505e4b1c 358 extint_callback_t callbacks[EIC_NUMBER_OF_INTERRUPTS];
Kojto 111:4336505e4b1c 359 # else
Kojto 111:4336505e4b1c 360 /** Dummy value to ensure the struct has at least one member. */
Kojto 111:4336505e4b1c 361 uint8_t _dummy;
Kojto 111:4336505e4b1c 362 # endif
Kojto 111:4336505e4b1c 363 };
Kojto 111:4336505e4b1c 364
Kojto 111:4336505e4b1c 365 /**
Kojto 111:4336505e4b1c 366 * \brief Retrieves the base EIC module address from a given channel number.
Kojto 111:4336505e4b1c 367 *
Kojto 111:4336505e4b1c 368 * Retrieves the base address of a EIC hardware module associated with the
Kojto 111:4336505e4b1c 369 * given external interrupt channel.
Kojto 111:4336505e4b1c 370 *
Kojto 111:4336505e4b1c 371 * \param[in] channel External interrupt channel index to convert
Kojto 111:4336505e4b1c 372 *
Kojto 111:4336505e4b1c 373 * \return Base address of the associated EIC module.
Kojto 111:4336505e4b1c 374 */
Kojto 111:4336505e4b1c 375 static inline Eic * _extint_get_eic_from_channel(
Kojto 111:4336505e4b1c 376 const uint8_t channel)
Kojto 111:4336505e4b1c 377 {
Kojto 111:4336505e4b1c 378 uint8_t eic_index = (channel / 32);
Kojto 111:4336505e4b1c 379
Kojto 111:4336505e4b1c 380 if (eic_index < EIC_INST_NUM) {
Kojto 111:4336505e4b1c 381 /* Array of available EICs. */
Kojto 111:4336505e4b1c 382 Eic *const eics[EIC_INST_NUM] = EIC_INSTS;
Kojto 111:4336505e4b1c 383
Kojto 111:4336505e4b1c 384 return eics[eic_index];
Kojto 111:4336505e4b1c 385 } else {
Kojto 111:4336505e4b1c 386 Assert(false);
Kojto 111:4336505e4b1c 387 return NULL;
Kojto 111:4336505e4b1c 388 }
Kojto 111:4336505e4b1c 389 }
Kojto 111:4336505e4b1c 390
Kojto 111:4336505e4b1c 391 /**
Kojto 111:4336505e4b1c 392 * \brief Retrieves the base EIC module address from a given NMI channel number.
Kojto 111:4336505e4b1c 393 *
Kojto 111:4336505e4b1c 394 * Retrieves the base address of a EIC hardware module associated with the
Kojto 111:4336505e4b1c 395 * given non-maskable external interrupt channel.
Kojto 111:4336505e4b1c 396 *
Kojto 111:4336505e4b1c 397 * \param[in] nmi_channel Non-Maskable interrupt channel index to convert
Kojto 111:4336505e4b1c 398 *
Kojto 111:4336505e4b1c 399 * \return Base address of the associated EIC module.
Kojto 111:4336505e4b1c 400 */
Kojto 111:4336505e4b1c 401 static inline Eic * _extint_get_eic_from_nmi(
Kojto 111:4336505e4b1c 402 const uint8_t nmi_channel)
Kojto 111:4336505e4b1c 403 {
Kojto 111:4336505e4b1c 404 uint8_t eic_index = nmi_channel;
Kojto 111:4336505e4b1c 405
Kojto 111:4336505e4b1c 406 if (eic_index < EIC_INST_NUM) {
Kojto 111:4336505e4b1c 407 /* Array of available EICs. */
Kojto 111:4336505e4b1c 408 Eic *const eics[EIC_INST_NUM] = EIC_INSTS;
Kojto 111:4336505e4b1c 409
Kojto 111:4336505e4b1c 410 return eics[eic_index];
Kojto 111:4336505e4b1c 411 } else {
Kojto 111:4336505e4b1c 412 Assert(false);
Kojto 111:4336505e4b1c 413 return NULL;
Kojto 111:4336505e4b1c 414 }
Kojto 111:4336505e4b1c 415 }
Kojto 111:4336505e4b1c 416 #endif
Kojto 111:4336505e4b1c 417
Kojto 111:4336505e4b1c 418 /** \name Event Management
Kojto 111:4336505e4b1c 419 * @{
Kojto 111:4336505e4b1c 420 */
Kojto 111:4336505e4b1c 421
Kojto 111:4336505e4b1c 422 void extint_enable_events(
Kojto 111:4336505e4b1c 423 struct extint_events *const events);
Kojto 111:4336505e4b1c 424
Kojto 111:4336505e4b1c 425 void extint_disable_events(
Kojto 111:4336505e4b1c 426 struct extint_events *const events);
Kojto 111:4336505e4b1c 427
Kojto 111:4336505e4b1c 428 /** @} */
Kojto 111:4336505e4b1c 429
Kojto 111:4336505e4b1c 430 /** \name Configuration and Initialization (Channel)
Kojto 111:4336505e4b1c 431 * @{
Kojto 111:4336505e4b1c 432 */
Kojto 111:4336505e4b1c 433
Kojto 111:4336505e4b1c 434 void extint_chan_get_config_defaults(
Kojto 111:4336505e4b1c 435 struct extint_chan_conf *const config);
Kojto 111:4336505e4b1c 436
Kojto 111:4336505e4b1c 437 void extint_chan_set_config(
Kojto 111:4336505e4b1c 438 const uint8_t channel,
Kojto 111:4336505e4b1c 439 const struct extint_chan_conf *const config);
Kojto 111:4336505e4b1c 440
Kojto 111:4336505e4b1c 441 /** @} */
Kojto 111:4336505e4b1c 442
Kojto 111:4336505e4b1c 443 /** \name Configuration and Initialization (NMI)
Kojto 111:4336505e4b1c 444 * @{
Kojto 111:4336505e4b1c 445 */
Kojto 111:4336505e4b1c 446
Kojto 111:4336505e4b1c 447 /**
Kojto 111:4336505e4b1c 448 * \brief Initializes an External Interrupt NMI channel configuration structure to defaults.
Kojto 111:4336505e4b1c 449 *
Kojto 111:4336505e4b1c 450 * Initializes a given External Interrupt NMI channel configuration structure
Kojto 111:4336505e4b1c 451 * to a set of known default values. This function should be called on all new
Kojto 111:4336505e4b1c 452 * instances of these configuration structures before being modified by the
Kojto 111:4336505e4b1c 453 * user application.
Kojto 111:4336505e4b1c 454 *
Kojto 111:4336505e4b1c 455 * The default configuration is as follows:
Kojto 111:4336505e4b1c 456 * \li Input filtering disabled
Kojto 111:4336505e4b1c 457 * \li Detect falling edges of a signal
Kojto 111:4336505e4b1c 458 * \li Asynchronous edge detection is disabled
Kojto 111:4336505e4b1c 459 *
Kojto 111:4336505e4b1c 460 * \param[out] config Configuration structure to initialize to default values
Kojto 111:4336505e4b1c 461 */
Kojto 111:4336505e4b1c 462 static inline void extint_nmi_get_config_defaults(
Kojto 111:4336505e4b1c 463 struct extint_nmi_conf *const config)
Kojto 111:4336505e4b1c 464 {
Kojto 111:4336505e4b1c 465 /* Sanity check arguments */
Kojto 111:4336505e4b1c 466 Assert(config);
Kojto 111:4336505e4b1c 467
Kojto 111:4336505e4b1c 468 /* Default configuration values */
Kojto 111:4336505e4b1c 469 config->gpio_pin = 0;
Kojto 111:4336505e4b1c 470 config->gpio_pin_mux = 0;
Kojto 111:4336505e4b1c 471 config->gpio_pin_pull = EXTINT_PULL_UP;
Kojto 111:4336505e4b1c 472 config->filter_input_signal = false;
Kojto 111:4336505e4b1c 473 config->detection_criteria = EXTINT_DETECT_FALLING;
Kojto 111:4336505e4b1c 474 #if (SAML21) || (SAMC20) || (SAMC21)
Kojto 111:4336505e4b1c 475 config->enable_async_edge_detection = false;
Kojto 111:4336505e4b1c 476 #endif
Kojto 111:4336505e4b1c 477
Kojto 111:4336505e4b1c 478 }
Kojto 111:4336505e4b1c 479
Kojto 111:4336505e4b1c 480 enum status_code extint_nmi_set_config(
Kojto 111:4336505e4b1c 481 const uint8_t nmi_channel,
Kojto 111:4336505e4b1c 482 const struct extint_nmi_conf *const config);
Kojto 111:4336505e4b1c 483
Kojto 111:4336505e4b1c 484 /** @} */
Kojto 111:4336505e4b1c 485
Kojto 111:4336505e4b1c 486 /** \name Detection testing and clearing (channel)
Kojto 111:4336505e4b1c 487 * @{
Kojto 111:4336505e4b1c 488 */
Kojto 111:4336505e4b1c 489
Kojto 111:4336505e4b1c 490 /**
Kojto 111:4336505e4b1c 491 * \brief Retrieves the edge detection state of a configured channel.
Kojto 111:4336505e4b1c 492 *
Kojto 111:4336505e4b1c 493 * Reads the current state of a configured channel, and determines
Kojto 111:4336505e4b1c 494 * if the detection criteria of the channel has been met.
Kojto 111:4336505e4b1c 495 *
Kojto 111:4336505e4b1c 496 * \param[in] channel External Interrupt channel index to check
Kojto 111:4336505e4b1c 497 *
Kojto 111:4336505e4b1c 498 * \return Status of the requested channel's edge detection state.
Kojto 111:4336505e4b1c 499 * \retval true If the channel's edge/level detection criteria was met
Kojto 111:4336505e4b1c 500 * \retval false If the channel has not detected its configured criteria
Kojto 111:4336505e4b1c 501 */
Kojto 111:4336505e4b1c 502 static inline bool extint_chan_is_detected(
Kojto 111:4336505e4b1c 503 const uint8_t channel)
Kojto 111:4336505e4b1c 504 {
Kojto 111:4336505e4b1c 505 Eic *const eic_module = _extint_get_eic_from_channel(channel);
Kojto 111:4336505e4b1c 506 uint32_t eic_mask = (1UL << (channel % 32));
Kojto 111:4336505e4b1c 507
Kojto 111:4336505e4b1c 508 return (eic_module->INTFLAG.reg & eic_mask);
Kojto 111:4336505e4b1c 509 }
Kojto 111:4336505e4b1c 510
Kojto 111:4336505e4b1c 511 /**
Kojto 111:4336505e4b1c 512 * \brief Clears the edge detection state of a configured channel.
Kojto 111:4336505e4b1c 513 *
Kojto 111:4336505e4b1c 514 * Clears the current state of a configured channel, readying it for
Kojto 111:4336505e4b1c 515 * the next level or edge detection.
Kojto 111:4336505e4b1c 516 *
Kojto 111:4336505e4b1c 517 * \param[in] channel External Interrupt channel index to check
Kojto 111:4336505e4b1c 518 */
Kojto 111:4336505e4b1c 519 static inline void extint_chan_clear_detected(
Kojto 111:4336505e4b1c 520 const uint8_t channel)
Kojto 111:4336505e4b1c 521 {
Kojto 111:4336505e4b1c 522 Eic *const eic_module = _extint_get_eic_from_channel(channel);
Kojto 111:4336505e4b1c 523 uint32_t eic_mask = (1UL << (channel % 32));
Kojto 111:4336505e4b1c 524
Kojto 111:4336505e4b1c 525 eic_module->INTFLAG.reg = eic_mask;
Kojto 111:4336505e4b1c 526 }
Kojto 111:4336505e4b1c 527
Kojto 111:4336505e4b1c 528 /** @} */
Kojto 111:4336505e4b1c 529
Kojto 111:4336505e4b1c 530 /** \name Detection Testing and Clearing (NMI)
Kojto 111:4336505e4b1c 531 * @{
Kojto 111:4336505e4b1c 532 */
Kojto 111:4336505e4b1c 533
Kojto 111:4336505e4b1c 534 /**
Kojto 111:4336505e4b1c 535 * \brief Retrieves the edge detection state of a configured NMI channel.
Kojto 111:4336505e4b1c 536 *
Kojto 111:4336505e4b1c 537 * Reads the current state of a configured NMI channel, and determines
Kojto 111:4336505e4b1c 538 * if the detection criteria of the NMI channel has been met.
Kojto 111:4336505e4b1c 539 *
Kojto 111:4336505e4b1c 540 * \param[in] nmi_channel External Interrupt NMI channel index to check
Kojto 111:4336505e4b1c 541 *
Kojto 111:4336505e4b1c 542 * \return Status of the requested NMI channel's edge detection state.
Kojto 111:4336505e4b1c 543 * \retval true If the NMI channel's edge/level detection criteria was met
Kojto 111:4336505e4b1c 544 * \retval false If the NMI channel has not detected its configured criteria
Kojto 111:4336505e4b1c 545 */
Kojto 111:4336505e4b1c 546 static inline bool extint_nmi_is_detected(
Kojto 111:4336505e4b1c 547 const uint8_t nmi_channel)
Kojto 111:4336505e4b1c 548 {
Kojto 111:4336505e4b1c 549 Eic *const eic_module = _extint_get_eic_from_nmi(nmi_channel);
Kojto 111:4336505e4b1c 550
Kojto 111:4336505e4b1c 551 return (eic_module->NMIFLAG.reg & EIC_NMIFLAG_NMI);
Kojto 111:4336505e4b1c 552 }
Kojto 111:4336505e4b1c 553
Kojto 111:4336505e4b1c 554 /**
Kojto 111:4336505e4b1c 555 * \brief Clears the edge detection state of a configured NMI channel.
Kojto 111:4336505e4b1c 556 *
Kojto 111:4336505e4b1c 557 * Clears the current state of a configured NMI channel, readying it for
Kojto 111:4336505e4b1c 558 * the next level or edge detection.
Kojto 111:4336505e4b1c 559 *
Kojto 111:4336505e4b1c 560 * \param[in] nmi_channel External Interrupt NMI channel index to check
Kojto 111:4336505e4b1c 561 */
Kojto 111:4336505e4b1c 562 static inline void extint_nmi_clear_detected(
Kojto 111:4336505e4b1c 563 const uint8_t nmi_channel)
Kojto 111:4336505e4b1c 564 {
Kojto 111:4336505e4b1c 565 Eic *const eic_module = _extint_get_eic_from_nmi(nmi_channel);
Kojto 111:4336505e4b1c 566
Kojto 111:4336505e4b1c 567 eic_module->NMIFLAG.reg = EIC_NMIFLAG_NMI;
Kojto 111:4336505e4b1c 568 }
Kojto 111:4336505e4b1c 569
Kojto 111:4336505e4b1c 570 /** @} */
Kojto 111:4336505e4b1c 571
Kojto 111:4336505e4b1c 572 #ifdef __cplusplus
Kojto 111:4336505e4b1c 573 }
Kojto 111:4336505e4b1c 574 #endif
Kojto 111:4336505e4b1c 575
Kojto 111:4336505e4b1c 576 /** @} */
Kojto 111:4336505e4b1c 577
Kojto 111:4336505e4b1c 578 #if EXTINT_CALLBACK_MODE == true
Kojto 111:4336505e4b1c 579 # include "extint_callback.h"
Kojto 111:4336505e4b1c 580 #endif
Kojto 111:4336505e4b1c 581
Kojto 111:4336505e4b1c 582 /**
Kojto 111:4336505e4b1c 583 * \page asfdoc_sam0_extint_extra Extra Information for EXTINT Driver
Kojto 111:4336505e4b1c 584 *
Kojto 111:4336505e4b1c 585 * \section asfdoc_sam0_extint_extra_acronyms Acronyms
Kojto 111:4336505e4b1c 586 * The table below presents the acronyms used in this module:
Kojto 111:4336505e4b1c 587 *
Kojto 111:4336505e4b1c 588 * <table>
Kojto 111:4336505e4b1c 589 * <tr>
Kojto 111:4336505e4b1c 590 * <th>Acronym</th>
Kojto 111:4336505e4b1c 591 * <th>Description</th>
Kojto 111:4336505e4b1c 592 * </tr>
Kojto 111:4336505e4b1c 593 * <tr>
Kojto 111:4336505e4b1c 594 * <td>EIC</td>
Kojto 111:4336505e4b1c 595 * <td>External Interrupt Controller</td>
Kojto 111:4336505e4b1c 596 * </tr>
Kojto 111:4336505e4b1c 597 * <tr>
Kojto 111:4336505e4b1c 598 * <td>MUX</td>
Kojto 111:4336505e4b1c 599 * <td>Multiplexer</td>
Kojto 111:4336505e4b1c 600 * </tr>
Kojto 111:4336505e4b1c 601 * <tr>
Kojto 111:4336505e4b1c 602 * <td>NMI</td>
Kojto 111:4336505e4b1c 603 * <td>Non-Maskable Interrupt</td>
Kojto 111:4336505e4b1c 604 * </tr>
Kojto 111:4336505e4b1c 605 * </table>
Kojto 111:4336505e4b1c 606 *
Kojto 111:4336505e4b1c 607 *
Kojto 111:4336505e4b1c 608 * \section asfdoc_sam0_extint_extra_dependencies Dependencies
Kojto 111:4336505e4b1c 609 * This driver has the following dependencies:
Kojto 111:4336505e4b1c 610 *
Kojto 111:4336505e4b1c 611 * - \ref asfdoc_sam0_system_pinmux_group "System Pin Multiplexer Driver"
Kojto 111:4336505e4b1c 612 *
Kojto 111:4336505e4b1c 613 *
Kojto 111:4336505e4b1c 614 * \section asfdoc_sam0_extint_extra_errata Errata
Kojto 111:4336505e4b1c 615 * There are no errata related to this driver.
Kojto 111:4336505e4b1c 616 *
Kojto 111:4336505e4b1c 617 *
Kojto 111:4336505e4b1c 618 * \section asfdoc_sam0_extint_extra_history Module History
Kojto 111:4336505e4b1c 619 * An overview of the module history is presented in the table below, with
Kojto 111:4336505e4b1c 620 * details on the enhancements and fixes made to the module since its first
Kojto 111:4336505e4b1c 621 * release. The current version of this corresponds to the newest version in
Kojto 111:4336505e4b1c 622 * the table.
Kojto 111:4336505e4b1c 623 *
Kojto 111:4336505e4b1c 624 * <table>
Kojto 111:4336505e4b1c 625 * <tr>
Kojto 111:4336505e4b1c 626 * <th>Changelog</th>
Kojto 111:4336505e4b1c 627 * </tr>
Kojto 111:4336505e4b1c 628 * <tr>
Kojto 111:4336505e4b1c 629 * <td>
Kojto 111:4336505e4b1c 630 * \li Driver updated to follow driver type convention.
Kojto 111:4336505e4b1c 631 * \li Removed \c %extint_reset(), \c %extint_disable() and
Kojto 111:4336505e4b1c 632 * \c extint_enable() functions. Added internal function
Kojto 111:4336505e4b1c 633 * \c %_system_extint_init().
Kojto 111:4336505e4b1c 634 * \li Added configuration EXTINT_CLOCK_SOURCE in conf_extint.h.
Kojto 111:4336505e4b1c 635 * \li Removed configuration EXTINT_CALLBACKS_MAX in conf_extint.h, and
Kojto 111:4336505e4b1c 636 * added channel parameter in the register functions
Kojto 111:4336505e4b1c 637 * \c %extint_register_callback() and \c %extint_unregister_callback().
Kojto 111:4336505e4b1c 638 * </td>
Kojto 111:4336505e4b1c 639 * </tr>
Kojto 111:4336505e4b1c 640 * <tr>
Kojto 111:4336505e4b1c 641 * <td>Updated interrupt handler to clear interrupt flag before calling
Kojto 111:4336505e4b1c 642 * callback function.</td>
Kojto 111:4336505e4b1c 643 * </tr>
Kojto 111:4336505e4b1c 644 * <tr>
Kojto 111:4336505e4b1c 645 * <td>Updated initialization function to also enable the digital interface
Kojto 111:4336505e4b1c 646 * clock to the module if it is disabled.</td>
Kojto 111:4336505e4b1c 647 * </tr>
Kojto 111:4336505e4b1c 648 * <tr>
Kojto 111:4336505e4b1c 649 * <td>Initial Release</td>
Kojto 111:4336505e4b1c 650 * </tr>
Kojto 111:4336505e4b1c 651 * </table>
Kojto 111:4336505e4b1c 652 */
Kojto 111:4336505e4b1c 653
Kojto 111:4336505e4b1c 654 /**
Kojto 111:4336505e4b1c 655 * \page asfdoc_sam0_extint_exqsg Examples for EXTINT Driver
Kojto 111:4336505e4b1c 656 *
Kojto 111:4336505e4b1c 657 * This is a list of the available Quick Start guides (QSGs) and example
Kojto 111:4336505e4b1c 658 * applications for \ref asfdoc_sam0_extint_group.
Kojto 111:4336505e4b1c 659 * QSGs are simple examples with step-by-step instructions to configure and
Kojto 111:4336505e4b1c 660 * use this driver in a selection of use cases. Note that QSGs can be compiled
Kojto 111:4336505e4b1c 661 * as a standalone application or be added to the user application.
Kojto 111:4336505e4b1c 662 *
Kojto 111:4336505e4b1c 663 * - \subpage asfdoc_sam0_extint_basic_use_case
Kojto 111:4336505e4b1c 664 * \if EXTINT_CALLBACK_MODE
Kojto 111:4336505e4b1c 665 * - \subpage asfdoc_sam0_extint_callback_use_case
Kojto 111:4336505e4b1c 666 * \endif
Kojto 111:4336505e4b1c 667 *
Kojto 111:4336505e4b1c 668 * \page asfdoc_sam0_extint_document_revision_history Document Revision History
Kojto 111:4336505e4b1c 669 *
Kojto 111:4336505e4b1c 670 * <table>
Kojto 111:4336505e4b1c 671 * <tr>
Kojto 111:4336505e4b1c 672 * <th>Doc. Rev.</td>
Kojto 111:4336505e4b1c 673 * <th>Date</td>
Kojto 111:4336505e4b1c 674 * <th>Comments</td>
Kojto 111:4336505e4b1c 675 * </tr>
Kojto 111:4336505e4b1c 676 * <tr>
Kojto 111:4336505e4b1c 677 * <td>E</td>
Kojto 111:4336505e4b1c 678 * <td>06/2015</td>
Kojto 111:4336505e4b1c 679 * <td>Added support for SAML21, SAMC21, and SAMDAx.</td>
Kojto 111:4336505e4b1c 680 * </tr>
Kojto 111:4336505e4b1c 681 * <tr>
Kojto 111:4336505e4b1c 682 * <td>D</td>
Kojto 111:4336505e4b1c 683 * <td>12/2014</td>
Kojto 111:4336505e4b1c 684 * <td>Added support for SAMR21 and SAMD10/D11.</td>
Kojto 111:4336505e4b1c 685 * </tr>
Kojto 111:4336505e4b1c 686 * <tr>
Kojto 111:4336505e4b1c 687 * <td>C</td>
Kojto 111:4336505e4b1c 688 * <td>01/2014</td>
Kojto 111:4336505e4b1c 689 * <td>Added support for SAMD21.</td>
Kojto 111:4336505e4b1c 690 * </tr>
Kojto 111:4336505e4b1c 691 * <tr>
Kojto 111:4336505e4b1c 692 * <td>B</td>
Kojto 111:4336505e4b1c 693 * <td>06/2013</td>
Kojto 111:4336505e4b1c 694 * <td>Added additional documentation on the event system. Corrected
Kojto 111:4336505e4b1c 695 * documentation typos.</td>
Kojto 111:4336505e4b1c 696 * </tr>
Kojto 111:4336505e4b1c 697 * <tr>
Kojto 111:4336505e4b1c 698 * <td>A</td>
Kojto 111:4336505e4b1c 699 * <td>06/2013</td>
Kojto 111:4336505e4b1c 700 * <td>Initial release</td>
Kojto 111:4336505e4b1c 701 * </tr>
Kojto 111:4336505e4b1c 702 * </table>
Kojto 111:4336505e4b1c 703 */
Kojto 111:4336505e4b1c 704
Kojto 111:4336505e4b1c 705 #endif