1 /**
2  * \file
3  *
4  * \brief SAM Pin Multiplexer 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 PINMUX_H_INCLUDED
47 #define PINMUX_H_INCLUDED
48 
49 /**
50  * \defgroup asfdoc_sam0_system_pinmux_group SAM System Pin Multiplexer (SYSTEM PINMUX) Driver
51  *
52  * This driver for Atmel&reg; | SMART ARM&reg;-based microcontrollers provides
53  * an interface for the configuration and management of the device's physical
54  * I/O Pins, to alter the direction and input/drive characteristics as well as
55  * to configure the pin peripheral multiplexer selection.
56  *
57  * The following peripheral is used by this module:
58  *  - PORT (Port I/O Management)
59  *
60  * The following devices can use this module:
61  *  - Atmel | SMART SAM D20/D21
62  *  - Atmel | SMART SAM R21
63  *  - Atmel | SMART SAM D09/D10/D11
64  *  - Atmel | SMART SAM L21/L22
65  *  - Atmel | SMART SAM DA1
66  *  - Atmel | SMART SAM C20/C21
67  *  - Atmel | SMART SAM HA1
68  *
69  * The outline of this documentation is as follows:
70  *  - \ref asfdoc_sam0_system_pinmux_prerequisites
71  *  - \ref asfdoc_sam0_system_pinmux_module_overview
72  *  - \ref asfdoc_sam0_system_pinmux_special_considerations
73  *  - \ref asfdoc_sam0_system_pinmux_extra_info
74  *  - \ref asfdoc_sam0_system_pinmux_examples
75  *  - \ref asfdoc_sam0_system_pinmux_api_overview
76  *
77  *
78  * \section asfdoc_sam0_system_pinmux_prerequisites Prerequisites
79  *
80  * There are no prerequisites for this module.
81  *
82  *
83  * \section asfdoc_sam0_system_pinmux_module_overview Module Overview
84  *
85  * The SAM devices contain a number of General Purpose I/O pins, used to
86  * interface the user application logic and internal hardware peripherals to
87  * an external system. The Pin Multiplexer (PINMUX) driver provides a method
88  * of configuring the individual pin peripheral multiplexers to select
89  * alternate pin functions.
90  *
91  * \subsection asfdoc_sam0_system_pinmux_features Driver Feature Macro Definition
92  * <table>
93  *  <tr>
94  *    <th>Driver Feature Macro</th>
95  *    <th>Supported devices</th>
96  *  </tr>
97  *  <tr>
98  *    <td>FEATURE_SYSTEM_PINMUX_DRIVE_STRENGTH</td>
99  *    <td>SAM L21, SAM C20/C21</td>
100  *  </tr>
101  * </table>
102  * \note The specific features are only available in the driver when the
103  * selected device supports those features.
104  *
105  * \subsection asfdoc_sam0_system_pinmux_physical_logical_pins Physical and Logical GPIO Pins
106  * SAM devices use two naming conventions for the I/O pins in the device; one
107  * physical and one logical. Each physical pin on a device package is assigned
108  * both a physical port and pin identifier (e.g. "PORTA.0") as well as a
109  * monotonically incrementing logical GPIO number (e.g. "GPIO0"). While the
110  * former is used to map physical pins to their physical internal device module
111  * counterparts, for simplicity the design of this driver uses the logical GPIO
112  * numbers instead.
113  *
114  * \subsection asfdoc_sam0_system_pinmux_peripheral_muxing Peripheral Multiplexing
115  * SAM devices contain a peripheral MUX, which is individually controllable
116  * for each I/O pin of the device. The peripheral MUX allows you to select the
117  * function of a physical package pin - whether it will be controlled as a user
118  * controllable GPIO pin, or whether it will be connected internally to one of
119  * several peripheral modules (such as an I<SUP>2</SUP>C module). When a pin is
120  * configured in GPIO mode, other peripherals connected to the same pin will be
121  * disabled.
122  *
123  * \subsection asfdoc_sam0_system_pinmux_pad_characteristics Special Pad Characteristics
124  * There are several special modes that can be selected on one or more I/O pins
125  * of the device, which alter the input and output characteristics of the pad.
126  *
127  * \subsubsection asfdoc_sam0_system_pinmux_drive_strength Drive Strength
128  * The Drive Strength configures the strength of the output driver on the
129  * pad. Normally, there is a fixed current limit that each I/O pin can safely
130  * drive, however some I/O pads offer a higher drive mode which increases this
131  * limit for that I/O pin at the expense of an increased power consumption.
132  *
133  * \subsubsection asfdoc_sam0_system_pinmux_slew_rate Slew Rate
134  * The Slew Rate configures the slew rate of the output driver, limiting the
135  * rate at which the pad output voltage can change with time.
136  *
137  * \subsubsection asfdoc_sam0_system_pinmux_input_sample_mode Input Sample Mode
138  * The Input Sample Mode configures the input sampler buffer of the pad. By
139  * default, the input buffer is only sampled "on-demand", i.e. when the user
140  * application attempts to read from the input buffer. This mode is the most
141  * power efficient, but increases the latency of the input sample by two clock
142  * cycles of the port clock. To reduce latency, the input sampler can instead
143  * be configured to always sample the input buffer on each port clock cycle, at
144  * the expense of an increased power consumption.
145  *
146  * \subsection asfdoc_sam0_system_pinmux_module_overview_physical Physical Connection
147  *
148  * \ref asfdoc_sam0_system_pinmux_intconnections "The diagram below" shows
149  * how this module is interconnected within the device:
150  *
151  * \anchor asfdoc_sam0_system_pinmux_intconnections
152  * \dot
153  * digraph overview {
154  *   node [label="Port Pad" shape=square] pad;
155  *
156  *   subgraph driver {
157  *     node [label="Peripheral MUX" shape=trapezium] pinmux;
158  *     node [label="GPIO Module" shape=ellipse shape=ellipse style=filled fillcolor=lightgray] gpio;
159  *     node [label="Other Peripheral Modules" shape=ellipse style=filled fillcolor=lightgray] peripherals;
160  *   }
161  *
162  *   pinmux -> gpio;
163  *   pad    -> pinmux;
164  *   pinmux -> peripherals;
165  * }
166  * \enddot
167  *
168  * \section asfdoc_sam0_system_pinmux_special_considerations Special Considerations
169  *
170  * The SAM port pin input sampling mode is set in groups of four physical
171  * pins; setting the sampling mode of any pin in a sub-group of eight I/O pins
172  * will configure the sampling mode of the entire sub-group.
173  *
174  * High Drive Strength output driver mode is not available on all device pins -
175  * refer to your device specific datasheet.
176  *
177  *
178  * \section asfdoc_sam0_system_pinmux_extra_info Extra Information
179  *
180  * For extra information, see \ref asfdoc_sam0_system_pinmux_extra. This includes:
181  *  - \ref asfdoc_sam0_system_pinmux_extra_acronyms
182  *  - \ref asfdoc_sam0_system_pinmux_extra_dependencies
183  *  - \ref asfdoc_sam0_system_pinmux_extra_errata
184  *  - \ref asfdoc_sam0_system_pinmux_extra_history
185  *
186  *
187  * \section asfdoc_sam0_system_pinmux_examples Examples
188  *
189  * For a list of examples related to this driver, see
190  * \ref asfdoc_sam0_system_pinmux_exqsg.
191  *
192  *
193  * \section asfdoc_sam0_system_pinmux_api_overview API Overview
194  * @{
195  */
196 
197 #include <compiler.h>
198 
199 #ifdef __cplusplus
200 extern "C" {
201 #endif
202 
203 /*@{*/
204 #if (SAML21) || (SAMC20) || (SAMC21) || (SAMD21) || (SAMD10) || (SAMD11) || (SAMR30) || defined(__DOXYGEN__)
205 /** Output Driver Strength Selection feature support */
206 #  define FEATURE_SYSTEM_PINMUX_DRIVE_STRENGTH
207 #endif
208 /*@}*/
209 
210 /** Peripheral multiplexer index to select GPIO mode for a pin */
211 #define SYSTEM_PINMUX_GPIO    (1 << 7)
212 
213 /**
214  * \brief Port pin direction configuration enum.
215  *
216  * Enum for the possible pin direction settings of the port pin configuration
217  * structure, to indicate the direction the pin should use.
218  */
219 enum system_pinmux_pin_dir {
220 	/** The pin's input buffer should be enabled, so that the pin state can
221 	 *  be read */
222 	SYSTEM_PINMUX_PIN_DIR_INPUT,
223 	/** The pin's output buffer should be enabled, so that the pin state can
224 	 *  be set (but not read back) */
225 	SYSTEM_PINMUX_PIN_DIR_OUTPUT,
226 	/** The pin's output and input buffers should both be enabled, so that the
227 	 *  pin state can be set and read back */
228 	SYSTEM_PINMUX_PIN_DIR_OUTPUT_WITH_READBACK,
229 };
230 
231 /**
232  * \brief Port pin input pull configuration enum.
233  *
234  * Enum for the possible pin pull settings of the port pin configuration
235  * structure, to indicate the type of logic level pull the pin should use.
236  */
237 enum system_pinmux_pin_pull {
238 	/** No logical pull should be applied to the pin */
239 	SYSTEM_PINMUX_PIN_PULL_NONE,
240 	/** Pin should be pulled up when idle */
241 	SYSTEM_PINMUX_PIN_PULL_UP,
242 	/** Pin should be pulled down when idle */
243 	SYSTEM_PINMUX_PIN_PULL_DOWN,
244 };
245 
246 /**
247  * \brief Port pin digital input sampling mode enum.
248  *
249  * Enum for the possible input sampling modes for the port pin configuration
250  * structure, to indicate the type of sampling a port pin should use.
251  */
252 enum system_pinmux_pin_sample {
253 	/** Pin input buffer should continuously sample the pin state */
254 	SYSTEM_PINMUX_PIN_SAMPLE_CONTINUOUS,
255 	/** Pin input buffer should be enabled when the IN register is read */
256 	SYSTEM_PINMUX_PIN_SAMPLE_ONDEMAND,
257 };
258 
259 /**
260  * \brief Port pin configuration structure.
261  *
262  * Configuration structure for a port pin instance. This structure should
263  * be initialized by the \ref system_pinmux_get_config_defaults() function
264  * before being modified by the user application.
265  */
266 struct system_pinmux_config {
267 	/** MUX index of the peripheral that should control the pin, if peripheral
268 	 *  control is desired. For GPIO use, this should be set to
269 	 *  \ref SYSTEM_PINMUX_GPIO. */
270 	uint8_t mux_position;
271 
272 	/** Port buffer input/output direction */
273 	enum system_pinmux_pin_dir direction;
274 
275 	/** Logic level pull of the input buffer */
276 	enum system_pinmux_pin_pull input_pull;
277 
278 	/** Enable lowest possible powerstate on the pin
279 	 *
280 	 *  \note All other configurations will be ignored, the pin will be disabled.
281 	 */
282 	bool powersave;
283 };
284 
285 /** \name Configuration and Initialization
286  * @{
287  */
288 
289 /**
290  * \brief Initializes a Port pin configuration structure to defaults.
291  *
292  * Initializes a given Port pin configuration structure to a set of
293  * known default values. This function should be called on all new
294  * instances of these configuration structures before being modified by the
295  * user application.
296  *
297  * The default configuration is as follows:
298  *  \li Non peripheral (i.e. GPIO) controlled
299  *  \li Input mode with internal pull-up enabled
300  *
301  * \param[out] config  Configuration structure to initialize to default values
302  */
system_pinmux_get_config_defaults(struct system_pinmux_config * const config)303 static inline void system_pinmux_get_config_defaults(
304 		struct system_pinmux_config *const config)
305 {
306 	/* Sanity check arguments */
307 	Assert(config);
308 
309 	/* Default configuration values */
310 	config->mux_position = SYSTEM_PINMUX_GPIO;
311 	config->direction    = SYSTEM_PINMUX_PIN_DIR_INPUT;
312 	config->input_pull   = SYSTEM_PINMUX_PIN_PULL_UP;
313 	config->powersave    = false;
314 }
315 
316 void system_pinmux_pin_set_config(
317 		const uint8_t gpio_pin,
318 		const struct system_pinmux_config *const config);
319 
320 void system_pinmux_group_set_config(
321 		PortGroup *const port,
322 		const uint32_t mask,
323 		const struct system_pinmux_config *const config);
324 
325 /** @} */
326 
327 /** \name Special Mode Configuration (Physical Group Orientated)
328  *  @{
329  */
330 
331 /**
332  * \brief Retrieves the PORT module group instance from a given GPIO pin number.
333  *
334  * Retrieves the PORT module group instance associated with a given logical
335  * GPIO pin number.
336  *
337  * \param[in] gpio_pin  Index of the GPIO pin to convert
338  *
339  * \return Base address of the associated PORT module.
340  */
system_pinmux_get_group_from_gpio_pin(const uint8_t gpio_pin)341 static inline PortGroup* system_pinmux_get_group_from_gpio_pin(
342 		const uint8_t gpio_pin)
343 {
344 	uint8_t port_index  = (gpio_pin / 128);
345 	uint8_t group_index = (gpio_pin / 32);
346 
347 	/* Array of available ports */
348 	Port *const ports[PORT_INST_NUM] = PORT_INSTS;
349 
350 	if (port_index < PORT_INST_NUM) {
351 		return &(ports[port_index]->Group[group_index]);
352 	} else {
353 		Assert(false);
354 		return NULL;
355 	}
356 }
357 
358 void system_pinmux_group_set_input_sample_mode(
359 		PortGroup *const port,
360 		const uint32_t mask,
361 		const enum system_pinmux_pin_sample mode);
362 
363 /** @} */
364 
365 /** \name Special Mode Configuration (Logical Pin Orientated)
366  *  @{
367  */
368 
369 /**
370  * \brief Retrieves the currently selected MUX position of a logical pin.
371  *
372  * Retrieves the selected MUX peripheral on a given logical GPIO pin.
373  *
374  * \param[in]  gpio_pin  Index of the GPIO pin to configure
375  *
376  * \return Currently selected peripheral index on the specified pin.
377  */
system_pinmux_pin_get_mux_position(const uint8_t gpio_pin)378 static inline uint8_t system_pinmux_pin_get_mux_position(
379 		const uint8_t gpio_pin)
380 {
381 	PortGroup *const port = system_pinmux_get_group_from_gpio_pin(gpio_pin);
382 	uint32_t pin_index = (gpio_pin % 32);
383 
384 	if (!(port->PINCFG[pin_index].reg & PORT_PINCFG_PMUXEN)) {
385 		return SYSTEM_PINMUX_GPIO;
386 	}
387 
388 	uint32_t pmux_reg = port->PMUX[pin_index / 2].reg;
389 
390 	if (pin_index & 1) {
391 		return (pmux_reg & PORT_PMUX_PMUXO_Msk) >> PORT_PMUX_PMUXO_Pos;
392 	}
393 	else {
394 		return (pmux_reg & PORT_PMUX_PMUXE_Msk) >> PORT_PMUX_PMUXE_Pos;
395 	}
396 }
397 
398 /**
399  * \brief Configures the input sampling mode for a GPIO pin.
400  *
401  * Configures the input sampling mode for a GPIO input, to
402  * control when the physical I/O pin value is sampled and
403  * stored inside the microcontroller.
404  *
405  * \param[in] gpio_pin Index of the GPIO pin to configure
406  * \param[in] mode     New pin sampling mode to configure
407  */
system_pinmux_pin_set_input_sample_mode(const uint8_t gpio_pin,const enum system_pinmux_pin_sample mode)408 static inline void system_pinmux_pin_set_input_sample_mode(
409 		const uint8_t gpio_pin,
410 		const enum system_pinmux_pin_sample mode)
411 {
412 	PortGroup* const port = system_pinmux_get_group_from_gpio_pin(gpio_pin);
413 	uint32_t pin_index = (gpio_pin % 32);
414 
415 	if (mode == SYSTEM_PINMUX_PIN_SAMPLE_ONDEMAND) {
416 		port->CTRL.reg |= (1 << pin_index);
417 	} else {
418 		port->CTRL.reg &= ~(1 << pin_index);
419 	}
420 }
421 
422 /** @} */
423 
424 #ifdef FEATURE_SYSTEM_PINMUX_DRIVE_STRENGTH
425 /**
426  * \brief Port pin drive output strength enum.
427  *
428  * Enum for the possible output drive strengths for the port pin
429  * configuration structure, to indicate the driver strength the pin should
430  * use.
431  */
432 enum system_pinmux_pin_strength {
433   /** Normal output driver strength */
434   SYSTEM_PINMUX_PIN_STRENGTH_NORMAL,
435   /** High current output driver strength */
436   SYSTEM_PINMUX_PIN_STRENGTH_HIGH,
437 };
438 
439 /**
440  * \brief Configures the output driver strength mode for a GPIO pin.
441  *
442  * Configures the output drive strength for a GPIO output, to
443  * control the amount of current the pad is able to sink/source.
444  *
445  * \param[in] gpio_pin  Index of the GPIO pin to configure
446  * \param[in] mode      New output driver strength mode to configure
447  */
system_pinmux_pin_set_output_strength(const uint8_t gpio_pin,const enum system_pinmux_pin_strength mode)448 static inline void system_pinmux_pin_set_output_strength(
449     const uint8_t gpio_pin,
450     const enum system_pinmux_pin_strength mode)
451 {
452   PortGroup* const port = system_pinmux_get_group_from_gpio_pin(gpio_pin);
453   uint32_t pin_index = (gpio_pin % 32);
454 
455   if (mode == SYSTEM_PINMUX_PIN_STRENGTH_HIGH) {
456     port->PINCFG[pin_index].reg |=  PORT_PINCFG_DRVSTR;
457   }
458  else {
459     port->PINCFG[pin_index].reg &= ~PORT_PINCFG_DRVSTR;
460  }
461 }
462 
463 void system_pinmux_group_set_output_strength(
464     PortGroup *const port,
465     const uint32_t mask,
466     const enum system_pinmux_pin_strength mode);
467 #endif
468 
469 #ifdef FEATURE_SYSTEM_PINMUX_SLEWRATE_LIMITER
470 /**
471  * \brief Port pin output slew rate enum.
472  *
473  * Enum for the possible output drive slew rates for the port pin
474  * configuration structure, to indicate the driver slew rate the pin should
475  * use.
476  */
477 enum system_pinmux_pin_slew_rate {
478   /** Normal pin output slew rate */
479   SYSTEM_PINMUX_PIN_SLEW_RATE_NORMAL,
480   /** Enable slew rate limiter on the pin */
481   SYSTEM_PINMUX_PIN_SLEW_RATE_LIMITED,
482 };
483 
484 /**
485  * \brief Configures the output slew rate mode for a GPIO pin.
486  *
487  * Configures the output slew rate mode for a GPIO output, to
488  * control the speed at which the physical output pin can react to
489  * logical changes of the I/O pin value.
490  *
491  * \param[in] gpio_pin  Index of the GPIO pin to configure
492  * \param[in] mode      New pin slew rate mode to configure
493  */
system_pinmux_pin_set_output_slew_rate(const uint8_t gpio_pin,const enum system_pinmux_pin_slew_rate mode)494 static inline void system_pinmux_pin_set_output_slew_rate(
495     const uint8_t gpio_pin,
496     const enum system_pinmux_pin_slew_rate mode)
497 {
498   PortGroup* const port = system_pinmux_get_group_from_gpio_pin(gpio_pin);
499   uint32_t pin_index = (gpio_pin % 32);
500 
501   if (mode == SYSTEM_PINMUX_PIN_SLEW_RATE_LIMITED) {
502     port->PINCFG[pin_index].reg |=  PORT_PINCFG_SLEWLIM;
503   }
504   else {
505     port->PINCFG[pin_index].reg &= ~PORT_PINCFG_SLEWLIM;
506   }
507 }
508 
509 void system_pinmux_group_set_output_slew_rate(
510    PortGroup *const port,
511     const uint32_t mask,
512     const enum system_pinmux_pin_slew_rate mode);
513 #endif
514 
515 #ifdef FEATURE_SYSTEM_PINMUX_OPEN_DRAIN
516 /**
517  * \brief Port pin output drive mode enum.
518  *
519  * Enum for the possible output drive modes for the port pin configuration
520  * structure, to indicate the output mode the pin should use.
521  */
522 enum system_pinmux_pin_drive {
523   /** Use totem pole output drive mode */
524   SYSTEM_PINMUX_PIN_DRIVE_TOTEM,
525   /** Use open drain output drive mode */
526   SYSTEM_PINMUX_PIN_DRIVE_OPEN_DRAIN,
527 };
528 
529 /**
530  * \brief Configures the output driver mode for a GPIO pin.
531  *
532  * Configures the output driver mode for a GPIO output, to
533  * control the pad behavior.
534  *
535  * \param[in] gpio_pin  Index of the GPIO pin to configure
536  * \param[in] mode      New pad output driver mode to configure
537  */
system_pinmux_pin_set_output_drive(const uint8_t gpio_pin,const enum system_pinmux_pin_drive mode)538 static inline void system_pinmux_pin_set_output_drive(
539     const uint8_t gpio_pin,
540     const enum system_pinmux_pin_drive mode)
541 {
542   PortGroup* const port = system_pinmux_get_group_from_gpio_pin(gpio_pin);
543   uint32_t pin_index = (gpio_pin % 32);
544 
545   if (mode == SYSTEM_PINMUX_PIN_DRIVE_OPEN_DRAIN) {
546     port->PINCFG[pin_index].reg |=  PORT_PINCFG_ODRAIN;
547   }
548   else {
549     port->PINCFG[pin_index].reg &= ~PORT_PINCFG_ODRAIN;
550   }
551 }
552 
553 void system_pinmux_group_set_output_drive(
554     PortGroup *const port,
555     const uint32_t mask,
556     const enum system_pinmux_pin_drive mode);
557 #endif
558 
559 #ifdef __cplusplus
560 }
561 #endif
562 
563 /** @} */
564 
565 /**
566  * \page asfdoc_sam0_system_pinmux_extra Extra Information for SYSTEM PINMUX Driver
567  *
568  * \section asfdoc_sam0_system_pinmux_extra_acronyms Acronyms
569  * The table below presents the acronyms used in this module:
570  *
571  * <table>
572  *	<tr>
573  *		<th>Acronym</th>
574  *		<th>Description</th>
575  *	</tr>
576  *	<tr>
577  *		<td>GPIO</td>
578  *		<td>General Purpose Input/Output</td>
579  *	</tr>
580  *	<tr>
581  *		<td>MUX</td>
582  *		<td>Multiplexer</td>
583  *	</tr>
584  * </table>
585  *
586  *
587  * \section asfdoc_sam0_system_pinmux_extra_dependencies Dependencies
588  * This driver has the following dependencies:
589  *
590  *  - None
591  *
592  *
593  * \section asfdoc_sam0_system_pinmux_extra_errata Errata
594  * There are no errata related to this driver.
595  *
596  *
597  * \section asfdoc_sam0_system_pinmux_extra_history Module History
598  * An overview of the module history is presented in the table below, with
599  * details on the enhancements and fixes made to the module since its first
600  * release. The current version of this corresponds to the newest version in
601  * the table.
602  *
603  * <table>
604  *	<tr>
605  *		<th>Changelog</th>
606  *	</tr>
607  *	<tr>
608  *		<td>Removed code of open drain, slew limit and drive strength
609  *		features</td>
610  *	</tr>
611  *	<tr>
612  *		<td>Fixed broken sampling mode function implementations, which wrote
613  *		    corrupt configuration values to the device registers</td>
614  *	</tr>
615  *	<tr>
616  *		<td>Added missing NULL pointer asserts to the PORT driver functions</td>
617  *	</tr>
618  *	<tr>
619  *		<td>Initial Release</td>
620  *	</tr>
621  * </table>
622  */
623 
624 /**
625  * \page asfdoc_sam0_system_pinmux_exqsg Examples for SYSTEM PINMUX Driver
626  *
627  * This is a list of the available Quick Start guides (QSGs) and example
628  * applications for \ref asfdoc_sam0_system_pinmux_group. QSGs are simple
629  * examples with step-by-step instructions to configure and use this driver in a
630  * selection of use cases. Note that a QSG can be compiled as a standalone
631  * application or be added to the user application.
632  *
633  *  - \subpage asfdoc_sam0_system_pinmux_basic_use_case
634  *
635  * \page asfdoc_sam0_system_pinmux_document_revision_history Document Revision History
636  *
637  * <table>
638  *	<tr>
639  *		<th>Doc. Rev.</td>
640  *		<th>Date</td>
641  *		<th>Comments</td>
642  *	</tr>
643  *	<tr>
644  *		<td>42121F</td>
645  *		<td>12/2015</td>
646  *		<td>Added support for SAM L21/L22, SAM DA1, SAM D09, and SAM C20/C21</td>
647  *	</tr>
648  *	<tr>
649  *		<td>42121E</td>
650  *		<td>12/2014</td>
651  *		<td>Added support for SAM R21 and SAM D10/D11</td>
652  *	</tr>
653  *	<tr>
654  *		<td>42121D</td>
655  *		<td>01/2014</td>
656  *		<td>Added support for SAM D21</td>
657  *	</tr>
658  *	<tr>
659  *		<td>42121C</td>
660  *		<td>09/2013</td>
661  *		<td>Fixed incorrect documentation for the device pin sampling mode</td>
662  *	</tr>
663  *	<tr>
664  *		<td>42121B</td>
665  *		<td>06/2013</td>
666  *		<td>Corrected documentation typos</td>
667  *	</tr>
668  *	<tr>
669  *		<td>42121A</td>
670  *		<td>06/2013</td>
671  *		<td>Initial release</td>
672  *	</tr>
673  * </table>
674  */
675 
676 #endif
677