1 /**
2  * \file
3  *
4  * \brief SAM Event System 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 EVENTS_H_INCLUDED
47 #define EVENTS_H_INCLUDED
48 
49 #ifdef __cplusplus
50 extern "C" {
51 #endif
52 
53 /**
54  * \defgroup asfdoc_sam0_events_group SAM Event System (EVENTS) Driver
55  *
56  * This driver for Atmel&reg; | SMART ARM&reg;-based microcontrollers provides
57  * an interface for the configuration and management of the device's peripheral
58  * event resources and users within the device, including enabling and disabling
59  * of peripheral source selection and synchronization of clock domains between
60  * various modules. The following API modes is covered by this manual:
61  *  - Polled API
62  * \if EVENTS_INTERRUPT_HOOK_MODE
63  *  - Interrupt hook API
64  * \endif
65  *
66  * The following peripheral is used by this module:
67  * - EVSYS (Event System Management)
68  *
69  * The following devices can use this module:
70  *  - Atmel | SMART SAM D20/D21
71  *  - Atmel | SMART SAM R21
72  *  - Atmel | SMART SAM D09/D10/D11
73  *  - Atmel | SMART SAM L21/L22
74  *  - Atmel | SMART SAM DA1
75  *  - Atmel | SMART SAM C20/C21
76  *  - Atmel | SMART SAM HA1
77  *  - Atmel | SMART SAM R30
78  *
79  * The outline of this documentation is as follows:
80  * - \ref asfdoc_sam0_events_prerequisites
81  * - \ref asfdoc_sam0_events_module_overview
82  * - \ref asfdoc_sam0_events_special_considerations
83  * - \ref asfdoc_sam0_events_extra_info
84  * - \ref asfdoc_sam0_events_examples
85  * - \ref asfdoc_sam0_events_api_overview
86  *
87  *
88  * \section asfdoc_sam0_events_prerequisites Prerequisites
89  *
90  * There are no prerequisites for this module.
91  *
92  *
93  * \section asfdoc_sam0_events_module_overview Module Overview
94  *
95  * Peripherals within the SAM devices are capable of generating two types of
96  * actions in response to given stimulus; set a register flag for later
97  * intervention by the CPU (using interrupt or polling methods), or generate
98  * event signals, which can be internally routed directly to other
99  * peripherals within the device. The use of events allows for direct actions
100  * to be performed in one peripheral in response to a stimulus in another
101  * without CPU intervention. This can lower the overall power consumption of the
102  * system if the CPU is able to remain in sleep modes for longer periods
103  * (SleepWalking), and lowers the latency of the system response.
104  *
105  * The event system is comprised of a number of freely configurable Event
106  * resources, plus a number of fixed Event Users. Each Event resource can be
107  * configured to select the input peripheral that will generate the events
108  * signal, as well as the synchronization path and edge detection mode.
109  * The fixed-function Event Users, connected to peripherals within the device,
110  * can then subscribe to an Event resource in a one-to-many relationship in order
111  * to receive events as they are generated. An overview of the event system
112  * chain is shown in
113  * \ref asfdoc_sam0_events_module_overview_fig "the figure below".
114  *
115  * \anchor asfdoc_sam0_events_module_overview_fig
116  * \dot
117  * digraph overview {
118  * rankdir=LR;
119  * node [label="Source\nPeripheral\n(Generator)" shape=ellipse style=filled fillcolor=lightgray] src_peripheral;
120  * node [label="Event\nResource A" shape=square style=""] event_gen0;
121  * node [label="Event\nUser X" shape=square style=""] event_user0;
122  * node [label="Event\nUser Y" shape=square style=""] event_user1;
123  * node [label="Destination\nPeripheral\n(User)" shape=ellipse style=filled fillcolor=lightgray] dst_peripheral0;
124  * node [label="Destination\nPeripheral\n(User)" shape=ellipse style=filled fillcolor=lightgray] dst_peripheral1;
125  *
126  * src_peripheral -> event_gen0;
127  * event_gen0 -> event_user0;
128  * event_gen0 -> event_user1;
129  * event_user0 -> dst_peripheral0;
130  * event_user1 -> dst_peripheral1;
131  * }
132  * \enddot
133  *
134  * There are many different events that can be routed in the device, which can
135  * then trigger many different actions. For example, an Analog Comparator module
136  * could be configured to generate an event when the input signal rises above
137  * the compare threshold, which then triggers a Timer Counter module to capture
138  * the current count value for later use.
139  *
140  * \subsection asfdoc_sam0_events_module_overview_event_channels Event Channels
141  * The Event module in each device consists of several channels, which can be
142  * freely linked to an event generator (i.e. a peripheral within the device
143  * that is capable of generating events). Each channel can be individually
144  * configured to select the generator peripheral, signal path, and edge detection
145  * applied to the input event signal, before being passed to any event user(s).
146  *
147  * Event channels can support multiple users within the device in a standardized
148  * manner. When an Event User is linked to an Event Channel, the channel will
149  * automatically handshake with all attached users to ensure that all modules
150  * correctly receive and acknowledge the event.
151  *
152  * \subsection asfdoc_sam0_events_module_overview_event_users Event Users
153  * Event Users are able to subscribe to an Event Channel, once it has been
154  * configured. Each Event User consists of a fixed connection to one of the
155  * peripherals within the device (for example, an ADC module, or Timer module)
156  * and is capable of being connected to a single Event Channel.
157  *
158  * \subsection asfdoc_sam0_events_module_overview_edge_detection Edge Detection
159  * For asynchronous events, edge detection on the event input is not possible,
160  * and the event signal must be passed directly between the event generator and
161  * event user. For synchronous and re-synchronous events, the input signal from
162  * the event generator must pass through an edge detection unit, so that only
163  * the rising, falling, or both edges of the event signal triggers an action in
164  * the event user.
165  *
166  * \subsection asfdoc_sam0_events_module_overview_path_selection Path Selection
167  * The event system in the SAM devices supports three signal path types from
168  * the event generator to Event Users: asynchronous, synchronous, and
169  * re-synchronous events.
170  *
171  * \subsubsection asfdoc_sam0_events_module_overview_path_selection_async Asynchronous Paths
172  * Asynchronous event paths allow for an asynchronous connection between the
173  * event generator and Event Users, when the source and destination
174  * peripherals share the same \ref asfdoc_sam0_system_clock_group "Generic Clock"
175  * channel. In this mode the event is propagated between the source and
176  * destination directly to reduce the event latency, thus no edge detection is
177  * possible. The asynchronous event chain is shown in
178  * \ref asfdoc_sam0_events_module_async_path_fig "the figure below".
179  *
180  * \anchor asfdoc_sam0_events_module_async_path_fig
181  * \dot
182  * digraph overview {
183  *   rankdir=LR;
184  *   node [label="Source\nPeripheral" shape=ellipse style=filled fillcolor=lightgray] src_peripheral;
185  *   node [label="<f0> EVSYS | <f1> Event\nChannel/User" fillcolor=white style="dashed" shape=record] events_chan;
186  *   node [label="Destination\nPeripheral" shape=ellipse style=filled fillcolor=lightgray] dst_peripheral;
187  *
188  *   src_peripheral -> events_chan;
189  *   events_chan    -> dst_peripheral;
190  *
191  * }
192  * \enddot
193  * \note Identically shaped borders in the diagram indicate a shared generic clock channel.
194  *
195  * \subsubsection asfdoc_sam0_events_module_overview_path_selection_sync Synchronous Paths
196  * The Synchronous event path should be used when edge detection or interrupts
197  * from the event channel are required, and the source event generator and the
198  * event channel shares the same Generic Clock channel. The synchronous event
199  * chain is shown in
200  * \ref asfdoc_sam0_events_module_sync_path_fig "the figure below".
201  *
202  * Not all peripherals support Synchronous event paths; refer to the device datasheet.
203  *
204  * \anchor asfdoc_sam0_events_module_sync_path_fig
205  * \dot
206  * digraph overview {
207  *   rankdir=LR;
208  *   node [label="Source\nPeripheral" shape=ellipse style="filled, dashed" fillcolor=lightgray] src_peripheral;
209  *   node [label="<f0> EVSYS | <f1> Event\nChannel/User" fillcolor=white shape=record style="dashed"] events_chan;
210  *   node [label="Destination\nPeripheral" shape=ellipse style="filled, solid" fillcolor=lightgray] dst_peripheral;
211  *
212  *   src_peripheral -> events_chan;
213  *   events_chan    -> dst_peripheral;
214  *
215  * }
216  * \enddot
217  * \note Identically shaped borders in the diagram indicate a shared generic clock channel.
218  *
219  * \subsubsection asfdoc_sam0_events_module_overview_path_selection_resync Re-synchronous Paths
220  * Re-synchronous event paths are a special form of synchronous events, where
221  * when edge detection or interrupts from the event channel are required, but
222  * the event generator and the event channel use different Generic Clock
223  * channels. The re-synchronous path allows the Event System to synchronize the
224  * incoming event signal from the Event Generator to the clock of the Event
225  * System module to avoid missed events, at the cost of a higher latency due to
226  * the re-synchronization process. The re-synchronous event chain is shown in
227  * \ref asfdoc_sam0_events_module_resync_path_fig "the figure below".
228  *
229  * Not all peripherals support re-synchronous event paths; refer to the device datasheet.
230  * \anchor asfdoc_sam0_events_module_resync_path_fig
231  * \dot
232  * digraph overview {
233  *   rankdir=LR;
234  *   node [label="Source\nPeripheral" shape=ellipse style="filled, dotted" fillcolor=lightgray] src_peripheral;
235  *   node [label="<f0> EVSYS | <f1> Event\nChannel/User" fillcolor=white shape=record style="dashed"] events_chan;
236  *   node [label="Destination\nPeripheral" shape=ellipse style=filled fillcolor=lightgray] dst_peripheral;
237  *
238  *   src_peripheral -> events_chan;
239  *   events_chan    -> dst_peripheral;
240  *
241  * }
242  * \enddot
243  * \note Identically shaped borders in the diagram indicate a shared generic clock channel.
244  *
245  * \subsection asfdoc_sam0_events_module_overview_physical Physical Connection
246  *
247  * \ref asfdoc_sam0_events_module_int_connections_fig "The diagram below"
248  * shows how this module is interconnected within the device.
249  *
250  * \anchor asfdoc_sam0_events_module_int_connections_fig
251  * \dot
252  * digraph overview {
253  *   rankdir=LR;
254  *   node [label="Source\nPeripherals" shape=ellipse style=filled fillcolor=lightgray] src_peripheral;
255  *
256  *   subgraph driver {
257  *     node [label="<f0> EVSYS | <f1> Event Channels" fillcolor=white shape=record] events_chan;
258  *     node [label="<f0> EVSYS | <f1> Event Users" fillcolor=white shape=record] events_user;
259  *   }
260  *
261  *   node [label="Destination\nPeripherals" shape=ellipse style=filled fillcolor=lightgray] dst_peripheral;
262  *
263  *   src_peripheral -> events_chan:f1 [label="Source\nMUXs"];
264  *   events_chan:f1 -> events_user:f1 [label="Channel\nMUXs"];
265  *   events_user:f1 -> dst_peripheral;
266  * }
267  * \enddot
268  *
269  * \subsection asfdoc_sam0_events_module_overview_config Configuring Events
270  * For SAM devices, several steps are required to properly configure an
271  * event chain, so that hardware peripherals can respond to events generated by
272  * each other, as listed below.
273  *
274  * \subsubsection asfdoc_sam0_events_module_overview_config_src Source Peripheral
275  *  -# The source peripheral (that will generate events) must be configured and
276  *     enabled.
277  *  -# The source peripheral (that will generate events) must have an output
278  *     event enabled.
279 
280  * \subsubsection asfdoc_sam0_events_module_overview_config_evsys Event System
281  *  -# An event system channel must be allocated and configured with the
282  *     correct source peripheral selected as the channel's event generator.
283  *  -# The event system user must be configured and enabled, and attached to
284  #     event channel previously allocated.
285 
286  * \subsubsection asfdoc_sam0_events_module_overview_config_dst Destination Peripheral
287  *  -# The destination peripheral (that will receive events) must be configured
288  *     and enabled.
289  *  -# The destination peripheral (that will receive events) must have an input
290  *     event enabled.
291  *
292  *
293  * \section asfdoc_sam0_events_special_considerations Special Considerations
294  *
295  * There are no special considerations for this module.
296  *
297  *
298  * \section asfdoc_sam0_events_extra_info Extra Information
299  *
300  * For extra information, see \ref asfdoc_sam0_events_extra. This includes:
301  * - \ref asfdoc_sam0_events_extra_acronyms
302  * - \ref asfdoc_sam0_events_extra_dependencies
303  * - \ref asfdoc_sam0_events_extra_errata
304  * - \ref asfdoc_sam0_events_extra_history
305  *
306  *
307  * \section asfdoc_sam0_events_examples Examples
308  *
309  * For a list of examples related to this driver, see
310  * \ref asfdoc_sam0_events_exqsg.
311  *
312  *
313  * \section asfdoc_sam0_events_api_overview API Overview
314  * @{
315  */
316 
317 #include <compiler.h>
318 #include "events_common.h"
319 
320 /**
321  * \brief Edge detect enum.
322  *
323  * Event channel edge detect setting.
324  *
325  */
326 enum events_edge_detect {
327 	/** No event output */
328 	EVENTS_EDGE_DETECT_NONE,
329 	/** Event on rising edge */
330 	EVENTS_EDGE_DETECT_RISING,
331 	/** Event on falling edge */
332 	EVENTS_EDGE_DETECT_FALLING,
333 	/** Event on both edges */
334 	EVENTS_EDGE_DETECT_BOTH,
335 };
336 
337 /**
338  * \brief Path selection enum.
339  *
340  * Event channel path selection.
341  *
342  */
343 enum events_path_selection {
344 	/** Select the synchronous path for this event channel */
345 	EVENTS_PATH_SYNCHRONOUS,
346 	/** Select the resynchronizer path for this event channel */
347 	EVENTS_PATH_RESYNCHRONIZED,
348 	/** Select the asynchronous path for this event channel */
349 	EVENTS_PATH_ASYNCHRONOUS,
350 };
351 
352 /**
353  * \brief Events configuration struct.
354  *
355  * This event configuration struct is used to configure each of the channels.
356  *
357  */
358 struct events_config {
359 	/** Select edge detection mode */
360 	enum events_edge_detect    edge_detect;
361 	/** Select events channel path */
362 	enum events_path_selection path;
363 	/** Set event generator for the channel */
364 	uint8_t                    generator;
365 	/** Clock source for the event channel */
366 	uint8_t                    clock_source;
367 #if (SAML21) || (SAML22) || (SAMC20) || (SAMC21) || (SAMR30)
368 	/** Run in standby mode for the channel */
369 	bool                       run_in_standby;
370 	/** Run On Demand */
371 	bool                       on_demand;
372 #endif
373 };
374 
375 /**
376  * \brief No event generator definition.
377  *
378  * Use this to disable any peripheral event input to a channel. This can be useful
379  * if you only want to use a channel for software generated events.
380  *
381  */
382 
383 ///@cond INTERNAL
384 /**
385  * \internal
386  * Status bit offsets in the status register/interrupt register.
387  *
388  * @{
389  */
390 #if (SAML21) || (SAML22) || (SAMC20) || (SAMC21) || (SAMR30)
391 #  define _EVENTS_START_OFFSET_BUSY_BITS           16
392 #  define _EVENTS_START_OFFSET_USER_READY_BIT      0
393 #  define _EVENTS_START_OFFSET_DETECTION_BIT       16
394 #  define _EVENTS_START_OFFSET_OVERRUN_BIT         0
395 #else /* SAM D/R */
396 #  define _EVENTS_START_OFFSET_BUSY_BITS           8
397 #  define _EVENTS_START_OFFSET_USER_READY_BIT      0
398 #  define _EVENTS_START_OFFSET_DETECTION_BIT       8
399 #  define _EVENTS_START_OFFSET_OVERRUN_BIT         0
400 #endif
401 /** @} */
402 ///@endcond
403 
404 /**
405 *  Definition for no generator selection.
406 */
407 #define EVSYS_ID_GEN_NONE   0
408 
409 /**
410  * \brief Event channel resource.
411  *
412  * Event resource structure.
413  *
414  * \note The fields in this structure should not be altered by the user application;
415  *       they are reserved for driver internals only.
416  */
417 struct events_resource {
418 #if !defined(__DOXYGEN__)
419 	/** Channel allocated for the event resource */
420 	uint8_t channel;
421 	/** Channel setting in CHANNEL register */
422 	uint32_t channel_reg;
423 #endif
424 };
425 
426 #if EVENTS_INTERRUPT_HOOKS_MODE == true
427 typedef void (*events_interrupt_hook)(struct events_resource *resource);
428 
429 /**
430  * \brief Event hook.
431  *
432  * Event hook structure.
433  *
434  */
435 struct events_hook {
436 	/** Event resource */
437 	struct events_resource *resource;
438 	/** Event hook function */
439 	events_interrupt_hook hook_func;
440 	/** Next event hook */
441 	struct events_hook *next;
442 };
443 #endif
444 
445 /**
446  * \brief Initializes an event configurations struct to defaults.
447  *
448  * Initailizes an event configuration struct to predefined safe default settings.
449  *
450  * \param[in] config Pointer to an instance of \ref struct events_config
451  *
452  */
453 void events_get_config_defaults(struct events_config *config);
454 
455 /**
456  * \brief Allocate an event channel and set configuration.
457  *
458  * Allocates an event channel from the event channel pool and sets
459  * the channel configuration.
460  *
461  * \param[out] resource Pointer to a \ref events_resource struct instance
462  * \param[in]  config   Pointer to a \ref events_config struct
463  *
464  * \return Status of the configuration procedure.
465  * \retval STATUS_OK            Allocation and configuration went successful
466  * \retval STATUS_ERR_NOT_FOUND No free event channel found
467  *
468  */
469 enum status_code events_allocate(struct events_resource *resource, struct events_config *config);
470 
471 /**
472  * \brief Attach user to the event channel.
473  *
474  * Attach a user peripheral to the event channel to receive events.
475  *
476  * \param[in] resource Pointer to an \ref events_resource struct instance
477  * \param[in] user_id  A number identifying the user peripheral found in the device header file
478  *
479  * \return Status of the user attach procedure.
480  * \retval STATUS_OK No errors detected when attaching the event user
481  */
482 enum status_code events_attach_user(struct events_resource *resource, uint8_t user_id);
483 
484 /**
485  * \brief Detach a user peripheral from the event channel.
486  *
487  * Deattach a user peripheral from the event channels so it does not receive any more events.
488  *
489  * \param[in] resource Pointer to an \ref event_resource struct instance
490  * \param[in] user_id  A number identifying the user peripheral found in the device header file
491  *
492  * \return Status of the user detach procedure.
493  * \retval STATUS_OK No errors detected when detaching the event user
494  */
495 enum status_code events_detach_user(struct events_resource *resource, uint8_t user_id);
496 
497 /**
498  * \brief Check if a channel is busy.
499  *
500  * Check if a channel is busy, a channel stays busy until all users connected to the channel
501  * has handled an event.
502  *
503  * \param[in] resource Pointer to a \ref events_resource struct instance
504  *
505  * \return Status of the channels busy state.
506  * \retval true   One or more users connected to the channel has not handled the last event
507  * \retval false  All users are ready to handle new events
508  */
509 bool events_is_busy(struct events_resource *resource);
510 
511 /**
512  * \brief Trigger software event.
513  *
514  * Trigger an event by software.
515  *
516  * \note Software event works on either a synchronous path or resynchronized path, and
517  * edge detection must be configured to rising-edge detection.
518  *
519  * \param[in] resource Pointer to an \ref events_resource struct
520  *
521  * \return Status of the event software procedure.
522  * \retval STATUS_OK No error was detected when the software tigger signal was issued
523  * \retval STATUS_ERR_UNSUPPORTED_DEV If the channel path is asynchronous and/or the
524  *                                    edge detection is not set to RISING
525  */
526 enum status_code events_trigger(struct events_resource *resource);
527 
528 /**
529  * \brief Check if all users connected to the channel are ready.
530  *
531  * Check if all users connected to the channel are ready to handle incoming events.
532  *
533  * \param[in] resource Pointer to an \ref events_resource struct
534  *
535  * \return The ready status of users connected to an event channel.
536  * \retval true  All the users connected to the event channel are ready to handle incoming events
537  * \retval false One or more users connected to the event channel are not ready to handle incoming events
538  */
539 bool events_is_users_ready(struct events_resource *resource);
540 
541 /**
542  * \brief Check if an event is detected on the event channel.
543  *
544  * Check if an event has been detected on the channel.
545  *
546  * \note This function will clear the event detected interrupt flag.
547  *
548  * \param[in] resource Pointer to an \ref events_resource struct
549  *
550  * \return Status of the event detection interrupt flag.
551  * \retval true  Event has been detected
552  * \retval false Event has not been detected
553  */
554 bool events_is_detected(struct events_resource *resource);
555 
556 /**
557  * \brief Check if there has been an overrun situation on this channel.
558  *
559  * \note This function will clear the event overrun detected interrupt flag.
560  *
561  * \param[in] resource Pointer to an \ref events_resource struct
562  *
563  * \return Status of the event overrun interrupt flag.
564  * \retval true  Event overrun has been detected
565  * \retval false Event overrun has not been detected
566  */
567 bool events_is_overrun(struct events_resource *resource);
568 
569 /**
570  * \brief Release allocated channel back the the resource pool.
571  *
572  * Release an allocated channel back to the resource pool to make it available for other purposes.
573  *
574  * \param[in] resource Pointer to an \ref events_resource struct
575  *
576  * \return Status of the channel release procedure.
577  * \retval STATUS_OK                  No error was detected when the channel was released
578  * \retval STATUS_BUSY                One or more event users have not processed the last event
579  * \retval STATUS_ERR_NOT_INITIALIZED Channel not allocated, and can therefore not be released
580  */
581 enum status_code events_release(struct events_resource *resource);
582 
583 /**
584  * \brief Get the number of free channels.
585  *
586  * Get the number of allocatable channels in the events system resource pool.
587  *
588  * \return The number of free channels in the event system.
589  *
590  */
591 uint8_t events_get_free_channels(void);
592 
593 
594 ///@cond INTERNAL
595 /**
596  * \internal
597  * Function to find bit position in the CHSTATUS and INTFLAG register,
598  * and return bit mask of this position.
599  *
600  * @{
601  */
602 uint32_t _events_find_bit_position(uint8_t channel, uint8_t start_offset);
603 /** @} */
604 ///@endcond
605 
606 
607 /** @} */
608 
609 /**
610  * \page asfdoc_sam0_events_extra Extra Information for EVENTS Driver
611  *
612  * \section asfdoc_sam0_events_extra_acronyms Acronyms
613  * Below is a table listing the acronyms used in this module, along with their
614  * intended meanings.
615  *
616  * <table>
617  *   <tr>
618  *     <th>Acronym</th>
619  *     <th>Description</th>
620  *   </tr>
621  *   <tr>
622  *     <td>CPU</td>
623  *     <td>Central Processing Unit</td>
624  *   </tr>
625  *   <tr>
626  *     <td>MUX</td>
627  *     <td>Multiplexer</td>
628  *   </tr>
629  * </table>
630  *
631  *
632  * \section asfdoc_sam0_events_extra_dependencies Dependencies
633  * This driver has the following dependencies:
634  *
635  * - \ref asfdoc_sam0_system_clock_group "System Clock Driver"
636  *
637  *
638  * \section asfdoc_sam0_events_extra_errata Errata
639  * There are no errata related to this driver.
640  *
641  *
642  * \section asfdoc_sam0_events_extra_history Module History
643  * An overview of the module history is presented in the table below, with
644  * details on the enhancements and fixes made to the module since its first
645  * release. The current version of this corresponds to the newest version in
646  * the table.
647  *
648  * <table>
649  *   <tr>
650  *     <th>Changelog</th>
651  *   </tr>
652  *   <tr>
653  *     <td>Fix a bug in internal function _events_find_bit_position()</td>
654  *   </tr>
655  *   <tr>
656  *     <td>Rewrite of events driver</td>
657  *   </tr>
658  *   <tr>
659  *     <td>Initial Release</td>
660  *   </tr>
661  * </table>
662  */
663 
664  /**
665  * \page asfdoc_sam0_events_exqsg Examples for EVENTS Driver
666  *
667  * This is a list of the available Quick Start guides (QSGs) and example
668  * applications for \ref asfdoc_sam0_events_group. QSGs are simple examples with
669  * step-by-step instructions to configure and use this driver in a selection of
670  * use cases. Note that a QSG can be compiled as a standalone application or be
671  * added to the user application.
672  *
673  * - \subpage asfdoc_sam0_events_basic_use_case
674  * \if EVENTS_INTERRUPT_HOOK_MODE
675  * - \subpage asfdoc_sam0_events_interrupt_hook_use_case
676  * \endif
677  *
678  * \page asfdoc_sam0_events_document_revision_history Document Revision History
679  *
680  * <table>
681  *  <tr>
682  *      <th>Doc. Rev.</td>
683  *      <th>Date</td>
684  *      <th>Comments</td>
685  *  </tr>
686  *  <tr>
687  *      <td>42108G</td>
688  *      <td>12/2015</td>
689  *      <td>Added support for SAM D09 and SAM L22</td>
690  *  </tr>
691  *  <tr>
692  *      <td>42108F</td>
693  *      <td>08/2015</td>
694  *      <td>Added support for SAM L21, SAM DA1, SAMR30 and SAM C20/C21</td>
695  *  </tr>
696  *  <tr>
697  *      <td>42108E</td>
698  *      <td>12/2014</td>
699  *      <td>Added support for interrupt hook mode.
700  *         Added support for SAM R21 and SAM D10/D11.</td>
701  *  </tr>
702  *  <tr>
703  *      <td>42108D</td>
704  *      <td>01/2014</td>
705  *      <td>Update to support SAM D21 and corrected documentation typos</td>
706  *  </tr>
707  *  <tr>
708  *      <td>42108C</td>
709  *      <td>11/2013</td>
710  *      <td>Fixed incorrect documentation for the event signal paths. Added
711  *          configuration steps overview to the documentation.</td>
712  *  </tr>
713  *  <tr>
714  *      <td>42108B</td>
715  *      <td>06/2013</td>
716  *      <td>Corrected documentation typos</td>
717  *  </tr>
718  *  <tr>
719  *      <td>42108A</td>
720  *      <td>06/2013</td>
721  *      <td>Initial release</td>
722  *  </tr>
723  * </table>
724  */
725 
726 #ifdef __cplusplus
727 }
728 #endif
729 
730 #endif /* EVENTS_H_INCLUDED */
731