extint.h 22 KB

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