Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Dependents: SANFAN_read_analog_value nucleo-wdg Nucleo_sleep_copy
Fork of mbed-src by
Revision 592:a274ee790e56, committed 2015-07-17
- Comitter:
- mbed_official
- Date:
- Fri Jul 17 09:15:10 2015 +0100
- Parent:
- 591:474d026f7d79
- Child:
- 593:78ee8643776a
- Commit message:
- Synchronized with git revision e7144f83a8d75df80c4877936b6ffe552b0be9e6
Full URL: https://github.com/mbedmicro/mbed/commit/e7144f83a8d75df80c4877936b6ffe552b0be9e6/
More API implementation for SAMR21
Changed in this revision
--- a/targets/cmsis/TARGET_Atmel/TARGET_SAM21/TARGET_SAMD21J18A/TOOLCHAIN_GCC_ARM/samd21j18a.ld Wed Jul 15 08:15:08 2015 +0100
+++ b/targets/cmsis/TARGET_Atmel/TARGET_SAM21/TARGET_SAMD21J18A/TOOLCHAIN_GCC_ARM/samd21j18a.ld Fri Jul 17 09:15:10 2015 +0100
@@ -1,47 +1,3 @@
-/**
- * \file
- *
- * \brief Linker script for running in internal FLASH on the SAMD21J18A
- *
- * Copyright (c) 2014 Atmel Corporation. All rights reserved.
- *
- * \asf_license_start
- *
- * \page License
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- *
- * 1. Redistributions of source code must retain the above copyright notice,
- * this list of conditions and the following disclaimer.
- *
- * 2. Redistributions in binary form must reproduce the above copyright notice,
- * this list of conditions and the following disclaimer in the documentation
- * and/or other materials provided with the distribution.
- *
- * 3. The name of Atmel may not be used to endorse or promote products derived
- * from this software without specific prior written permission.
- *
- * 4. This software may only be redistributed and used in connection with an
- * Atmel microcontroller product.
- *
- * THIS SOFTWARE IS PROVIDED BY ATMEL "AS IS" AND ANY EXPRESS OR IMPLIED
- * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
- * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT ARE
- * EXPRESSLY AND SPECIFICALLY DISCLAIMED. IN NO EVENT SHALL ATMEL BE LIABLE FOR
- * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
- * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
- * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- * POSSIBILITY OF SUCH DAMAGE.
- *
- * \asf_license_stop
- *
- */
-
-
OUTPUT_FORMAT("elf32-littlearm", "elf32-littlearm", "elf32-littlearm")
OUTPUT_ARCH(arm)
SEARCH_DIR(.)
@@ -49,8 +5,8 @@
/* Memory Spaces Definitions */
MEMORY
{
- rom (rx) : ORIGIN = 0x00000000, LENGTH = 0x00040000
- ram (rwx) : ORIGIN = 0x20000000, LENGTH = 0x00008000
+ rom (rx) : ORIGIN = 0x00000000, LENGTH = 0x00040000
+ ram (rwx) : ORIGIN = 0x20000000, LENGTH = 0x00008000
}
/* The stack size used by the application. NOTE: you need to adjust according to your application. */
@@ -118,6 +74,13 @@
. = ALIGN(4);
_etext = .;
+
+ .dvectors (NOLOAD) :
+ {
+ _sdvectors = .;
+ . = . + 0xB0;
+ _edvectors = .;
+ } > ram
.relocate : AT (_etext)
{
@@ -142,6 +105,13 @@
_ezero = .;
} > ram
+ .heap (NOLOAD) :
+ {
+ . = ALIGN(4);
+ __end__ = . ;
+ . = ORIGIN(ram) + LENGTH(ram) - STACK_SIZE;
+ } > ram
+
/* stack section */
.stack (NOLOAD):
{
@@ -153,5 +123,4 @@
} > ram
. = ALIGN(4);
- _end = . ;
}
--- a/targets/cmsis/TARGET_Atmel/TARGET_SAM21/TARGET_SAMD21J18A/TOOLCHAIN_GCC_ARM/startup_samd21.c Wed Jul 15 08:15:08 2015 +0100 +++ b/targets/cmsis/TARGET_Atmel/TARGET_SAM21/TARGET_SAMD21J18A/TOOLCHAIN_GCC_ARM/startup_samd21.c Fri Jul 17 09:15:10 2015 +0100 @@ -1,46 +1,3 @@ -/** - * \file - * - * \brief gcc starttup file for SAMD21 - * - * Copyright (c) 2013-2014 Atmel Corporation. All rights reserved. - * - * \asf_license_start - * - * \page License - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are met: - * - * 1. Redistributions of source code must retain the above copyright notice, - * this list of conditions and the following disclaimer. - * - * 2. Redistributions in binary form must reproduce the above copyright notice, - * this list of conditions and the following disclaimer in the documentation - * and/or other materials provided with the distribution. - * - * 3. The name of Atmel may not be used to endorse or promote products derived - * from this software without specific prior written permission. - * - * 4. This software may only be redistributed and used in connection with an - * Atmel microcontroller product. - * - * THIS SOFTWARE IS PROVIDED BY ATMEL "AS IS" AND ANY EXPRESS OR IMPLIED - * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF - * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT ARE - * EXPRESSLY AND SPECIFICALLY DISCLAIMED. IN NO EVENT SHALL ATMEL BE LIABLE FOR - * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL - * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS - * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) - * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, - * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN - * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE - * POSSIBILITY OF SUCH DAMAGE. - * - * \asf_license_stop - * - */ - #include "samd21j18a.h" /* Initialize segments */
--- a/targets/cmsis/TARGET_Atmel/TARGET_SAM21/TARGET_SAMD21J18A/TOOLCHAIN_IAR/startup_samd21.c Wed Jul 15 08:15:08 2015 +0100 +++ b/targets/cmsis/TARGET_Atmel/TARGET_SAM21/TARGET_SAMD21J18A/TOOLCHAIN_IAR/startup_samd21.c Fri Jul 17 09:15:10 2015 +0100 @@ -1,44 +1,3 @@ -/** - * \file - * - * Copyright (c) 2013-2014 Atmel Corporation. All rights reserved. - * - * \asf_license_start - * - * \page License - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are met: - * - * 1. Redistributions of source code must retain the above copyright notice, - * this list of conditions and the following disclaimer. - * - * 2. Redistributions in binary form must reproduce the above copyright notice, - * this list of conditions and the following disclaimer in the documentation - * and/or other materials provided with the distribution. - * - * 3. The name of Atmel may not be used to endorse or promote products derived - * from this software without specific prior written permission. - * - * 4. This software may only be redistributed and used in connection with an - * Atmel microcontroller product. - * - * THIS SOFTWARE IS PROVIDED BY ATMEL "AS IS" AND ANY EXPRESS OR IMPLIED - * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF - * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT ARE - * EXPRESSLY AND SPECIFICALLY DISCLAIMED. IN NO EVENT SHALL ATMEL BE LIABLE FOR - * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL - * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS - * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) - * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, - * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN - * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE - * POSSIBILITY OF SUCH DAMAGE. - * - * \asf_license_stop - * - */ - #include "samd21.h" void __iar_program_start(void);
--- a/targets/cmsis/TARGET_Atmel/TARGET_SAM21/TARGET_SAMD21J18A/system_samd21.c Wed Jul 15 08:15:08 2015 +0100 +++ b/targets/cmsis/TARGET_Atmel/TARGET_SAM21/TARGET_SAMD21J18A/system_samd21.c Fri Jul 17 09:15:10 2015 +0100 @@ -1,50 +1,3 @@ -/** - * \file - * - * \brief Low-level initialization functions called upon chip startup. - * - * Copyright (c) 2013-2014 Atmel Corporation. All rights reserved. - * - * \asf_license_start - * - * \page License - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are met: - * - * 1. Redistributions of source code must retain the above copyright notice, - * this list of conditions and the following disclaimer. - * - * 2. Redistributions in binary form must reproduce the above copyright notice, - * this list of conditions and the following disclaimer in the documentation - * and/or other materials provided with the distribution. - * - * 3. The name of Atmel may not be used to endorse or promote products derived - * from this software without specific prior written permission. - * - * 4. This software may only be redistributed and used in connection with an - * Atmel microcontroller product. - * - * THIS SOFTWARE IS PROVIDED BY ATMEL "AS IS" AND ANY EXPRESS OR IMPLIED - * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF - * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT ARE - * EXPRESSLY AND SPECIFICALLY DISCLAIMED. IN NO EVENT SHALL ATMEL BE LIABLE FOR - * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL - * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS - * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) - * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, - * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN - * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE - * POSSIBILITY OF SUCH DAMAGE. - * - * \asf_license_stop - * - */ -/** -* Support and FAQ: visit <a href="http://www.atmel.com/design-support/">Atmel Support</a> -*/ - -//#include "samd21.h" #include "samd21j18a.h" /** * Initial system clock frequency. The System RC Oscillator (RCSYS) provides
--- a/targets/cmsis/TARGET_Atmel/TARGET_SAM21/TARGET_SAMD21J18A/system_samd21.h Wed Jul 15 08:15:08 2015 +0100 +++ b/targets/cmsis/TARGET_Atmel/TARGET_SAM21/TARGET_SAMD21J18A/system_samd21.h Fri Jul 17 09:15:10 2015 +0100 @@ -1,49 +1,3 @@ -/** - * \file - * - * \brief Low-level initialization functions called upon chip startup - * - * Copyright (c) 2013-2014 Atmel Corporation. All rights reserved. - * - * \asf_license_start - * - * \page License - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are met: - * - * 1. Redistributions of source code must retain the above copyright notice, - * this list of conditions and the following disclaimer. - * - * 2. Redistributions in binary form must reproduce the above copyright notice, - * this list of conditions and the following disclaimer in the documentation - * and/or other materials provided with the distribution. - * - * 3. The name of Atmel may not be used to endorse or promote products derived - * from this software without specific prior written permission. - * - * 4. This software may only be redistributed and used in connection with an - * Atmel microcontroller product. - * - * THIS SOFTWARE IS PROVIDED BY ATMEL "AS IS" AND ANY EXPRESS OR IMPLIED - * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF - * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT ARE - * EXPRESSLY AND SPECIFICALLY DISCLAIMED. IN NO EVENT SHALL ATMEL BE LIABLE FOR - * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL - * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS - * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) - * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, - * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN - * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE - * POSSIBILITY OF SUCH DAMAGE. - * - * \asf_license_stop - * - */ -/** -* Support and FAQ: visit <a href="http://www.atmel.com/design-support/">Atmel Support</a> -*/ - #ifndef _SYSTEM_SAMD21_H_INCLUDED_ #define _SYSTEM_SAMD21_H_INCLUDED_
--- a/targets/cmsis/TARGET_Atmel/TARGET_SAM21/TARGET_SAMR21G18A/TOOLCHAIN_GCC_ARM/samr21g18a.ld Wed Jul 15 08:15:08 2015 +0100
+++ b/targets/cmsis/TARGET_Atmel/TARGET_SAM21/TARGET_SAMR21G18A/TOOLCHAIN_GCC_ARM/samr21g18a.ld Fri Jul 17 09:15:10 2015 +0100
@@ -1,47 +1,3 @@
-/**
- * \file
- *
- * \brief Linker script for running in internal FLASH on the SAMR21G18A
- *
- * Copyright (c) 2014 Atmel Corporation. All rights reserved.
- *
- * \asf_license_start
- *
- * \page License
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- *
- * 1. Redistributions of source code must retain the above copyright notice,
- * this list of conditions and the following disclaimer.
- *
- * 2. Redistributions in binary form must reproduce the above copyright notice,
- * this list of conditions and the following disclaimer in the documentation
- * and/or other materials provided with the distribution.
- *
- * 3. The name of Atmel may not be used to endorse or promote products derived
- * from this software without specific prior written permission.
- *
- * 4. This software may only be redistributed and used in connection with an
- * Atmel microcontroller product.
- *
- * THIS SOFTWARE IS PROVIDED BY ATMEL "AS IS" AND ANY EXPRESS OR IMPLIED
- * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
- * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT ARE
- * EXPRESSLY AND SPECIFICALLY DISCLAIMED. IN NO EVENT SHALL ATMEL BE LIABLE FOR
- * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
- * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
- * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- * POSSIBILITY OF SUCH DAMAGE.
- *
- * \asf_license_stop
- *
- */
-
-
OUTPUT_FORMAT("elf32-littlearm", "elf32-littlearm", "elf32-littlearm")
OUTPUT_ARCH(arm)
SEARCH_DIR(.)
--- a/targets/cmsis/TARGET_Atmel/TARGET_SAM21/TARGET_SAMR21G18A/TOOLCHAIN_GCC_ARM/startup_samr21.c Wed Jul 15 08:15:08 2015 +0100 +++ b/targets/cmsis/TARGET_Atmel/TARGET_SAM21/TARGET_SAMR21G18A/TOOLCHAIN_GCC_ARM/startup_samr21.c Fri Jul 17 09:15:10 2015 +0100 @@ -1,49 +1,3 @@ -/** - * \file - * - * \brief gcc starttup file for SAMR21 - * - * Copyright (c) 2014 Atmel Corporation. All rights reserved. - * - * \asf_license_start - * - * \page License - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are met: - * - * 1. Redistributions of source code must retain the above copyright notice, - * this list of conditions and the following disclaimer. - * - * 2. Redistributions in binary form must reproduce the above copyright notice, - * this list of conditions and the following disclaimer in the documentation - * and/or other materials provided with the distribution. - * - * 3. The name of Atmel may not be used to endorse or promote products derived - * from this software without specific prior written permission. - * - * 4. This software may only be redistributed and used in connection with an - * Atmel microcontroller product. - * - * THIS SOFTWARE IS PROVIDED BY ATMEL "AS IS" AND ANY EXPRESS OR IMPLIED - * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF - * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT ARE - * EXPRESSLY AND SPECIFICALLY DISCLAIMED. IN NO EVENT SHALL ATMEL BE LIABLE FOR - * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL - * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS - * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) - * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, - * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN - * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE - * POSSIBILITY OF SUCH DAMAGE. - * - * \asf_license_stop - * - */ -/** -* Support and FAQ: visit <a href="http://www.atmel.com/design-support/">Atmel Support</a> -*/ - #include "samr21g18a.h" /* Initialize segments */
--- a/targets/cmsis/TARGET_Atmel/TARGET_SAM21/TARGET_SAMR21G18A/system_samr21.c Wed Jul 15 08:15:08 2015 +0100 +++ b/targets/cmsis/TARGET_Atmel/TARGET_SAM21/TARGET_SAMR21G18A/system_samr21.c Fri Jul 17 09:15:10 2015 +0100 @@ -1,49 +1,3 @@ -/** - * \file - * - * \brief Low-level initialization functions called upon chip startup. - * - * Copyright (c) 2014 Atmel Corporation. All rights reserved. - * - * \asf_license_start - * - * \page License - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are met: - * - * 1. Redistributions of source code must retain the above copyright notice, - * this list of conditions and the following disclaimer. - * - * 2. Redistributions in binary form must reproduce the above copyright notice, - * this list of conditions and the following disclaimer in the documentation - * and/or other materials provided with the distribution. - * - * 3. The name of Atmel may not be used to endorse or promote products derived - * from this software without specific prior written permission. - * - * 4. This software may only be redistributed and used in connection with an - * Atmel microcontroller product. - * - * THIS SOFTWARE IS PROVIDED BY ATMEL "AS IS" AND ANY EXPRESS OR IMPLIED - * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF - * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT ARE - * EXPRESSLY AND SPECIFICALLY DISCLAIMED. IN NO EVENT SHALL ATMEL BE LIABLE FOR - * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL - * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS - * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) - * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, - * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN - * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE - * POSSIBILITY OF SUCH DAMAGE. - * - * \asf_license_stop - * - */ -/** -* Support and FAQ: visit <a href="http://www.atmel.com/design-support/">Atmel Support</a> -*/ - #include "samr21g18a.h" /**
--- a/targets/cmsis/TARGET_Atmel/TARGET_SAM21/TARGET_SAMR21G18A/system_samr21.h Wed Jul 15 08:15:08 2015 +0100 +++ b/targets/cmsis/TARGET_Atmel/TARGET_SAM21/TARGET_SAMR21G18A/system_samr21.h Fri Jul 17 09:15:10 2015 +0100 @@ -1,49 +1,3 @@ -/** - * \file - * - * \brief Low-level initialization functions called upon chip startup - * - * Copyright (c) 2014 Atmel Corporation. All rights reserved. - * - * \asf_license_start - * - * \page License - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are met: - * - * 1. Redistributions of source code must retain the above copyright notice, - * this list of conditions and the following disclaimer. - * - * 2. Redistributions in binary form must reproduce the above copyright notice, - * this list of conditions and the following disclaimer in the documentation - * and/or other materials provided with the distribution. - * - * 3. The name of Atmel may not be used to endorse or promote products derived - * from this software without specific prior written permission. - * - * 4. This software may only be redistributed and used in connection with an - * Atmel microcontroller product. - * - * THIS SOFTWARE IS PROVIDED BY ATMEL "AS IS" AND ANY EXPRESS OR IMPLIED - * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF - * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT ARE - * EXPRESSLY AND SPECIFICALLY DISCLAIMED. IN NO EVENT SHALL ATMEL BE LIABLE FOR - * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL - * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS - * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) - * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, - * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN - * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE - * POSSIBILITY OF SUCH DAMAGE. - * - * \asf_license_stop - * - */ -/** -* Support and FAQ: visit <a href="http://www.atmel.com/design-support/">Atmel Support</a> -*/ - #ifndef _SYSTEM_SAMR21_H_INCLUDED_ #define _SYSTEM_SAMR21_H_INCLUDED_
--- a/targets/cmsis/TARGET_Atmel/TARGET_SAM21/utils/cmsis/samd21/include/component/comp_ac.h Wed Jul 15 08:15:08 2015 +0100 +++ b/targets/cmsis/TARGET_Atmel/TARGET_SAM21/utils/cmsis/samd21/include/component/comp_ac.h Fri Jul 17 09:15:10 2015 +0100 @@ -1,49 +1,3 @@ -/** - * \file - * - * \brief Component description for AC - * - * Copyright (c) 2014 Atmel Corporation. All rights reserved. - * - * \asf_license_start - * - * \page License - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are met: - * - * 1. Redistributions of source code must retain the above copyright notice, - * this list of conditions and the following disclaimer. - * - * 2. Redistributions in binary form must reproduce the above copyright notice, - * this list of conditions and the following disclaimer in the documentation - * and/or other materials provided with the distribution. - * - * 3. The name of Atmel may not be used to endorse or promote products derived - * from this software without specific prior written permission. - * - * 4. This software may only be redistributed and used in connection with an - * Atmel microcontroller product. - * - * THIS SOFTWARE IS PROVIDED BY ATMEL "AS IS" AND ANY EXPRESS OR IMPLIED - * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF - * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT ARE - * EXPRESSLY AND SPECIFICALLY DISCLAIMED. IN NO EVENT SHALL ATMEL BE LIABLE FOR - * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL - * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS - * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) - * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, - * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN - * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE - * POSSIBILITY OF SUCH DAMAGE. - * - * \asf_license_stop - * - */ -/** -* Support and FAQ: visit <a href="http://www.atmel.com/design-support/">Atmel Support</a> -*/ - #ifndef _SAMD21_AC_COMPONENT_ #define _SAMD21_AC_COMPONENT_
--- a/targets/cmsis/TARGET_Atmel/TARGET_SAM21/utils/cmsis/samd21/include/component/comp_adc.h Wed Jul 15 08:15:08 2015 +0100 +++ b/targets/cmsis/TARGET_Atmel/TARGET_SAM21/utils/cmsis/samd21/include/component/comp_adc.h Fri Jul 17 09:15:10 2015 +0100 @@ -1,49 +1,3 @@ -/** - * \file - * - * \brief Component description for ADC - * - * Copyright (c) 2014 Atmel Corporation. All rights reserved. - * - * \asf_license_start - * - * \page License - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are met: - * - * 1. Redistributions of source code must retain the above copyright notice, - * this list of conditions and the following disclaimer. - * - * 2. Redistributions in binary form must reproduce the above copyright notice, - * this list of conditions and the following disclaimer in the documentation - * and/or other materials provided with the distribution. - * - * 3. The name of Atmel may not be used to endorse or promote products derived - * from this software without specific prior written permission. - * - * 4. This software may only be redistributed and used in connection with an - * Atmel microcontroller product. - * - * THIS SOFTWARE IS PROVIDED BY ATMEL "AS IS" AND ANY EXPRESS OR IMPLIED - * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF - * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT ARE - * EXPRESSLY AND SPECIFICALLY DISCLAIMED. IN NO EVENT SHALL ATMEL BE LIABLE FOR - * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL - * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS - * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) - * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, - * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN - * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE - * POSSIBILITY OF SUCH DAMAGE. - * - * \asf_license_stop - * - */ -/** -* Support and FAQ: visit <a href="http://www.atmel.com/design-support/">Atmel Support</a> -*/ - #ifndef _SAMD21_ADC_COMPONENT_ #define _SAMD21_ADC_COMPONENT_
--- a/targets/cmsis/TARGET_Atmel/TARGET_SAM21/utils/cmsis/samd21/include/component/comp_dac.h Wed Jul 15 08:15:08 2015 +0100 +++ b/targets/cmsis/TARGET_Atmel/TARGET_SAM21/utils/cmsis/samd21/include/component/comp_dac.h Fri Jul 17 09:15:10 2015 +0100 @@ -1,49 +1,3 @@ -/** - * \file - * - * \brief Component description for DAC - * - * Copyright (c) 2014 Atmel Corporation. All rights reserved. - * - * \asf_license_start - * - * \page License - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are met: - * - * 1. Redistributions of source code must retain the above copyright notice, - * this list of conditions and the following disclaimer. - * - * 2. Redistributions in binary form must reproduce the above copyright notice, - * this list of conditions and the following disclaimer in the documentation - * and/or other materials provided with the distribution. - * - * 3. The name of Atmel may not be used to endorse or promote products derived - * from this software without specific prior written permission. - * - * 4. This software may only be redistributed and used in connection with an - * Atmel microcontroller product. - * - * THIS SOFTWARE IS PROVIDED BY ATMEL "AS IS" AND ANY EXPRESS OR IMPLIED - * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF - * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT ARE - * EXPRESSLY AND SPECIFICALLY DISCLAIMED. IN NO EVENT SHALL ATMEL BE LIABLE FOR - * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL - * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS - * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) - * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, - * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN - * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE - * POSSIBILITY OF SUCH DAMAGE. - * - * \asf_license_stop - * - */ -/** -* Support and FAQ: visit <a href="http://www.atmel.com/design-support/">Atmel Support</a> -*/ - #ifndef _SAMD21_DAC_COMPONENT_ #define _SAMD21_DAC_COMPONENT_
--- a/targets/cmsis/TARGET_Atmel/TARGET_SAM21/utils/cmsis/samd21/include/component/comp_dmac.h Wed Jul 15 08:15:08 2015 +0100 +++ b/targets/cmsis/TARGET_Atmel/TARGET_SAM21/utils/cmsis/samd21/include/component/comp_dmac.h Fri Jul 17 09:15:10 2015 +0100 @@ -1,49 +1,3 @@ -/** - * \file - * - * \brief Component description for DMAC - * - * Copyright (c) 2014 Atmel Corporation. All rights reserved. - * - * \asf_license_start - * - * \page License - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are met: - * - * 1. Redistributions of source code must retain the above copyright notice, - * this list of conditions and the following disclaimer. - * - * 2. Redistributions in binary form must reproduce the above copyright notice, - * this list of conditions and the following disclaimer in the documentation - * and/or other materials provided with the distribution. - * - * 3. The name of Atmel may not be used to endorse or promote products derived - * from this software without specific prior written permission. - * - * 4. This software may only be redistributed and used in connection with an - * Atmel microcontroller product. - * - * THIS SOFTWARE IS PROVIDED BY ATMEL "AS IS" AND ANY EXPRESS OR IMPLIED - * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF - * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT ARE - * EXPRESSLY AND SPECIFICALLY DISCLAIMED. IN NO EVENT SHALL ATMEL BE LIABLE FOR - * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL - * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS - * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) - * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, - * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN - * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE - * POSSIBILITY OF SUCH DAMAGE. - * - * \asf_license_stop - * - */ -/** -* Support and FAQ: visit <a href="http://www.atmel.com/design-support/">Atmel Support</a> -*/ - #ifndef _SAMD21_DMAC_COMPONENT_ #define _SAMD21_DMAC_COMPONENT_
--- a/targets/cmsis/TARGET_Atmel/TARGET_SAM21/utils/cmsis/samd21/include/component/comp_dsu.h Wed Jul 15 08:15:08 2015 +0100 +++ b/targets/cmsis/TARGET_Atmel/TARGET_SAM21/utils/cmsis/samd21/include/component/comp_dsu.h Fri Jul 17 09:15:10 2015 +0100 @@ -1,49 +1,3 @@ -/** - * \file - * - * \brief Component description for DSU - * - * Copyright (c) 2014 Atmel Corporation. All rights reserved. - * - * \asf_license_start - * - * \page License - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are met: - * - * 1. Redistributions of source code must retain the above copyright notice, - * this list of conditions and the following disclaimer. - * - * 2. Redistributions in binary form must reproduce the above copyright notice, - * this list of conditions and the following disclaimer in the documentation - * and/or other materials provided with the distribution. - * - * 3. The name of Atmel may not be used to endorse or promote products derived - * from this software without specific prior written permission. - * - * 4. This software may only be redistributed and used in connection with an - * Atmel microcontroller product. - * - * THIS SOFTWARE IS PROVIDED BY ATMEL "AS IS" AND ANY EXPRESS OR IMPLIED - * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF - * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT ARE - * EXPRESSLY AND SPECIFICALLY DISCLAIMED. IN NO EVENT SHALL ATMEL BE LIABLE FOR - * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL - * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS - * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) - * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, - * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN - * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE - * POSSIBILITY OF SUCH DAMAGE. - * - * \asf_license_stop - * - */ -/** -* Support and FAQ: visit <a href="http://www.atmel.com/design-support/">Atmel Support</a> -*/ - #ifndef _SAMD21_DSU_COMPONENT_ #define _SAMD21_DSU_COMPONENT_
--- a/targets/cmsis/TARGET_Atmel/TARGET_SAM21/utils/cmsis/samd21/include/component/comp_eic.h Wed Jul 15 08:15:08 2015 +0100 +++ b/targets/cmsis/TARGET_Atmel/TARGET_SAM21/utils/cmsis/samd21/include/component/comp_eic.h Fri Jul 17 09:15:10 2015 +0100 @@ -1,49 +1,3 @@ -/** - * \file - * - * \brief Component description for EIC - * - * Copyright (c) 2014 Atmel Corporation. All rights reserved. - * - * \asf_license_start - * - * \page License - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are met: - * - * 1. Redistributions of source code must retain the above copyright notice, - * this list of conditions and the following disclaimer. - * - * 2. Redistributions in binary form must reproduce the above copyright notice, - * this list of conditions and the following disclaimer in the documentation - * and/or other materials provided with the distribution. - * - * 3. The name of Atmel may not be used to endorse or promote products derived - * from this software without specific prior written permission. - * - * 4. This software may only be redistributed and used in connection with an - * Atmel microcontroller product. - * - * THIS SOFTWARE IS PROVIDED BY ATMEL "AS IS" AND ANY EXPRESS OR IMPLIED - * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF - * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT ARE - * EXPRESSLY AND SPECIFICALLY DISCLAIMED. IN NO EVENT SHALL ATMEL BE LIABLE FOR - * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL - * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS - * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) - * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, - * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN - * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE - * POSSIBILITY OF SUCH DAMAGE. - * - * \asf_license_stop - * - */ -/** -* Support and FAQ: visit <a href="http://www.atmel.com/design-support/">Atmel Support</a> -*/ - #ifndef _SAMD21_EIC_COMPONENT_ #define _SAMD21_EIC_COMPONENT_
--- a/targets/cmsis/TARGET_Atmel/TARGET_SAM21/utils/cmsis/samd21/include/component/comp_evsys.h Wed Jul 15 08:15:08 2015 +0100 +++ b/targets/cmsis/TARGET_Atmel/TARGET_SAM21/utils/cmsis/samd21/include/component/comp_evsys.h Fri Jul 17 09:15:10 2015 +0100 @@ -1,49 +1,3 @@ -/** - * \file - * - * \brief Component description for EVSYS - * - * Copyright (c) 2014 Atmel Corporation. All rights reserved. - * - * \asf_license_start - * - * \page License - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are met: - * - * 1. Redistributions of source code must retain the above copyright notice, - * this list of conditions and the following disclaimer. - * - * 2. Redistributions in binary form must reproduce the above copyright notice, - * this list of conditions and the following disclaimer in the documentation - * and/or other materials provided with the distribution. - * - * 3. The name of Atmel may not be used to endorse or promote products derived - * from this software without specific prior written permission. - * - * 4. This software may only be redistributed and used in connection with an - * Atmel microcontroller product. - * - * THIS SOFTWARE IS PROVIDED BY ATMEL "AS IS" AND ANY EXPRESS OR IMPLIED - * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF - * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT ARE - * EXPRESSLY AND SPECIFICALLY DISCLAIMED. IN NO EVENT SHALL ATMEL BE LIABLE FOR - * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL - * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS - * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) - * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, - * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN - * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE - * POSSIBILITY OF SUCH DAMAGE. - * - * \asf_license_stop - * - */ -/** -* Support and FAQ: visit <a href="http://www.atmel.com/design-support/">Atmel Support</a> -*/ - #ifndef _SAMD21_EVSYS_COMPONENT_ #define _SAMD21_EVSYS_COMPONENT_
--- a/targets/cmsis/TARGET_Atmel/TARGET_SAM21/utils/cmsis/samd21/include/component/comp_gclk.h Wed Jul 15 08:15:08 2015 +0100 +++ b/targets/cmsis/TARGET_Atmel/TARGET_SAM21/utils/cmsis/samd21/include/component/comp_gclk.h Fri Jul 17 09:15:10 2015 +0100 @@ -1,49 +1,3 @@ -/** - * \file - * - * \brief Component description for GCLK - * - * Copyright (c) 2014 Atmel Corporation. All rights reserved. - * - * \asf_license_start - * - * \page License - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are met: - * - * 1. Redistributions of source code must retain the above copyright notice, - * this list of conditions and the following disclaimer. - * - * 2. Redistributions in binary form must reproduce the above copyright notice, - * this list of conditions and the following disclaimer in the documentation - * and/or other materials provided with the distribution. - * - * 3. The name of Atmel may not be used to endorse or promote products derived - * from this software without specific prior written permission. - * - * 4. This software may only be redistributed and used in connection with an - * Atmel microcontroller product. - * - * THIS SOFTWARE IS PROVIDED BY ATMEL "AS IS" AND ANY EXPRESS OR IMPLIED - * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF - * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT ARE - * EXPRESSLY AND SPECIFICALLY DISCLAIMED. IN NO EVENT SHALL ATMEL BE LIABLE FOR - * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL - * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS - * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) - * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, - * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN - * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE - * POSSIBILITY OF SUCH DAMAGE. - * - * \asf_license_stop - * - */ -/** -* Support and FAQ: visit <a href="http://www.atmel.com/design-support/">Atmel Support</a> -*/ - #ifndef _SAMD21_GCLK_COMPONENT_ #define _SAMD21_GCLK_COMPONENT_
--- a/targets/cmsis/TARGET_Atmel/TARGET_SAM21/utils/cmsis/samd21/include/component/comp_hmatrixb.h Wed Jul 15 08:15:08 2015 +0100 +++ b/targets/cmsis/TARGET_Atmel/TARGET_SAM21/utils/cmsis/samd21/include/component/comp_hmatrixb.h Fri Jul 17 09:15:10 2015 +0100 @@ -1,49 +1,3 @@ -/** - * \file - * - * \brief Component description for HMATRIXB - * - * Copyright (c) 2014 Atmel Corporation. All rights reserved. - * - * \asf_license_start - * - * \page License - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are met: - * - * 1. Redistributions of source code must retain the above copyright notice, - * this list of conditions and the following disclaimer. - * - * 2. Redistributions in binary form must reproduce the above copyright notice, - * this list of conditions and the following disclaimer in the documentation - * and/or other materials provided with the distribution. - * - * 3. The name of Atmel may not be used to endorse or promote products derived - * from this software without specific prior written permission. - * - * 4. This software may only be redistributed and used in connection with an - * Atmel microcontroller product. - * - * THIS SOFTWARE IS PROVIDED BY ATMEL "AS IS" AND ANY EXPRESS OR IMPLIED - * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF - * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT ARE - * EXPRESSLY AND SPECIFICALLY DISCLAIMED. IN NO EVENT SHALL ATMEL BE LIABLE FOR - * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL - * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS - * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) - * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, - * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN - * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE - * POSSIBILITY OF SUCH DAMAGE. - * - * \asf_license_stop - * - */ -/** -* Support and FAQ: visit <a href="http://www.atmel.com/design-support/">Atmel Support</a> -*/ - #ifndef _SAMD21_HMATRIXB_COMPONENT_ #define _SAMD21_HMATRIXB_COMPONENT_
--- a/targets/cmsis/TARGET_Atmel/TARGET_SAM21/utils/cmsis/samd21/include/component/comp_i2s.h Wed Jul 15 08:15:08 2015 +0100 +++ b/targets/cmsis/TARGET_Atmel/TARGET_SAM21/utils/cmsis/samd21/include/component/comp_i2s.h Fri Jul 17 09:15:10 2015 +0100 @@ -1,49 +1,3 @@ -/** - * \file - * - * \brief Component description for I2S - * - * Copyright (c) 2014 Atmel Corporation. All rights reserved. - * - * \asf_license_start - * - * \page License - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are met: - * - * 1. Redistributions of source code must retain the above copyright notice, - * this list of conditions and the following disclaimer. - * - * 2. Redistributions in binary form must reproduce the above copyright notice, - * this list of conditions and the following disclaimer in the documentation - * and/or other materials provided with the distribution. - * - * 3. The name of Atmel may not be used to endorse or promote products derived - * from this software without specific prior written permission. - * - * 4. This software may only be redistributed and used in connection with an - * Atmel microcontroller product. - * - * THIS SOFTWARE IS PROVIDED BY ATMEL "AS IS" AND ANY EXPRESS OR IMPLIED - * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF - * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT ARE - * EXPRESSLY AND SPECIFICALLY DISCLAIMED. IN NO EVENT SHALL ATMEL BE LIABLE FOR - * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL - * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS - * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) - * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, - * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN - * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE - * POSSIBILITY OF SUCH DAMAGE. - * - * \asf_license_stop - * - */ -/** -* Support and FAQ: visit <a href="http://www.atmel.com/design-support/">Atmel Support</a> -*/ - #ifndef _SAMD21_I2S_COMPONENT_ #define _SAMD21_I2S_COMPONENT_
--- a/targets/cmsis/TARGET_Atmel/TARGET_SAM21/utils/cmsis/samd21/include/component/comp_mtb.h Wed Jul 15 08:15:08 2015 +0100 +++ b/targets/cmsis/TARGET_Atmel/TARGET_SAM21/utils/cmsis/samd21/include/component/comp_mtb.h Fri Jul 17 09:15:10 2015 +0100 @@ -1,49 +1,3 @@ -/** - * \file - * - * \brief Component description for MTB - * - * Copyright (c) 2014 Atmel Corporation. All rights reserved. - * - * \asf_license_start - * - * \page License - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are met: - * - * 1. Redistributions of source code must retain the above copyright notice, - * this list of conditions and the following disclaimer. - * - * 2. Redistributions in binary form must reproduce the above copyright notice, - * this list of conditions and the following disclaimer in the documentation - * and/or other materials provided with the distribution. - * - * 3. The name of Atmel may not be used to endorse or promote products derived - * from this software without specific prior written permission. - * - * 4. This software may only be redistributed and used in connection with an - * Atmel microcontroller product. - * - * THIS SOFTWARE IS PROVIDED BY ATMEL "AS IS" AND ANY EXPRESS OR IMPLIED - * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF - * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT ARE - * EXPRESSLY AND SPECIFICALLY DISCLAIMED. IN NO EVENT SHALL ATMEL BE LIABLE FOR - * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL - * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS - * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) - * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, - * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN - * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE - * POSSIBILITY OF SUCH DAMAGE. - * - * \asf_license_stop - * - */ -/** -* Support and FAQ: visit <a href="http://www.atmel.com/design-support/">Atmel Support</a> -*/ - #ifndef _SAMD21_MTB_COMPONENT_ #define _SAMD21_MTB_COMPONENT_
--- a/targets/cmsis/TARGET_Atmel/TARGET_SAM21/utils/cmsis/samd21/include/component/comp_nvmctrl.h Wed Jul 15 08:15:08 2015 +0100 +++ b/targets/cmsis/TARGET_Atmel/TARGET_SAM21/utils/cmsis/samd21/include/component/comp_nvmctrl.h Fri Jul 17 09:15:10 2015 +0100 @@ -1,49 +1,3 @@ -/** - * \file - * - * \brief Component description for NVMCTRL - * - * Copyright (c) 2014 Atmel Corporation. All rights reserved. - * - * \asf_license_start - * - * \page License - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are met: - * - * 1. Redistributions of source code must retain the above copyright notice, - * this list of conditions and the following disclaimer. - * - * 2. Redistributions in binary form must reproduce the above copyright notice, - * this list of conditions and the following disclaimer in the documentation - * and/or other materials provided with the distribution. - * - * 3. The name of Atmel may not be used to endorse or promote products derived - * from this software without specific prior written permission. - * - * 4. This software may only be redistributed and used in connection with an - * Atmel microcontroller product. - * - * THIS SOFTWARE IS PROVIDED BY ATMEL "AS IS" AND ANY EXPRESS OR IMPLIED - * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF - * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT ARE - * EXPRESSLY AND SPECIFICALLY DISCLAIMED. IN NO EVENT SHALL ATMEL BE LIABLE FOR - * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL - * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS - * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) - * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, - * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN - * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE - * POSSIBILITY OF SUCH DAMAGE. - * - * \asf_license_stop - * - */ -/** -* Support and FAQ: visit <a href="http://www.atmel.com/design-support/">Atmel Support</a> -*/ - #ifndef _SAMD21_NVMCTRL_COMPONENT_ #define _SAMD21_NVMCTRL_COMPONENT_
--- a/targets/cmsis/TARGET_Atmel/TARGET_SAM21/utils/cmsis/samd21/include/component/comp_pac.h Wed Jul 15 08:15:08 2015 +0100 +++ b/targets/cmsis/TARGET_Atmel/TARGET_SAM21/utils/cmsis/samd21/include/component/comp_pac.h Fri Jul 17 09:15:10 2015 +0100 @@ -1,49 +1,3 @@ -/** - * \file - * - * \brief Component description for PAC - * - * Copyright (c) 2014 Atmel Corporation. All rights reserved. - * - * \asf_license_start - * - * \page License - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are met: - * - * 1. Redistributions of source code must retain the above copyright notice, - * this list of conditions and the following disclaimer. - * - * 2. Redistributions in binary form must reproduce the above copyright notice, - * this list of conditions and the following disclaimer in the documentation - * and/or other materials provided with the distribution. - * - * 3. The name of Atmel may not be used to endorse or promote products derived - * from this software without specific prior written permission. - * - * 4. This software may only be redistributed and used in connection with an - * Atmel microcontroller product. - * - * THIS SOFTWARE IS PROVIDED BY ATMEL "AS IS" AND ANY EXPRESS OR IMPLIED - * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF - * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT ARE - * EXPRESSLY AND SPECIFICALLY DISCLAIMED. IN NO EVENT SHALL ATMEL BE LIABLE FOR - * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL - * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS - * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) - * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, - * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN - * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE - * POSSIBILITY OF SUCH DAMAGE. - * - * \asf_license_stop - * - */ -/** -* Support and FAQ: visit <a href="http://www.atmel.com/design-support/">Atmel Support</a> -*/ - #ifndef _SAMD21_PAC_COMPONENT_ #define _SAMD21_PAC_COMPONENT_
--- a/targets/cmsis/TARGET_Atmel/TARGET_SAM21/utils/cmsis/samd21/include/component/comp_pm.h Wed Jul 15 08:15:08 2015 +0100 +++ b/targets/cmsis/TARGET_Atmel/TARGET_SAM21/utils/cmsis/samd21/include/component/comp_pm.h Fri Jul 17 09:15:10 2015 +0100 @@ -1,49 +1,3 @@ -/** - * \file - * - * \brief Component description for PM - * - * Copyright (c) 2014 Atmel Corporation. All rights reserved. - * - * \asf_license_start - * - * \page License - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are met: - * - * 1. Redistributions of source code must retain the above copyright notice, - * this list of conditions and the following disclaimer. - * - * 2. Redistributions in binary form must reproduce the above copyright notice, - * this list of conditions and the following disclaimer in the documentation - * and/or other materials provided with the distribution. - * - * 3. The name of Atmel may not be used to endorse or promote products derived - * from this software without specific prior written permission. - * - * 4. This software may only be redistributed and used in connection with an - * Atmel microcontroller product. - * - * THIS SOFTWARE IS PROVIDED BY ATMEL "AS IS" AND ANY EXPRESS OR IMPLIED - * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF - * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT ARE - * EXPRESSLY AND SPECIFICALLY DISCLAIMED. IN NO EVENT SHALL ATMEL BE LIABLE FOR - * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL - * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS - * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) - * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, - * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN - * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE - * POSSIBILITY OF SUCH DAMAGE. - * - * \asf_license_stop - * - */ -/** -* Support and FAQ: visit <a href="http://www.atmel.com/design-support/">Atmel Support</a> -*/ - #ifndef _SAMD21_PM_COMPONENT_ #define _SAMD21_PM_COMPONENT_
--- a/targets/cmsis/TARGET_Atmel/TARGET_SAM21/utils/cmsis/samd21/include/component/comp_port.h Wed Jul 15 08:15:08 2015 +0100 +++ b/targets/cmsis/TARGET_Atmel/TARGET_SAM21/utils/cmsis/samd21/include/component/comp_port.h Fri Jul 17 09:15:10 2015 +0100 @@ -1,49 +1,3 @@ -/** - * \file - * - * \brief Component description for PORT - * - * Copyright (c) 2014 Atmel Corporation. All rights reserved. - * - * \asf_license_start - * - * \page License - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are met: - * - * 1. Redistributions of source code must retain the above copyright notice, - * this list of conditions and the following disclaimer. - * - * 2. Redistributions in binary form must reproduce the above copyright notice, - * this list of conditions and the following disclaimer in the documentation - * and/or other materials provided with the distribution. - * - * 3. The name of Atmel may not be used to endorse or promote products derived - * from this software without specific prior written permission. - * - * 4. This software may only be redistributed and used in connection with an - * Atmel microcontroller product. - * - * THIS SOFTWARE IS PROVIDED BY ATMEL "AS IS" AND ANY EXPRESS OR IMPLIED - * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF - * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT ARE - * EXPRESSLY AND SPECIFICALLY DISCLAIMED. IN NO EVENT SHALL ATMEL BE LIABLE FOR - * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL - * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS - * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) - * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, - * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN - * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE - * POSSIBILITY OF SUCH DAMAGE. - * - * \asf_license_stop - * - */ -/** -* Support and FAQ: visit <a href="http://www.atmel.com/design-support/">Atmel Support</a> -*/ - #ifndef _SAMD21_PORT_COMPONENT_ #define _SAMD21_PORT_COMPONENT_
--- a/targets/cmsis/TARGET_Atmel/TARGET_SAM21/utils/cmsis/samd21/include/component/comp_rfctrl.h Wed Jul 15 08:15:08 2015 +0100 +++ b/targets/cmsis/TARGET_Atmel/TARGET_SAM21/utils/cmsis/samd21/include/component/comp_rfctrl.h Fri Jul 17 09:15:10 2015 +0100 @@ -1,49 +1,3 @@ -/** - * \file - * - * \brief Component description for RFCTRL - * - * Copyright (c) 2014 Atmel Corporation. All rights reserved. - * - * \asf_license_start - * - * \page License - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are met: - * - * 1. Redistributions of source code must retain the above copyright notice, - * this list of conditions and the following disclaimer. - * - * 2. Redistributions in binary form must reproduce the above copyright notice, - * this list of conditions and the following disclaimer in the documentation - * and/or other materials provided with the distribution. - * - * 3. The name of Atmel may not be used to endorse or promote products derived - * from this software without specific prior written permission. - * - * 4. This software may only be redistributed and used in connection with an - * Atmel microcontroller product. - * - * THIS SOFTWARE IS PROVIDED BY ATMEL "AS IS" AND ANY EXPRESS OR IMPLIED - * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF - * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT ARE - * EXPRESSLY AND SPECIFICALLY DISCLAIMED. IN NO EVENT SHALL ATMEL BE LIABLE FOR - * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL - * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS - * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) - * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, - * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN - * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE - * POSSIBILITY OF SUCH DAMAGE. - * - * \asf_license_stop - * - */ -/** -* Support and FAQ: visit <a href="http://www.atmel.com/design-support/">Atmel Support</a> -*/ - #ifndef _SAMR21_RFCTRL_COMPONENT_ #define _SAMR21_RFCTRL_COMPONENT_
--- a/targets/cmsis/TARGET_Atmel/TARGET_SAM21/utils/cmsis/samd21/include/component/comp_rtc.h Wed Jul 15 08:15:08 2015 +0100 +++ b/targets/cmsis/TARGET_Atmel/TARGET_SAM21/utils/cmsis/samd21/include/component/comp_rtc.h Fri Jul 17 09:15:10 2015 +0100 @@ -1,49 +1,3 @@ -/** - * \file - * - * \brief Component description for RTC - * - * Copyright (c) 2014 Atmel Corporation. All rights reserved. - * - * \asf_license_start - * - * \page License - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are met: - * - * 1. Redistributions of source code must retain the above copyright notice, - * this list of conditions and the following disclaimer. - * - * 2. Redistributions in binary form must reproduce the above copyright notice, - * this list of conditions and the following disclaimer in the documentation - * and/or other materials provided with the distribution. - * - * 3. The name of Atmel may not be used to endorse or promote products derived - * from this software without specific prior written permission. - * - * 4. This software may only be redistributed and used in connection with an - * Atmel microcontroller product. - * - * THIS SOFTWARE IS PROVIDED BY ATMEL "AS IS" AND ANY EXPRESS OR IMPLIED - * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF - * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT ARE - * EXPRESSLY AND SPECIFICALLY DISCLAIMED. IN NO EVENT SHALL ATMEL BE LIABLE FOR - * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL - * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS - * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) - * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, - * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN - * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE - * POSSIBILITY OF SUCH DAMAGE. - * - * \asf_license_stop - * - */ -/** -* Support and FAQ: visit <a href="http://www.atmel.com/design-support/">Atmel Support</a> -*/ - #ifndef _SAMD21_RTC_COMPONENT_ #define _SAMD21_RTC_COMPONENT_
--- a/targets/cmsis/TARGET_Atmel/TARGET_SAM21/utils/cmsis/samd21/include/component/comp_sercom.h Wed Jul 15 08:15:08 2015 +0100 +++ b/targets/cmsis/TARGET_Atmel/TARGET_SAM21/utils/cmsis/samd21/include/component/comp_sercom.h Fri Jul 17 09:15:10 2015 +0100 @@ -1,49 +1,3 @@ -/** - * \file - * - * \brief Component description for SERCOM - * - * Copyright (c) 2014 Atmel Corporation. All rights reserved. - * - * \asf_license_start - * - * \page License - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are met: - * - * 1. Redistributions of source code must retain the above copyright notice, - * this list of conditions and the following disclaimer. - * - * 2. Redistributions in binary form must reproduce the above copyright notice, - * this list of conditions and the following disclaimer in the documentation - * and/or other materials provided with the distribution. - * - * 3. The name of Atmel may not be used to endorse or promote products derived - * from this software without specific prior written permission. - * - * 4. This software may only be redistributed and used in connection with an - * Atmel microcontroller product. - * - * THIS SOFTWARE IS PROVIDED BY ATMEL "AS IS" AND ANY EXPRESS OR IMPLIED - * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF - * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT ARE - * EXPRESSLY AND SPECIFICALLY DISCLAIMED. IN NO EVENT SHALL ATMEL BE LIABLE FOR - * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL - * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS - * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) - * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, - * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN - * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE - * POSSIBILITY OF SUCH DAMAGE. - * - * \asf_license_stop - * - */ -/** -* Support and FAQ: visit <a href="http://www.atmel.com/design-support/">Atmel Support</a> -*/ - #ifndef _SAMD21_SERCOM_COMPONENT_ #define _SAMD21_SERCOM_COMPONENT_
--- a/targets/cmsis/TARGET_Atmel/TARGET_SAM21/utils/cmsis/samd21/include/component/comp_sysctrl.h Wed Jul 15 08:15:08 2015 +0100 +++ b/targets/cmsis/TARGET_Atmel/TARGET_SAM21/utils/cmsis/samd21/include/component/comp_sysctrl.h Fri Jul 17 09:15:10 2015 +0100 @@ -1,49 +1,3 @@ -/** - * \file - * - * \brief Component description for SYSCTRL - * - * Copyright (c) 2014 Atmel Corporation. All rights reserved. - * - * \asf_license_start - * - * \page License - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are met: - * - * 1. Redistributions of source code must retain the above copyright notice, - * this list of conditions and the following disclaimer. - * - * 2. Redistributions in binary form must reproduce the above copyright notice, - * this list of conditions and the following disclaimer in the documentation - * and/or other materials provided with the distribution. - * - * 3. The name of Atmel may not be used to endorse or promote products derived - * from this software without specific prior written permission. - * - * 4. This software may only be redistributed and used in connection with an - * Atmel microcontroller product. - * - * THIS SOFTWARE IS PROVIDED BY ATMEL "AS IS" AND ANY EXPRESS OR IMPLIED - * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF - * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT ARE - * EXPRESSLY AND SPECIFICALLY DISCLAIMED. IN NO EVENT SHALL ATMEL BE LIABLE FOR - * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL - * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS - * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) - * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, - * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN - * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE - * POSSIBILITY OF SUCH DAMAGE. - * - * \asf_license_stop - * - */ -/** -* Support and FAQ: visit <a href="http://www.atmel.com/design-support/">Atmel Support</a> -*/ - #ifndef _SAMD21_SYSCTRL_COMPONENT_ #define _SAMD21_SYSCTRL_COMPONENT_
--- a/targets/cmsis/TARGET_Atmel/TARGET_SAM21/utils/cmsis/samd21/include/component/comp_tc.h Wed Jul 15 08:15:08 2015 +0100 +++ b/targets/cmsis/TARGET_Atmel/TARGET_SAM21/utils/cmsis/samd21/include/component/comp_tc.h Fri Jul 17 09:15:10 2015 +0100 @@ -1,49 +1,3 @@ -/** - * \file - * - * \brief Component description for TC - * - * Copyright (c) 2014 Atmel Corporation. All rights reserved. - * - * \asf_license_start - * - * \page License - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are met: - * - * 1. Redistributions of source code must retain the above copyright notice, - * this list of conditions and the following disclaimer. - * - * 2. Redistributions in binary form must reproduce the above copyright notice, - * this list of conditions and the following disclaimer in the documentation - * and/or other materials provided with the distribution. - * - * 3. The name of Atmel may not be used to endorse or promote products derived - * from this software without specific prior written permission. - * - * 4. This software may only be redistributed and used in connection with an - * Atmel microcontroller product. - * - * THIS SOFTWARE IS PROVIDED BY ATMEL "AS IS" AND ANY EXPRESS OR IMPLIED - * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF - * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT ARE - * EXPRESSLY AND SPECIFICALLY DISCLAIMED. IN NO EVENT SHALL ATMEL BE LIABLE FOR - * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL - * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS - * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) - * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, - * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN - * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE - * POSSIBILITY OF SUCH DAMAGE. - * - * \asf_license_stop - * - */ -/** -* Support and FAQ: visit <a href="http://www.atmel.com/design-support/">Atmel Support</a> -*/ - #ifndef _SAMD21_TC_COMPONENT_ #define _SAMD21_TC_COMPONENT_
--- a/targets/cmsis/TARGET_Atmel/TARGET_SAM21/utils/cmsis/samd21/include/component/comp_tcc.h Wed Jul 15 08:15:08 2015 +0100 +++ b/targets/cmsis/TARGET_Atmel/TARGET_SAM21/utils/cmsis/samd21/include/component/comp_tcc.h Fri Jul 17 09:15:10 2015 +0100 @@ -1,49 +1,3 @@ -/** - * \file - * - * \brief Component description for TCC - * - * Copyright (c) 2014 Atmel Corporation. All rights reserved. - * - * \asf_license_start - * - * \page License - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are met: - * - * 1. Redistributions of source code must retain the above copyright notice, - * this list of conditions and the following disclaimer. - * - * 2. Redistributions in binary form must reproduce the above copyright notice, - * this list of conditions and the following disclaimer in the documentation - * and/or other materials provided with the distribution. - * - * 3. The name of Atmel may not be used to endorse or promote products derived - * from this software without specific prior written permission. - * - * 4. This software may only be redistributed and used in connection with an - * Atmel microcontroller product. - * - * THIS SOFTWARE IS PROVIDED BY ATMEL "AS IS" AND ANY EXPRESS OR IMPLIED - * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF - * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT ARE - * EXPRESSLY AND SPECIFICALLY DISCLAIMED. IN NO EVENT SHALL ATMEL BE LIABLE FOR - * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL - * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS - * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) - * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, - * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN - * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE - * POSSIBILITY OF SUCH DAMAGE. - * - * \asf_license_stop - * - */ -/** -* Support and FAQ: visit <a href="http://www.atmel.com/design-support/">Atmel Support</a> -*/ - #ifndef _SAMD21_TCC_COMPONENT_ #define _SAMD21_TCC_COMPONENT_
--- a/targets/cmsis/TARGET_Atmel/TARGET_SAM21/utils/cmsis/samd21/include/component/comp_usb.h Wed Jul 15 08:15:08 2015 +0100 +++ b/targets/cmsis/TARGET_Atmel/TARGET_SAM21/utils/cmsis/samd21/include/component/comp_usb.h Fri Jul 17 09:15:10 2015 +0100 @@ -1,49 +1,3 @@ -/** - * \file - * - * \brief Component description for USB - * - * Copyright (c) 2014 Atmel Corporation. All rights reserved. - * - * \asf_license_start - * - * \page License - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are met: - * - * 1. Redistributions of source code must retain the above copyright notice, - * this list of conditions and the following disclaimer. - * - * 2. Redistributions in binary form must reproduce the above copyright notice, - * this list of conditions and the following disclaimer in the documentation - * and/or other materials provided with the distribution. - * - * 3. The name of Atmel may not be used to endorse or promote products derived - * from this software without specific prior written permission. - * - * 4. This software may only be redistributed and used in connection with an - * Atmel microcontroller product. - * - * THIS SOFTWARE IS PROVIDED BY ATMEL "AS IS" AND ANY EXPRESS OR IMPLIED - * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF - * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT ARE - * EXPRESSLY AND SPECIFICALLY DISCLAIMED. IN NO EVENT SHALL ATMEL BE LIABLE FOR - * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL - * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS - * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) - * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, - * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN - * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE - * POSSIBILITY OF SUCH DAMAGE. - * - * \asf_license_stop - * - */ -/** -* Support and FAQ: visit <a href="http://www.atmel.com/design-support/">Atmel Support</a> -*/ - #ifndef _SAMD21_USB_COMPONENT_ #define _SAMD21_USB_COMPONENT_
--- a/targets/cmsis/TARGET_Atmel/TARGET_SAM21/utils/cmsis/samd21/include/component/comp_wdt.h Wed Jul 15 08:15:08 2015 +0100 +++ b/targets/cmsis/TARGET_Atmel/TARGET_SAM21/utils/cmsis/samd21/include/component/comp_wdt.h Fri Jul 17 09:15:10 2015 +0100 @@ -1,49 +1,3 @@ -/** - * \file - * - * \brief Component description for WDT - * - * Copyright (c) 2014 Atmel Corporation. All rights reserved. - * - * \asf_license_start - * - * \page License - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are met: - * - * 1. Redistributions of source code must retain the above copyright notice, - * this list of conditions and the following disclaimer. - * - * 2. Redistributions in binary form must reproduce the above copyright notice, - * this list of conditions and the following disclaimer in the documentation - * and/or other materials provided with the distribution. - * - * 3. The name of Atmel may not be used to endorse or promote products derived - * from this software without specific prior written permission. - * - * 4. This software may only be redistributed and used in connection with an - * Atmel microcontroller product. - * - * THIS SOFTWARE IS PROVIDED BY ATMEL "AS IS" AND ANY EXPRESS OR IMPLIED - * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF - * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT ARE - * EXPRESSLY AND SPECIFICALLY DISCLAIMED. IN NO EVENT SHALL ATMEL BE LIABLE FOR - * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL - * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS - * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) - * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, - * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN - * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE - * POSSIBILITY OF SUCH DAMAGE. - * - * \asf_license_stop - * - */ -/** -* Support and FAQ: visit <a href="http://www.atmel.com/design-support/">Atmel Support</a> -*/ - #ifndef _SAMD21_WDT_COMPONENT_ #define _SAMD21_WDT_COMPONENT_
--- a/targets/cmsis/TARGET_Atmel/TARGET_SAM21/utils/cmsis/samd21/include/instance/ins_ac.h Wed Jul 15 08:15:08 2015 +0100 +++ b/targets/cmsis/TARGET_Atmel/TARGET_SAM21/utils/cmsis/samd21/include/instance/ins_ac.h Fri Jul 17 09:15:10 2015 +0100 @@ -1,49 +1,3 @@ -/** - * \file - * - * \brief Instance description for AC - * - * Copyright (c) 2014 Atmel Corporation. All rights reserved. - * - * \asf_license_start - * - * \page License - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are met: - * - * 1. Redistributions of source code must retain the above copyright notice, - * this list of conditions and the following disclaimer. - * - * 2. Redistributions in binary form must reproduce the above copyright notice, - * this list of conditions and the following disclaimer in the documentation - * and/or other materials provided with the distribution. - * - * 3. The name of Atmel may not be used to endorse or promote products derived - * from this software without specific prior written permission. - * - * 4. This software may only be redistributed and used in connection with an - * Atmel microcontroller product. - * - * THIS SOFTWARE IS PROVIDED BY ATMEL "AS IS" AND ANY EXPRESS OR IMPLIED - * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF - * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT ARE - * EXPRESSLY AND SPECIFICALLY DISCLAIMED. IN NO EVENT SHALL ATMEL BE LIABLE FOR - * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL - * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS - * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) - * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, - * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN - * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE - * POSSIBILITY OF SUCH DAMAGE. - * - * \asf_license_stop - * - */ -/** -* Support and FAQ: visit <a href="http://www.atmel.com/design-support/">Atmel Support</a> -*/ - #ifndef _SAMD21_AC_INSTANCE_ #define _SAMD21_AC_INSTANCE_
--- a/targets/cmsis/TARGET_Atmel/TARGET_SAM21/utils/cmsis/samd21/include/instance/ins_adc.h Wed Jul 15 08:15:08 2015 +0100 +++ b/targets/cmsis/TARGET_Atmel/TARGET_SAM21/utils/cmsis/samd21/include/instance/ins_adc.h Fri Jul 17 09:15:10 2015 +0100 @@ -1,49 +1,3 @@ -/** - * \file - * - * \brief Instance description for ADC - * - * Copyright (c) 2014 Atmel Corporation. All rights reserved. - * - * \asf_license_start - * - * \page License - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are met: - * - * 1. Redistributions of source code must retain the above copyright notice, - * this list of conditions and the following disclaimer. - * - * 2. Redistributions in binary form must reproduce the above copyright notice, - * this list of conditions and the following disclaimer in the documentation - * and/or other materials provided with the distribution. - * - * 3. The name of Atmel may not be used to endorse or promote products derived - * from this software without specific prior written permission. - * - * 4. This software may only be redistributed and used in connection with an - * Atmel microcontroller product. - * - * THIS SOFTWARE IS PROVIDED BY ATMEL "AS IS" AND ANY EXPRESS OR IMPLIED - * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF - * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT ARE - * EXPRESSLY AND SPECIFICALLY DISCLAIMED. IN NO EVENT SHALL ATMEL BE LIABLE FOR - * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL - * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS - * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) - * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, - * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN - * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE - * POSSIBILITY OF SUCH DAMAGE. - * - * \asf_license_stop - * - */ -/** -* Support and FAQ: visit <a href="http://www.atmel.com/design-support/">Atmel Support</a> -*/ - #ifndef _SAMD21_ADC_INSTANCE_ #define _SAMD21_ADC_INSTANCE_
--- a/targets/cmsis/TARGET_Atmel/TARGET_SAM21/utils/cmsis/samd21/include/instance/ins_dac.h Wed Jul 15 08:15:08 2015 +0100 +++ b/targets/cmsis/TARGET_Atmel/TARGET_SAM21/utils/cmsis/samd21/include/instance/ins_dac.h Fri Jul 17 09:15:10 2015 +0100 @@ -1,49 +1,3 @@ -/** - * \file - * - * \brief Instance description for DAC - * - * Copyright (c) 2014 Atmel Corporation. All rights reserved. - * - * \asf_license_start - * - * \page License - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are met: - * - * 1. Redistributions of source code must retain the above copyright notice, - * this list of conditions and the following disclaimer. - * - * 2. Redistributions in binary form must reproduce the above copyright notice, - * this list of conditions and the following disclaimer in the documentation - * and/or other materials provided with the distribution. - * - * 3. The name of Atmel may not be used to endorse or promote products derived - * from this software without specific prior written permission. - * - * 4. This software may only be redistributed and used in connection with an - * Atmel microcontroller product. - * - * THIS SOFTWARE IS PROVIDED BY ATMEL "AS IS" AND ANY EXPRESS OR IMPLIED - * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF - * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT ARE - * EXPRESSLY AND SPECIFICALLY DISCLAIMED. IN NO EVENT SHALL ATMEL BE LIABLE FOR - * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL - * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS - * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) - * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, - * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN - * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE - * POSSIBILITY OF SUCH DAMAGE. - * - * \asf_license_stop - * - */ -/** -* Support and FAQ: visit <a href="http://www.atmel.com/design-support/">Atmel Support</a> -*/ - #ifndef _SAMD21_DAC_INSTANCE_ #define _SAMD21_DAC_INSTANCE_
--- a/targets/cmsis/TARGET_Atmel/TARGET_SAM21/utils/cmsis/samd21/include/instance/ins_dmac.h Wed Jul 15 08:15:08 2015 +0100 +++ b/targets/cmsis/TARGET_Atmel/TARGET_SAM21/utils/cmsis/samd21/include/instance/ins_dmac.h Fri Jul 17 09:15:10 2015 +0100 @@ -1,49 +1,3 @@ -/** - * \file - * - * \brief Instance description for DMAC - * - * Copyright (c) 2014 Atmel Corporation. All rights reserved. - * - * \asf_license_start - * - * \page License - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are met: - * - * 1. Redistributions of source code must retain the above copyright notice, - * this list of conditions and the following disclaimer. - * - * 2. Redistributions in binary form must reproduce the above copyright notice, - * this list of conditions and the following disclaimer in the documentation - * and/or other materials provided with the distribution. - * - * 3. The name of Atmel may not be used to endorse or promote products derived - * from this software without specific prior written permission. - * - * 4. This software may only be redistributed and used in connection with an - * Atmel microcontroller product. - * - * THIS SOFTWARE IS PROVIDED BY ATMEL "AS IS" AND ANY EXPRESS OR IMPLIED - * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF - * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT ARE - * EXPRESSLY AND SPECIFICALLY DISCLAIMED. IN NO EVENT SHALL ATMEL BE LIABLE FOR - * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL - * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS - * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) - * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, - * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN - * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE - * POSSIBILITY OF SUCH DAMAGE. - * - * \asf_license_stop - * - */ -/** -* Support and FAQ: visit <a href="http://www.atmel.com/design-support/">Atmel Support</a> -*/ - #ifndef _SAMD21_DMAC_INSTANCE_ #define _SAMD21_DMAC_INSTANCE_
--- a/targets/cmsis/TARGET_Atmel/TARGET_SAM21/utils/cmsis/samd21/include/instance/ins_dsu.h Wed Jul 15 08:15:08 2015 +0100 +++ b/targets/cmsis/TARGET_Atmel/TARGET_SAM21/utils/cmsis/samd21/include/instance/ins_dsu.h Fri Jul 17 09:15:10 2015 +0100 @@ -1,49 +1,3 @@ -/** - * \file - * - * \brief Instance description for DSU - * - * Copyright (c) 2014 Atmel Corporation. All rights reserved. - * - * \asf_license_start - * - * \page License - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are met: - * - * 1. Redistributions of source code must retain the above copyright notice, - * this list of conditions and the following disclaimer. - * - * 2. Redistributions in binary form must reproduce the above copyright notice, - * this list of conditions and the following disclaimer in the documentation - * and/or other materials provided with the distribution. - * - * 3. The name of Atmel may not be used to endorse or promote products derived - * from this software without specific prior written permission. - * - * 4. This software may only be redistributed and used in connection with an - * Atmel microcontroller product. - * - * THIS SOFTWARE IS PROVIDED BY ATMEL "AS IS" AND ANY EXPRESS OR IMPLIED - * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF - * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT ARE - * EXPRESSLY AND SPECIFICALLY DISCLAIMED. IN NO EVENT SHALL ATMEL BE LIABLE FOR - * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL - * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS - * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) - * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, - * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN - * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE - * POSSIBILITY OF SUCH DAMAGE. - * - * \asf_license_stop - * - */ -/** -* Support and FAQ: visit <a href="http://www.atmel.com/design-support/">Atmel Support</a> -*/ - #ifndef _SAMD21_DSU_INSTANCE_ #define _SAMD21_DSU_INSTANCE_
--- a/targets/cmsis/TARGET_Atmel/TARGET_SAM21/utils/cmsis/samd21/include/instance/ins_eic.h Wed Jul 15 08:15:08 2015 +0100 +++ b/targets/cmsis/TARGET_Atmel/TARGET_SAM21/utils/cmsis/samd21/include/instance/ins_eic.h Fri Jul 17 09:15:10 2015 +0100 @@ -1,49 +1,3 @@ -/** - * \file - * - * \brief Instance description for EIC - * - * Copyright (c) 2014 Atmel Corporation. All rights reserved. - * - * \asf_license_start - * - * \page License - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are met: - * - * 1. Redistributions of source code must retain the above copyright notice, - * this list of conditions and the following disclaimer. - * - * 2. Redistributions in binary form must reproduce the above copyright notice, - * this list of conditions and the following disclaimer in the documentation - * and/or other materials provided with the distribution. - * - * 3. The name of Atmel may not be used to endorse or promote products derived - * from this software without specific prior written permission. - * - * 4. This software may only be redistributed and used in connection with an - * Atmel microcontroller product. - * - * THIS SOFTWARE IS PROVIDED BY ATMEL "AS IS" AND ANY EXPRESS OR IMPLIED - * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF - * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT ARE - * EXPRESSLY AND SPECIFICALLY DISCLAIMED. IN NO EVENT SHALL ATMEL BE LIABLE FOR - * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL - * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS - * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) - * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, - * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN - * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE - * POSSIBILITY OF SUCH DAMAGE. - * - * \asf_license_stop - * - */ -/** -* Support and FAQ: visit <a href="http://www.atmel.com/design-support/">Atmel Support</a> -*/ - #ifndef _SAMD21_EIC_INSTANCE_ #define _SAMD21_EIC_INSTANCE_
--- a/targets/cmsis/TARGET_Atmel/TARGET_SAM21/utils/cmsis/samd21/include/instance/ins_evsys.h Wed Jul 15 08:15:08 2015 +0100 +++ b/targets/cmsis/TARGET_Atmel/TARGET_SAM21/utils/cmsis/samd21/include/instance/ins_evsys.h Fri Jul 17 09:15:10 2015 +0100 @@ -1,49 +1,3 @@ -/** - * \file - * - * \brief Instance description for EVSYS - * - * Copyright (c) 2014 Atmel Corporation. All rights reserved. - * - * \asf_license_start - * - * \page License - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are met: - * - * 1. Redistributions of source code must retain the above copyright notice, - * this list of conditions and the following disclaimer. - * - * 2. Redistributions in binary form must reproduce the above copyright notice, - * this list of conditions and the following disclaimer in the documentation - * and/or other materials provided with the distribution. - * - * 3. The name of Atmel may not be used to endorse or promote products derived - * from this software without specific prior written permission. - * - * 4. This software may only be redistributed and used in connection with an - * Atmel microcontroller product. - * - * THIS SOFTWARE IS PROVIDED BY ATMEL "AS IS" AND ANY EXPRESS OR IMPLIED - * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF - * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT ARE - * EXPRESSLY AND SPECIFICALLY DISCLAIMED. IN NO EVENT SHALL ATMEL BE LIABLE FOR - * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL - * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS - * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) - * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, - * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN - * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE - * POSSIBILITY OF SUCH DAMAGE. - * - * \asf_license_stop - * - */ -/** -* Support and FAQ: visit <a href="http://www.atmel.com/design-support/">Atmel Support</a> -*/ - #ifndef _SAMD21_EVSYS_INSTANCE_ #define _SAMD21_EVSYS_INSTANCE_
--- a/targets/cmsis/TARGET_Atmel/TARGET_SAM21/utils/cmsis/samd21/include/instance/ins_gclk.h Wed Jul 15 08:15:08 2015 +0100 +++ b/targets/cmsis/TARGET_Atmel/TARGET_SAM21/utils/cmsis/samd21/include/instance/ins_gclk.h Fri Jul 17 09:15:10 2015 +0100 @@ -1,49 +1,3 @@ -/** - * \file - * - * \brief Instance description for GCLK - * - * Copyright (c) 2014 Atmel Corporation. All rights reserved. - * - * \asf_license_start - * - * \page License - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are met: - * - * 1. Redistributions of source code must retain the above copyright notice, - * this list of conditions and the following disclaimer. - * - * 2. Redistributions in binary form must reproduce the above copyright notice, - * this list of conditions and the following disclaimer in the documentation - * and/or other materials provided with the distribution. - * - * 3. The name of Atmel may not be used to endorse or promote products derived - * from this software without specific prior written permission. - * - * 4. This software may only be redistributed and used in connection with an - * Atmel microcontroller product. - * - * THIS SOFTWARE IS PROVIDED BY ATMEL "AS IS" AND ANY EXPRESS OR IMPLIED - * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF - * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT ARE - * EXPRESSLY AND SPECIFICALLY DISCLAIMED. IN NO EVENT SHALL ATMEL BE LIABLE FOR - * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL - * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS - * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) - * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, - * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN - * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE - * POSSIBILITY OF SUCH DAMAGE. - * - * \asf_license_stop - * - */ -/** -* Support and FAQ: visit <a href="http://www.atmel.com/design-support/">Atmel Support</a> -*/ - #ifndef _SAMD21_GCLK_INSTANCE_ #define _SAMD21_GCLK_INSTANCE_
--- a/targets/cmsis/TARGET_Atmel/TARGET_SAM21/utils/cmsis/samd21/include/instance/ins_i2s.h Wed Jul 15 08:15:08 2015 +0100 +++ b/targets/cmsis/TARGET_Atmel/TARGET_SAM21/utils/cmsis/samd21/include/instance/ins_i2s.h Fri Jul 17 09:15:10 2015 +0100 @@ -1,49 +1,3 @@ -/** - * \file - * - * \brief Instance description for I2S - * - * Copyright (c) 2014 Atmel Corporation. All rights reserved. - * - * \asf_license_start - * - * \page License - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are met: - * - * 1. Redistributions of source code must retain the above copyright notice, - * this list of conditions and the following disclaimer. - * - * 2. Redistributions in binary form must reproduce the above copyright notice, - * this list of conditions and the following disclaimer in the documentation - * and/or other materials provided with the distribution. - * - * 3. The name of Atmel may not be used to endorse or promote products derived - * from this software without specific prior written permission. - * - * 4. This software may only be redistributed and used in connection with an - * Atmel microcontroller product. - * - * THIS SOFTWARE IS PROVIDED BY ATMEL "AS IS" AND ANY EXPRESS OR IMPLIED - * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF - * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT ARE - * EXPRESSLY AND SPECIFICALLY DISCLAIMED. IN NO EVENT SHALL ATMEL BE LIABLE FOR - * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL - * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS - * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) - * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, - * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN - * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE - * POSSIBILITY OF SUCH DAMAGE. - * - * \asf_license_stop - * - */ -/** -* Support and FAQ: visit <a href="http://www.atmel.com/design-support/">Atmel Support</a> -*/ - #ifndef _SAMD21_I2S_INSTANCE_ #define _SAMD21_I2S_INSTANCE_
--- a/targets/cmsis/TARGET_Atmel/TARGET_SAM21/utils/cmsis/samd21/include/instance/ins_mtb.h Wed Jul 15 08:15:08 2015 +0100 +++ b/targets/cmsis/TARGET_Atmel/TARGET_SAM21/utils/cmsis/samd21/include/instance/ins_mtb.h Fri Jul 17 09:15:10 2015 +0100 @@ -1,49 +1,3 @@ -/** - * \file - * - * \brief Instance description for MTB - * - * Copyright (c) 2014 Atmel Corporation. All rights reserved. - * - * \asf_license_start - * - * \page License - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are met: - * - * 1. Redistributions of source code must retain the above copyright notice, - * this list of conditions and the following disclaimer. - * - * 2. Redistributions in binary form must reproduce the above copyright notice, - * this list of conditions and the following disclaimer in the documentation - * and/or other materials provided with the distribution. - * - * 3. The name of Atmel may not be used to endorse or promote products derived - * from this software without specific prior written permission. - * - * 4. This software may only be redistributed and used in connection with an - * Atmel microcontroller product. - * - * THIS SOFTWARE IS PROVIDED BY ATMEL "AS IS" AND ANY EXPRESS OR IMPLIED - * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF - * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT ARE - * EXPRESSLY AND SPECIFICALLY DISCLAIMED. IN NO EVENT SHALL ATMEL BE LIABLE FOR - * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL - * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS - * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) - * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, - * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN - * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE - * POSSIBILITY OF SUCH DAMAGE. - * - * \asf_license_stop - * - */ -/** -* Support and FAQ: visit <a href="http://www.atmel.com/design-support/">Atmel Support</a> -*/ - #ifndef _SAMD21_MTB_INSTANCE_ #define _SAMD21_MTB_INSTANCE_
--- a/targets/cmsis/TARGET_Atmel/TARGET_SAM21/utils/cmsis/samd21/include/instance/ins_nvmctrl.h Wed Jul 15 08:15:08 2015 +0100 +++ b/targets/cmsis/TARGET_Atmel/TARGET_SAM21/utils/cmsis/samd21/include/instance/ins_nvmctrl.h Fri Jul 17 09:15:10 2015 +0100 @@ -1,49 +1,3 @@ -/** - * \file - * - * \brief Instance description for NVMCTRL - * - * Copyright (c) 2014 Atmel Corporation. All rights reserved. - * - * \asf_license_start - * - * \page License - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are met: - * - * 1. Redistributions of source code must retain the above copyright notice, - * this list of conditions and the following disclaimer. - * - * 2. Redistributions in binary form must reproduce the above copyright notice, - * this list of conditions and the following disclaimer in the documentation - * and/or other materials provided with the distribution. - * - * 3. The name of Atmel may not be used to endorse or promote products derived - * from this software without specific prior written permission. - * - * 4. This software may only be redistributed and used in connection with an - * Atmel microcontroller product. - * - * THIS SOFTWARE IS PROVIDED BY ATMEL "AS IS" AND ANY EXPRESS OR IMPLIED - * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF - * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT ARE - * EXPRESSLY AND SPECIFICALLY DISCLAIMED. IN NO EVENT SHALL ATMEL BE LIABLE FOR - * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL - * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS - * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) - * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, - * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN - * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE - * POSSIBILITY OF SUCH DAMAGE. - * - * \asf_license_stop - * - */ -/** -* Support and FAQ: visit <a href="http://www.atmel.com/design-support/">Atmel Support</a> -*/ - #ifndef _SAMD21_NVMCTRL_INSTANCE_ #define _SAMD21_NVMCTRL_INSTANCE_
--- a/targets/cmsis/TARGET_Atmel/TARGET_SAM21/utils/cmsis/samd21/include/instance/ins_pac0.h Wed Jul 15 08:15:08 2015 +0100 +++ b/targets/cmsis/TARGET_Atmel/TARGET_SAM21/utils/cmsis/samd21/include/instance/ins_pac0.h Fri Jul 17 09:15:10 2015 +0100 @@ -1,49 +1,3 @@ -/** - * \file - * - * \brief Instance description for PAC0 - * - * Copyright (c) 2014 Atmel Corporation. All rights reserved. - * - * \asf_license_start - * - * \page License - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are met: - * - * 1. Redistributions of source code must retain the above copyright notice, - * this list of conditions and the following disclaimer. - * - * 2. Redistributions in binary form must reproduce the above copyright notice, - * this list of conditions and the following disclaimer in the documentation - * and/or other materials provided with the distribution. - * - * 3. The name of Atmel may not be used to endorse or promote products derived - * from this software without specific prior written permission. - * - * 4. This software may only be redistributed and used in connection with an - * Atmel microcontroller product. - * - * THIS SOFTWARE IS PROVIDED BY ATMEL "AS IS" AND ANY EXPRESS OR IMPLIED - * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF - * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT ARE - * EXPRESSLY AND SPECIFICALLY DISCLAIMED. IN NO EVENT SHALL ATMEL BE LIABLE FOR - * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL - * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS - * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) - * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, - * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN - * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE - * POSSIBILITY OF SUCH DAMAGE. - * - * \asf_license_stop - * - */ -/** -* Support and FAQ: visit <a href="http://www.atmel.com/design-support/">Atmel Support</a> -*/ - #ifndef _SAMD21_PAC0_INSTANCE_ #define _SAMD21_PAC0_INSTANCE_
--- a/targets/cmsis/TARGET_Atmel/TARGET_SAM21/utils/cmsis/samd21/include/instance/ins_pac1.h Wed Jul 15 08:15:08 2015 +0100 +++ b/targets/cmsis/TARGET_Atmel/TARGET_SAM21/utils/cmsis/samd21/include/instance/ins_pac1.h Fri Jul 17 09:15:10 2015 +0100 @@ -1,49 +1,3 @@ -/** - * \file - * - * \brief Instance description for PAC1 - * - * Copyright (c) 2014 Atmel Corporation. All rights reserved. - * - * \asf_license_start - * - * \page License - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are met: - * - * 1. Redistributions of source code must retain the above copyright notice, - * this list of conditions and the following disclaimer. - * - * 2. Redistributions in binary form must reproduce the above copyright notice, - * this list of conditions and the following disclaimer in the documentation - * and/or other materials provided with the distribution. - * - * 3. The name of Atmel may not be used to endorse or promote products derived - * from this software without specific prior written permission. - * - * 4. This software may only be redistributed and used in connection with an - * Atmel microcontroller product. - * - * THIS SOFTWARE IS PROVIDED BY ATMEL "AS IS" AND ANY EXPRESS OR IMPLIED - * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF - * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT ARE - * EXPRESSLY AND SPECIFICALLY DISCLAIMED. IN NO EVENT SHALL ATMEL BE LIABLE FOR - * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL - * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS - * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) - * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, - * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN - * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE - * POSSIBILITY OF SUCH DAMAGE. - * - * \asf_license_stop - * - */ -/** -* Support and FAQ: visit <a href="http://www.atmel.com/design-support/">Atmel Support</a> -*/ - #ifndef _SAMD21_PAC1_INSTANCE_ #define _SAMD21_PAC1_INSTANCE_
--- a/targets/cmsis/TARGET_Atmel/TARGET_SAM21/utils/cmsis/samd21/include/instance/ins_pac2.h Wed Jul 15 08:15:08 2015 +0100 +++ b/targets/cmsis/TARGET_Atmel/TARGET_SAM21/utils/cmsis/samd21/include/instance/ins_pac2.h Fri Jul 17 09:15:10 2015 +0100 @@ -1,49 +1,3 @@ -/** - * \file - * - * \brief Instance description for PAC2 - * - * Copyright (c) 2014 Atmel Corporation. All rights reserved. - * - * \asf_license_start - * - * \page License - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are met: - * - * 1. Redistributions of source code must retain the above copyright notice, - * this list of conditions and the following disclaimer. - * - * 2. Redistributions in binary form must reproduce the above copyright notice, - * this list of conditions and the following disclaimer in the documentation - * and/or other materials provided with the distribution. - * - * 3. The name of Atmel may not be used to endorse or promote products derived - * from this software without specific prior written permission. - * - * 4. This software may only be redistributed and used in connection with an - * Atmel microcontroller product. - * - * THIS SOFTWARE IS PROVIDED BY ATMEL "AS IS" AND ANY EXPRESS OR IMPLIED - * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF - * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT ARE - * EXPRESSLY AND SPECIFICALLY DISCLAIMED. IN NO EVENT SHALL ATMEL BE LIABLE FOR - * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL - * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS - * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) - * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, - * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN - * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE - * POSSIBILITY OF SUCH DAMAGE. - * - * \asf_license_stop - * - */ -/** -* Support and FAQ: visit <a href="http://www.atmel.com/design-support/">Atmel Support</a> -*/ - #ifndef _SAMD21_PAC2_INSTANCE_ #define _SAMD21_PAC2_INSTANCE_
--- a/targets/cmsis/TARGET_Atmel/TARGET_SAM21/utils/cmsis/samd21/include/instance/ins_pm.h Wed Jul 15 08:15:08 2015 +0100 +++ b/targets/cmsis/TARGET_Atmel/TARGET_SAM21/utils/cmsis/samd21/include/instance/ins_pm.h Fri Jul 17 09:15:10 2015 +0100 @@ -1,49 +1,3 @@ -/** - * \file - * - * \brief Instance description for PM - * - * Copyright (c) 2014 Atmel Corporation. All rights reserved. - * - * \asf_license_start - * - * \page License - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are met: - * - * 1. Redistributions of source code must retain the above copyright notice, - * this list of conditions and the following disclaimer. - * - * 2. Redistributions in binary form must reproduce the above copyright notice, - * this list of conditions and the following disclaimer in the documentation - * and/or other materials provided with the distribution. - * - * 3. The name of Atmel may not be used to endorse or promote products derived - * from this software without specific prior written permission. - * - * 4. This software may only be redistributed and used in connection with an - * Atmel microcontroller product. - * - * THIS SOFTWARE IS PROVIDED BY ATMEL "AS IS" AND ANY EXPRESS OR IMPLIED - * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF - * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT ARE - * EXPRESSLY AND SPECIFICALLY DISCLAIMED. IN NO EVENT SHALL ATMEL BE LIABLE FOR - * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL - * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS - * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) - * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, - * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN - * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE - * POSSIBILITY OF SUCH DAMAGE. - * - * \asf_license_stop - * - */ -/** -* Support and FAQ: visit <a href="http://www.atmel.com/design-support/">Atmel Support</a> -*/ - #ifndef _SAMD21_PM_INSTANCE_ #define _SAMD21_PM_INSTANCE_
--- a/targets/cmsis/TARGET_Atmel/TARGET_SAM21/utils/cmsis/samd21/include/instance/ins_port.h Wed Jul 15 08:15:08 2015 +0100 +++ b/targets/cmsis/TARGET_Atmel/TARGET_SAM21/utils/cmsis/samd21/include/instance/ins_port.h Fri Jul 17 09:15:10 2015 +0100 @@ -1,49 +1,3 @@ -/** - * \file - * - * \brief Instance description for PORT - * - * Copyright (c) 2014 Atmel Corporation. All rights reserved. - * - * \asf_license_start - * - * \page License - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are met: - * - * 1. Redistributions of source code must retain the above copyright notice, - * this list of conditions and the following disclaimer. - * - * 2. Redistributions in binary form must reproduce the above copyright notice, - * this list of conditions and the following disclaimer in the documentation - * and/or other materials provided with the distribution. - * - * 3. The name of Atmel may not be used to endorse or promote products derived - * from this software without specific prior written permission. - * - * 4. This software may only be redistributed and used in connection with an - * Atmel microcontroller product. - * - * THIS SOFTWARE IS PROVIDED BY ATMEL "AS IS" AND ANY EXPRESS OR IMPLIED - * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF - * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT ARE - * EXPRESSLY AND SPECIFICALLY DISCLAIMED. IN NO EVENT SHALL ATMEL BE LIABLE FOR - * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL - * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS - * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) - * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, - * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN - * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE - * POSSIBILITY OF SUCH DAMAGE. - * - * \asf_license_stop - * - */ -/** -* Support and FAQ: visit <a href="http://www.atmel.com/design-support/">Atmel Support</a> -*/ - #ifndef _SAMD21_PORT_INSTANCE_ #define _SAMD21_PORT_INSTANCE_
--- a/targets/cmsis/TARGET_Atmel/TARGET_SAM21/utils/cmsis/samd21/include/instance/ins_rfctrl.h Wed Jul 15 08:15:08 2015 +0100 +++ b/targets/cmsis/TARGET_Atmel/TARGET_SAM21/utils/cmsis/samd21/include/instance/ins_rfctrl.h Fri Jul 17 09:15:10 2015 +0100 @@ -1,49 +1,3 @@ -/** - * \file - * - * \brief Instance description for RFCTRL - * - * Copyright (c) 2014 Atmel Corporation. All rights reserved. - * - * \asf_license_start - * - * \page License - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are met: - * - * 1. Redistributions of source code must retain the above copyright notice, - * this list of conditions and the following disclaimer. - * - * 2. Redistributions in binary form must reproduce the above copyright notice, - * this list of conditions and the following disclaimer in the documentation - * and/or other materials provided with the distribution. - * - * 3. The name of Atmel may not be used to endorse or promote products derived - * from this software without specific prior written permission. - * - * 4. This software may only be redistributed and used in connection with an - * Atmel microcontroller product. - * - * THIS SOFTWARE IS PROVIDED BY ATMEL "AS IS" AND ANY EXPRESS OR IMPLIED - * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF - * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT ARE - * EXPRESSLY AND SPECIFICALLY DISCLAIMED. IN NO EVENT SHALL ATMEL BE LIABLE FOR - * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL - * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS - * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) - * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, - * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN - * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE - * POSSIBILITY OF SUCH DAMAGE. - * - * \asf_license_stop - * - */ -/** -* Support and FAQ: visit <a href="http://www.atmel.com/design-support/">Atmel Support</a> -*/ - #ifndef _SAMR21_RFCTRL_INSTANCE_ #define _SAMR21_RFCTRL_INSTANCE_
--- a/targets/cmsis/TARGET_Atmel/TARGET_SAM21/utils/cmsis/samd21/include/instance/ins_rtc.h Wed Jul 15 08:15:08 2015 +0100 +++ b/targets/cmsis/TARGET_Atmel/TARGET_SAM21/utils/cmsis/samd21/include/instance/ins_rtc.h Fri Jul 17 09:15:10 2015 +0100 @@ -1,49 +1,3 @@ -/** - * \file - * - * \brief Instance description for RTC - * - * Copyright (c) 2014 Atmel Corporation. All rights reserved. - * - * \asf_license_start - * - * \page License - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are met: - * - * 1. Redistributions of source code must retain the above copyright notice, - * this list of conditions and the following disclaimer. - * - * 2. Redistributions in binary form must reproduce the above copyright notice, - * this list of conditions and the following disclaimer in the documentation - * and/or other materials provided with the distribution. - * - * 3. The name of Atmel may not be used to endorse or promote products derived - * from this software without specific prior written permission. - * - * 4. This software may only be redistributed and used in connection with an - * Atmel microcontroller product. - * - * THIS SOFTWARE IS PROVIDED BY ATMEL "AS IS" AND ANY EXPRESS OR IMPLIED - * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF - * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT ARE - * EXPRESSLY AND SPECIFICALLY DISCLAIMED. IN NO EVENT SHALL ATMEL BE LIABLE FOR - * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL - * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS - * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) - * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, - * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN - * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE - * POSSIBILITY OF SUCH DAMAGE. - * - * \asf_license_stop - * - */ -/** -* Support and FAQ: visit <a href="http://www.atmel.com/design-support/">Atmel Support</a> -*/ - #ifndef _SAMD21_RTC_INSTANCE_ #define _SAMD21_RTC_INSTANCE_
--- a/targets/cmsis/TARGET_Atmel/TARGET_SAM21/utils/cmsis/samd21/include/instance/ins_sbmatrix.h Wed Jul 15 08:15:08 2015 +0100 +++ b/targets/cmsis/TARGET_Atmel/TARGET_SAM21/utils/cmsis/samd21/include/instance/ins_sbmatrix.h Fri Jul 17 09:15:10 2015 +0100 @@ -1,49 +1,3 @@ -/** - * \file - * - * \brief Instance description for SBMATRIX - * - * Copyright (c) 2014 Atmel Corporation. All rights reserved. - * - * \asf_license_start - * - * \page License - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are met: - * - * 1. Redistributions of source code must retain the above copyright notice, - * this list of conditions and the following disclaimer. - * - * 2. Redistributions in binary form must reproduce the above copyright notice, - * this list of conditions and the following disclaimer in the documentation - * and/or other materials provided with the distribution. - * - * 3. The name of Atmel may not be used to endorse or promote products derived - * from this software without specific prior written permission. - * - * 4. This software may only be redistributed and used in connection with an - * Atmel microcontroller product. - * - * THIS SOFTWARE IS PROVIDED BY ATMEL "AS IS" AND ANY EXPRESS OR IMPLIED - * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF - * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT ARE - * EXPRESSLY AND SPECIFICALLY DISCLAIMED. IN NO EVENT SHALL ATMEL BE LIABLE FOR - * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL - * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS - * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) - * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, - * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN - * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE - * POSSIBILITY OF SUCH DAMAGE. - * - * \asf_license_stop - * - */ -/** -* Support and FAQ: visit <a href="http://www.atmel.com/design-support/">Atmel Support</a> -*/ - #ifndef _SAMD21_SBMATRIX_INSTANCE_ #define _SAMD21_SBMATRIX_INSTANCE_
--- a/targets/cmsis/TARGET_Atmel/TARGET_SAM21/utils/cmsis/samd21/include/instance/ins_sercom0.h Wed Jul 15 08:15:08 2015 +0100 +++ b/targets/cmsis/TARGET_Atmel/TARGET_SAM21/utils/cmsis/samd21/include/instance/ins_sercom0.h Fri Jul 17 09:15:10 2015 +0100 @@ -1,49 +1,3 @@ -/** - * \file - * - * \brief Instance description for SERCOM0 - * - * Copyright (c) 2014 Atmel Corporation. All rights reserved. - * - * \asf_license_start - * - * \page License - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are met: - * - * 1. Redistributions of source code must retain the above copyright notice, - * this list of conditions and the following disclaimer. - * - * 2. Redistributions in binary form must reproduce the above copyright notice, - * this list of conditions and the following disclaimer in the documentation - * and/or other materials provided with the distribution. - * - * 3. The name of Atmel may not be used to endorse or promote products derived - * from this software without specific prior written permission. - * - * 4. This software may only be redistributed and used in connection with an - * Atmel microcontroller product. - * - * THIS SOFTWARE IS PROVIDED BY ATMEL "AS IS" AND ANY EXPRESS OR IMPLIED - * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF - * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT ARE - * EXPRESSLY AND SPECIFICALLY DISCLAIMED. IN NO EVENT SHALL ATMEL BE LIABLE FOR - * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL - * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS - * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) - * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, - * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN - * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE - * POSSIBILITY OF SUCH DAMAGE. - * - * \asf_license_stop - * - */ -/** -* Support and FAQ: visit <a href="http://www.atmel.com/design-support/">Atmel Support</a> -*/ - #ifndef _SAMD21_SERCOM0_INSTANCE_ #define _SAMD21_SERCOM0_INSTANCE_
--- a/targets/cmsis/TARGET_Atmel/TARGET_SAM21/utils/cmsis/samd21/include/instance/ins_sercom1.h Wed Jul 15 08:15:08 2015 +0100 +++ b/targets/cmsis/TARGET_Atmel/TARGET_SAM21/utils/cmsis/samd21/include/instance/ins_sercom1.h Fri Jul 17 09:15:10 2015 +0100 @@ -1,49 +1,3 @@ -/** - * \file - * - * \brief Instance description for SERCOM1 - * - * Copyright (c) 2014 Atmel Corporation. All rights reserved. - * - * \asf_license_start - * - * \page License - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are met: - * - * 1. Redistributions of source code must retain the above copyright notice, - * this list of conditions and the following disclaimer. - * - * 2. Redistributions in binary form must reproduce the above copyright notice, - * this list of conditions and the following disclaimer in the documentation - * and/or other materials provided with the distribution. - * - * 3. The name of Atmel may not be used to endorse or promote products derived - * from this software without specific prior written permission. - * - * 4. This software may only be redistributed and used in connection with an - * Atmel microcontroller product. - * - * THIS SOFTWARE IS PROVIDED BY ATMEL "AS IS" AND ANY EXPRESS OR IMPLIED - * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF - * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT ARE - * EXPRESSLY AND SPECIFICALLY DISCLAIMED. IN NO EVENT SHALL ATMEL BE LIABLE FOR - * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL - * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS - * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) - * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, - * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN - * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE - * POSSIBILITY OF SUCH DAMAGE. - * - * \asf_license_stop - * - */ -/** -* Support and FAQ: visit <a href="http://www.atmel.com/design-support/">Atmel Support</a> -*/ - #ifndef _SAMD21_SERCOM1_INSTANCE_ #define _SAMD21_SERCOM1_INSTANCE_
--- a/targets/cmsis/TARGET_Atmel/TARGET_SAM21/utils/cmsis/samd21/include/instance/ins_sercom2.h Wed Jul 15 08:15:08 2015 +0100 +++ b/targets/cmsis/TARGET_Atmel/TARGET_SAM21/utils/cmsis/samd21/include/instance/ins_sercom2.h Fri Jul 17 09:15:10 2015 +0100 @@ -1,49 +1,3 @@ -/** - * \file - * - * \brief Instance description for SERCOM2 - * - * Copyright (c) 2014 Atmel Corporation. All rights reserved. - * - * \asf_license_start - * - * \page License - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are met: - * - * 1. Redistributions of source code must retain the above copyright notice, - * this list of conditions and the following disclaimer. - * - * 2. Redistributions in binary form must reproduce the above copyright notice, - * this list of conditions and the following disclaimer in the documentation - * and/or other materials provided with the distribution. - * - * 3. The name of Atmel may not be used to endorse or promote products derived - * from this software without specific prior written permission. - * - * 4. This software may only be redistributed and used in connection with an - * Atmel microcontroller product. - * - * THIS SOFTWARE IS PROVIDED BY ATMEL "AS IS" AND ANY EXPRESS OR IMPLIED - * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF - * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT ARE - * EXPRESSLY AND SPECIFICALLY DISCLAIMED. IN NO EVENT SHALL ATMEL BE LIABLE FOR - * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL - * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS - * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) - * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, - * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN - * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE - * POSSIBILITY OF SUCH DAMAGE. - * - * \asf_license_stop - * - */ -/** -* Support and FAQ: visit <a href="http://www.atmel.com/design-support/">Atmel Support</a> -*/ - #ifndef _SAMD21_SERCOM2_INSTANCE_ #define _SAMD21_SERCOM2_INSTANCE_
--- a/targets/cmsis/TARGET_Atmel/TARGET_SAM21/utils/cmsis/samd21/include/instance/ins_sercom3.h Wed Jul 15 08:15:08 2015 +0100 +++ b/targets/cmsis/TARGET_Atmel/TARGET_SAM21/utils/cmsis/samd21/include/instance/ins_sercom3.h Fri Jul 17 09:15:10 2015 +0100 @@ -1,49 +1,3 @@ -/** - * \file - * - * \brief Instance description for SERCOM3 - * - * Copyright (c) 2014 Atmel Corporation. All rights reserved. - * - * \asf_license_start - * - * \page License - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are met: - * - * 1. Redistributions of source code must retain the above copyright notice, - * this list of conditions and the following disclaimer. - * - * 2. Redistributions in binary form must reproduce the above copyright notice, - * this list of conditions and the following disclaimer in the documentation - * and/or other materials provided with the distribution. - * - * 3. The name of Atmel may not be used to endorse or promote products derived - * from this software without specific prior written permission. - * - * 4. This software may only be redistributed and used in connection with an - * Atmel microcontroller product. - * - * THIS SOFTWARE IS PROVIDED BY ATMEL "AS IS" AND ANY EXPRESS OR IMPLIED - * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF - * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT ARE - * EXPRESSLY AND SPECIFICALLY DISCLAIMED. IN NO EVENT SHALL ATMEL BE LIABLE FOR - * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL - * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS - * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) - * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, - * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN - * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE - * POSSIBILITY OF SUCH DAMAGE. - * - * \asf_license_stop - * - */ -/** -* Support and FAQ: visit <a href="http://www.atmel.com/design-support/">Atmel Support</a> -*/ - #ifndef _SAMD21_SERCOM3_INSTANCE_ #define _SAMD21_SERCOM3_INSTANCE_
--- a/targets/cmsis/TARGET_Atmel/TARGET_SAM21/utils/cmsis/samd21/include/instance/ins_sercom4.h Wed Jul 15 08:15:08 2015 +0100 +++ b/targets/cmsis/TARGET_Atmel/TARGET_SAM21/utils/cmsis/samd21/include/instance/ins_sercom4.h Fri Jul 17 09:15:10 2015 +0100 @@ -1,49 +1,3 @@ -/** - * \file - * - * \brief Instance description for SERCOM4 - * - * Copyright (c) 2014 Atmel Corporation. All rights reserved. - * - * \asf_license_start - * - * \page License - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are met: - * - * 1. Redistributions of source code must retain the above copyright notice, - * this list of conditions and the following disclaimer. - * - * 2. Redistributions in binary form must reproduce the above copyright notice, - * this list of conditions and the following disclaimer in the documentation - * and/or other materials provided with the distribution. - * - * 3. The name of Atmel may not be used to endorse or promote products derived - * from this software without specific prior written permission. - * - * 4. This software may only be redistributed and used in connection with an - * Atmel microcontroller product. - * - * THIS SOFTWARE IS PROVIDED BY ATMEL "AS IS" AND ANY EXPRESS OR IMPLIED - * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF - * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT ARE - * EXPRESSLY AND SPECIFICALLY DISCLAIMED. IN NO EVENT SHALL ATMEL BE LIABLE FOR - * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL - * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS - * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) - * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, - * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN - * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE - * POSSIBILITY OF SUCH DAMAGE. - * - * \asf_license_stop - * - */ -/** -* Support and FAQ: visit <a href="http://www.atmel.com/design-support/">Atmel Support</a> -*/ - #ifndef _SAMD21_SERCOM4_INSTANCE_ #define _SAMD21_SERCOM4_INSTANCE_
--- a/targets/cmsis/TARGET_Atmel/TARGET_SAM21/utils/cmsis/samd21/include/instance/ins_sercom5.h Wed Jul 15 08:15:08 2015 +0100 +++ b/targets/cmsis/TARGET_Atmel/TARGET_SAM21/utils/cmsis/samd21/include/instance/ins_sercom5.h Fri Jul 17 09:15:10 2015 +0100 @@ -1,49 +1,3 @@ -/** - * \file - * - * \brief Instance description for SERCOM5 - * - * Copyright (c) 2014 Atmel Corporation. All rights reserved. - * - * \asf_license_start - * - * \page License - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are met: - * - * 1. Redistributions of source code must retain the above copyright notice, - * this list of conditions and the following disclaimer. - * - * 2. Redistributions in binary form must reproduce the above copyright notice, - * this list of conditions and the following disclaimer in the documentation - * and/or other materials provided with the distribution. - * - * 3. The name of Atmel may not be used to endorse or promote products derived - * from this software without specific prior written permission. - * - * 4. This software may only be redistributed and used in connection with an - * Atmel microcontroller product. - * - * THIS SOFTWARE IS PROVIDED BY ATMEL "AS IS" AND ANY EXPRESS OR IMPLIED - * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF - * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT ARE - * EXPRESSLY AND SPECIFICALLY DISCLAIMED. IN NO EVENT SHALL ATMEL BE LIABLE FOR - * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL - * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS - * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) - * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, - * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN - * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE - * POSSIBILITY OF SUCH DAMAGE. - * - * \asf_license_stop - * - */ -/** -* Support and FAQ: visit <a href="http://www.atmel.com/design-support/">Atmel Support</a> -*/ - #ifndef _SAMD21_SERCOM5_INSTANCE_ #define _SAMD21_SERCOM5_INSTANCE_
--- a/targets/cmsis/TARGET_Atmel/TARGET_SAM21/utils/cmsis/samd21/include/instance/ins_sysctrl.h Wed Jul 15 08:15:08 2015 +0100 +++ b/targets/cmsis/TARGET_Atmel/TARGET_SAM21/utils/cmsis/samd21/include/instance/ins_sysctrl.h Fri Jul 17 09:15:10 2015 +0100 @@ -1,49 +1,3 @@ -/** - * \file - * - * \brief Instance description for SYSCTRL - * - * Copyright (c) 2014 Atmel Corporation. All rights reserved. - * - * \asf_license_start - * - * \page License - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are met: - * - * 1. Redistributions of source code must retain the above copyright notice, - * this list of conditions and the following disclaimer. - * - * 2. Redistributions in binary form must reproduce the above copyright notice, - * this list of conditions and the following disclaimer in the documentation - * and/or other materials provided with the distribution. - * - * 3. The name of Atmel may not be used to endorse or promote products derived - * from this software without specific prior written permission. - * - * 4. This software may only be redistributed and used in connection with an - * Atmel microcontroller product. - * - * THIS SOFTWARE IS PROVIDED BY ATMEL "AS IS" AND ANY EXPRESS OR IMPLIED - * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF - * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT ARE - * EXPRESSLY AND SPECIFICALLY DISCLAIMED. IN NO EVENT SHALL ATMEL BE LIABLE FOR - * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL - * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS - * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) - * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, - * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN - * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE - * POSSIBILITY OF SUCH DAMAGE. - * - * \asf_license_stop - * - */ -/** -* Support and FAQ: visit <a href="http://www.atmel.com/design-support/">Atmel Support</a> -*/ - #ifndef _SAMD21_SYSCTRL_INSTANCE_ #define _SAMD21_SYSCTRL_INSTANCE_
--- a/targets/cmsis/TARGET_Atmel/TARGET_SAM21/utils/cmsis/samd21/include/instance/ins_tc3.h Wed Jul 15 08:15:08 2015 +0100 +++ b/targets/cmsis/TARGET_Atmel/TARGET_SAM21/utils/cmsis/samd21/include/instance/ins_tc3.h Fri Jul 17 09:15:10 2015 +0100 @@ -1,49 +1,3 @@ -/** - * \file - * - * \brief Instance description for TC3 - * - * Copyright (c) 2014 Atmel Corporation. All rights reserved. - * - * \asf_license_start - * - * \page License - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are met: - * - * 1. Redistributions of source code must retain the above copyright notice, - * this list of conditions and the following disclaimer. - * - * 2. Redistributions in binary form must reproduce the above copyright notice, - * this list of conditions and the following disclaimer in the documentation - * and/or other materials provided with the distribution. - * - * 3. The name of Atmel may not be used to endorse or promote products derived - * from this software without specific prior written permission. - * - * 4. This software may only be redistributed and used in connection with an - * Atmel microcontroller product. - * - * THIS SOFTWARE IS PROVIDED BY ATMEL "AS IS" AND ANY EXPRESS OR IMPLIED - * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF - * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT ARE - * EXPRESSLY AND SPECIFICALLY DISCLAIMED. IN NO EVENT SHALL ATMEL BE LIABLE FOR - * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL - * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS - * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) - * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, - * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN - * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE - * POSSIBILITY OF SUCH DAMAGE. - * - * \asf_license_stop - * - */ -/** -* Support and FAQ: visit <a href="http://www.atmel.com/design-support/">Atmel Support</a> -*/ - #ifndef _SAMD21_TC3_INSTANCE_ #define _SAMD21_TC3_INSTANCE_
--- a/targets/cmsis/TARGET_Atmel/TARGET_SAM21/utils/cmsis/samd21/include/instance/ins_tc4.h Wed Jul 15 08:15:08 2015 +0100 +++ b/targets/cmsis/TARGET_Atmel/TARGET_SAM21/utils/cmsis/samd21/include/instance/ins_tc4.h Fri Jul 17 09:15:10 2015 +0100 @@ -1,49 +1,3 @@ -/** - * \file - * - * \brief Instance description for TC4 - * - * Copyright (c) 2014 Atmel Corporation. All rights reserved. - * - * \asf_license_start - * - * \page License - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are met: - * - * 1. Redistributions of source code must retain the above copyright notice, - * this list of conditions and the following disclaimer. - * - * 2. Redistributions in binary form must reproduce the above copyright notice, - * this list of conditions and the following disclaimer in the documentation - * and/or other materials provided with the distribution. - * - * 3. The name of Atmel may not be used to endorse or promote products derived - * from this software without specific prior written permission. - * - * 4. This software may only be redistributed and used in connection with an - * Atmel microcontroller product. - * - * THIS SOFTWARE IS PROVIDED BY ATMEL "AS IS" AND ANY EXPRESS OR IMPLIED - * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF - * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT ARE - * EXPRESSLY AND SPECIFICALLY DISCLAIMED. IN NO EVENT SHALL ATMEL BE LIABLE FOR - * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL - * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS - * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) - * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, - * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN - * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE - * POSSIBILITY OF SUCH DAMAGE. - * - * \asf_license_stop - * - */ -/** -* Support and FAQ: visit <a href="http://www.atmel.com/design-support/">Atmel Support</a> -*/ - #ifndef _SAMD21_TC4_INSTANCE_ #define _SAMD21_TC4_INSTANCE_
--- a/targets/cmsis/TARGET_Atmel/TARGET_SAM21/utils/cmsis/samd21/include/instance/ins_tc5.h Wed Jul 15 08:15:08 2015 +0100 +++ b/targets/cmsis/TARGET_Atmel/TARGET_SAM21/utils/cmsis/samd21/include/instance/ins_tc5.h Fri Jul 17 09:15:10 2015 +0100 @@ -1,49 +1,3 @@ -/** - * \file - * - * \brief Instance description for TC5 - * - * Copyright (c) 2014 Atmel Corporation. All rights reserved. - * - * \asf_license_start - * - * \page License - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are met: - * - * 1. Redistributions of source code must retain the above copyright notice, - * this list of conditions and the following disclaimer. - * - * 2. Redistributions in binary form must reproduce the above copyright notice, - * this list of conditions and the following disclaimer in the documentation - * and/or other materials provided with the distribution. - * - * 3. The name of Atmel may not be used to endorse or promote products derived - * from this software without specific prior written permission. - * - * 4. This software may only be redistributed and used in connection with an - * Atmel microcontroller product. - * - * THIS SOFTWARE IS PROVIDED BY ATMEL "AS IS" AND ANY EXPRESS OR IMPLIED - * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF - * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT ARE - * EXPRESSLY AND SPECIFICALLY DISCLAIMED. IN NO EVENT SHALL ATMEL BE LIABLE FOR - * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL - * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS - * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) - * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, - * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN - * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE - * POSSIBILITY OF SUCH DAMAGE. - * - * \asf_license_stop - * - */ -/** -* Support and FAQ: visit <a href="http://www.atmel.com/design-support/">Atmel Support</a> -*/ - #ifndef _SAMD21_TC5_INSTANCE_ #define _SAMD21_TC5_INSTANCE_
--- a/targets/cmsis/TARGET_Atmel/TARGET_SAM21/utils/cmsis/samd21/include/instance/ins_tc6.h Wed Jul 15 08:15:08 2015 +0100 +++ b/targets/cmsis/TARGET_Atmel/TARGET_SAM21/utils/cmsis/samd21/include/instance/ins_tc6.h Fri Jul 17 09:15:10 2015 +0100 @@ -1,49 +1,3 @@ -/** - * \file - * - * \brief Instance description for TC6 - * - * Copyright (c) 2014 Atmel Corporation. All rights reserved. - * - * \asf_license_start - * - * \page License - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are met: - * - * 1. Redistributions of source code must retain the above copyright notice, - * this list of conditions and the following disclaimer. - * - * 2. Redistributions in binary form must reproduce the above copyright notice, - * this list of conditions and the following disclaimer in the documentation - * and/or other materials provided with the distribution. - * - * 3. The name of Atmel may not be used to endorse or promote products derived - * from this software without specific prior written permission. - * - * 4. This software may only be redistributed and used in connection with an - * Atmel microcontroller product. - * - * THIS SOFTWARE IS PROVIDED BY ATMEL "AS IS" AND ANY EXPRESS OR IMPLIED - * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF - * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT ARE - * EXPRESSLY AND SPECIFICALLY DISCLAIMED. IN NO EVENT SHALL ATMEL BE LIABLE FOR - * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL - * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS - * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) - * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, - * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN - * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE - * POSSIBILITY OF SUCH DAMAGE. - * - * \asf_license_stop - * - */ -/** -* Support and FAQ: visit <a href="http://www.atmel.com/design-support/">Atmel Support</a> -*/ - #ifndef _SAMD21_TC6_INSTANCE_ #define _SAMD21_TC6_INSTANCE_
--- a/targets/cmsis/TARGET_Atmel/TARGET_SAM21/utils/cmsis/samd21/include/instance/ins_tc7.h Wed Jul 15 08:15:08 2015 +0100 +++ b/targets/cmsis/TARGET_Atmel/TARGET_SAM21/utils/cmsis/samd21/include/instance/ins_tc7.h Fri Jul 17 09:15:10 2015 +0100 @@ -1,49 +1,3 @@ -/** - * \file - * - * \brief Instance description for TC7 - * - * Copyright (c) 2014 Atmel Corporation. All rights reserved. - * - * \asf_license_start - * - * \page License - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are met: - * - * 1. Redistributions of source code must retain the above copyright notice, - * this list of conditions and the following disclaimer. - * - * 2. Redistributions in binary form must reproduce the above copyright notice, - * this list of conditions and the following disclaimer in the documentation - * and/or other materials provided with the distribution. - * - * 3. The name of Atmel may not be used to endorse or promote products derived - * from this software without specific prior written permission. - * - * 4. This software may only be redistributed and used in connection with an - * Atmel microcontroller product. - * - * THIS SOFTWARE IS PROVIDED BY ATMEL "AS IS" AND ANY EXPRESS OR IMPLIED - * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF - * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT ARE - * EXPRESSLY AND SPECIFICALLY DISCLAIMED. IN NO EVENT SHALL ATMEL BE LIABLE FOR - * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL - * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS - * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) - * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, - * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN - * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE - * POSSIBILITY OF SUCH DAMAGE. - * - * \asf_license_stop - * - */ -/** -* Support and FAQ: visit <a href="http://www.atmel.com/design-support/">Atmel Support</a> -*/ - #ifndef _SAMD21_TC7_INSTANCE_ #define _SAMD21_TC7_INSTANCE_
--- a/targets/cmsis/TARGET_Atmel/TARGET_SAM21/utils/cmsis/samd21/include/instance/ins_tcc0.h Wed Jul 15 08:15:08 2015 +0100 +++ b/targets/cmsis/TARGET_Atmel/TARGET_SAM21/utils/cmsis/samd21/include/instance/ins_tcc0.h Fri Jul 17 09:15:10 2015 +0100 @@ -1,49 +1,3 @@ -/** - * \file - * - * \brief Instance description for TCC0 - * - * Copyright (c) 2014 Atmel Corporation. All rights reserved. - * - * \asf_license_start - * - * \page License - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are met: - * - * 1. Redistributions of source code must retain the above copyright notice, - * this list of conditions and the following disclaimer. - * - * 2. Redistributions in binary form must reproduce the above copyright notice, - * this list of conditions and the following disclaimer in the documentation - * and/or other materials provided with the distribution. - * - * 3. The name of Atmel may not be used to endorse or promote products derived - * from this software without specific prior written permission. - * - * 4. This software may only be redistributed and used in connection with an - * Atmel microcontroller product. - * - * THIS SOFTWARE IS PROVIDED BY ATMEL "AS IS" AND ANY EXPRESS OR IMPLIED - * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF - * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT ARE - * EXPRESSLY AND SPECIFICALLY DISCLAIMED. IN NO EVENT SHALL ATMEL BE LIABLE FOR - * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL - * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS - * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) - * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, - * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN - * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE - * POSSIBILITY OF SUCH DAMAGE. - * - * \asf_license_stop - * - */ -/** -* Support and FAQ: visit <a href="http://www.atmel.com/design-support/">Atmel Support</a> -*/ - #ifndef _SAMD21_TCC0_INSTANCE_ #define _SAMD21_TCC0_INSTANCE_
--- a/targets/cmsis/TARGET_Atmel/TARGET_SAM21/utils/cmsis/samd21/include/instance/ins_tcc1.h Wed Jul 15 08:15:08 2015 +0100 +++ b/targets/cmsis/TARGET_Atmel/TARGET_SAM21/utils/cmsis/samd21/include/instance/ins_tcc1.h Fri Jul 17 09:15:10 2015 +0100 @@ -1,49 +1,3 @@ -/** - * \file - * - * \brief Instance description for TCC1 - * - * Copyright (c) 2014 Atmel Corporation. All rights reserved. - * - * \asf_license_start - * - * \page License - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are met: - * - * 1. Redistributions of source code must retain the above copyright notice, - * this list of conditions and the following disclaimer. - * - * 2. Redistributions in binary form must reproduce the above copyright notice, - * this list of conditions and the following disclaimer in the documentation - * and/or other materials provided with the distribution. - * - * 3. The name of Atmel may not be used to endorse or promote products derived - * from this software without specific prior written permission. - * - * 4. This software may only be redistributed and used in connection with an - * Atmel microcontroller product. - * - * THIS SOFTWARE IS PROVIDED BY ATMEL "AS IS" AND ANY EXPRESS OR IMPLIED - * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF - * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT ARE - * EXPRESSLY AND SPECIFICALLY DISCLAIMED. IN NO EVENT SHALL ATMEL BE LIABLE FOR - * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL - * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS - * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) - * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, - * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN - * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE - * POSSIBILITY OF SUCH DAMAGE. - * - * \asf_license_stop - * - */ -/** -* Support and FAQ: visit <a href="http://www.atmel.com/design-support/">Atmel Support</a> -*/ - #ifndef _SAMD21_TCC1_INSTANCE_ #define _SAMD21_TCC1_INSTANCE_
--- a/targets/cmsis/TARGET_Atmel/TARGET_SAM21/utils/cmsis/samd21/include/instance/ins_tcc2.h Wed Jul 15 08:15:08 2015 +0100 +++ b/targets/cmsis/TARGET_Atmel/TARGET_SAM21/utils/cmsis/samd21/include/instance/ins_tcc2.h Fri Jul 17 09:15:10 2015 +0100 @@ -1,49 +1,3 @@ -/** - * \file - * - * \brief Instance description for TCC2 - * - * Copyright (c) 2014 Atmel Corporation. All rights reserved. - * - * \asf_license_start - * - * \page License - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are met: - * - * 1. Redistributions of source code must retain the above copyright notice, - * this list of conditions and the following disclaimer. - * - * 2. Redistributions in binary form must reproduce the above copyright notice, - * this list of conditions and the following disclaimer in the documentation - * and/or other materials provided with the distribution. - * - * 3. The name of Atmel may not be used to endorse or promote products derived - * from this software without specific prior written permission. - * - * 4. This software may only be redistributed and used in connection with an - * Atmel microcontroller product. - * - * THIS SOFTWARE IS PROVIDED BY ATMEL "AS IS" AND ANY EXPRESS OR IMPLIED - * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF - * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT ARE - * EXPRESSLY AND SPECIFICALLY DISCLAIMED. IN NO EVENT SHALL ATMEL BE LIABLE FOR - * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL - * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS - * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) - * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, - * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN - * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE - * POSSIBILITY OF SUCH DAMAGE. - * - * \asf_license_stop - * - */ -/** -* Support and FAQ: visit <a href="http://www.atmel.com/design-support/">Atmel Support</a> -*/ - #ifndef _SAMD21_TCC2_INSTANCE_ #define _SAMD21_TCC2_INSTANCE_
--- a/targets/cmsis/TARGET_Atmel/TARGET_SAM21/utils/cmsis/samd21/include/instance/ins_usb.h Wed Jul 15 08:15:08 2015 +0100 +++ b/targets/cmsis/TARGET_Atmel/TARGET_SAM21/utils/cmsis/samd21/include/instance/ins_usb.h Fri Jul 17 09:15:10 2015 +0100 @@ -1,49 +1,3 @@ -/** - * \file - * - * \brief Instance description for USB - * - * Copyright (c) 2014 Atmel Corporation. All rights reserved. - * - * \asf_license_start - * - * \page License - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are met: - * - * 1. Redistributions of source code must retain the above copyright notice, - * this list of conditions and the following disclaimer. - * - * 2. Redistributions in binary form must reproduce the above copyright notice, - * this list of conditions and the following disclaimer in the documentation - * and/or other materials provided with the distribution. - * - * 3. The name of Atmel may not be used to endorse or promote products derived - * from this software without specific prior written permission. - * - * 4. This software may only be redistributed and used in connection with an - * Atmel microcontroller product. - * - * THIS SOFTWARE IS PROVIDED BY ATMEL "AS IS" AND ANY EXPRESS OR IMPLIED - * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF - * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT ARE - * EXPRESSLY AND SPECIFICALLY DISCLAIMED. IN NO EVENT SHALL ATMEL BE LIABLE FOR - * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL - * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS - * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) - * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, - * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN - * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE - * POSSIBILITY OF SUCH DAMAGE. - * - * \asf_license_stop - * - */ -/** -* Support and FAQ: visit <a href="http://www.atmel.com/design-support/">Atmel Support</a> -*/ - #ifndef _SAMD21_USB_INSTANCE_ #define _SAMD21_USB_INSTANCE_
--- a/targets/cmsis/TARGET_Atmel/TARGET_SAM21/utils/cmsis/samd21/include/instance/ins_wdt.h Wed Jul 15 08:15:08 2015 +0100 +++ b/targets/cmsis/TARGET_Atmel/TARGET_SAM21/utils/cmsis/samd21/include/instance/ins_wdt.h Fri Jul 17 09:15:10 2015 +0100 @@ -1,49 +1,3 @@ -/** - * \file - * - * \brief Instance description for WDT - * - * Copyright (c) 2014 Atmel Corporation. All rights reserved. - * - * \asf_license_start - * - * \page License - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are met: - * - * 1. Redistributions of source code must retain the above copyright notice, - * this list of conditions and the following disclaimer. - * - * 2. Redistributions in binary form must reproduce the above copyright notice, - * this list of conditions and the following disclaimer in the documentation - * and/or other materials provided with the distribution. - * - * 3. The name of Atmel may not be used to endorse or promote products derived - * from this software without specific prior written permission. - * - * 4. This software may only be redistributed and used in connection with an - * Atmel microcontroller product. - * - * THIS SOFTWARE IS PROVIDED BY ATMEL "AS IS" AND ANY EXPRESS OR IMPLIED - * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF - * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT ARE - * EXPRESSLY AND SPECIFICALLY DISCLAIMED. IN NO EVENT SHALL ATMEL BE LIABLE FOR - * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL - * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS - * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) - * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, - * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN - * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE - * POSSIBILITY OF SUCH DAMAGE. - * - * \asf_license_stop - * - */ -/** -* Support and FAQ: visit <a href="http://www.atmel.com/design-support/">Atmel Support</a> -*/ - #ifndef _SAMD21_WDT_INSTANCE_ #define _SAMD21_WDT_INSTANCE_
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/targets/cmsis/TARGET_Atmel/TARGET_SAM21/utils/cmsis/samd21/include/pio/pio_samd21j18a.h Fri Jul 17 09:15:10 2015 +0100 @@ -0,0 +1,1146 @@ +#ifndef _SAMD21J18A_PIO_ +#define _SAMD21J18A_PIO_ + +#define PIN_PA00 0 /**< \brief Pin Number for PA00 */ +#define PORT_PA00 (1ul << 0) /**< \brief PORT Mask for PA00 */ +#define PIN_PA01 1 /**< \brief Pin Number for PA01 */ +#define PORT_PA01 (1ul << 1) /**< \brief PORT Mask for PA01 */ +#define PIN_PA02 2 /**< \brief Pin Number for PA02 */ +#define PORT_PA02 (1ul << 2) /**< \brief PORT Mask for PA02 */ +#define PIN_PA03 3 /**< \brief Pin Number for PA03 */ +#define PORT_PA03 (1ul << 3) /**< \brief PORT Mask for PA03 */ +#define PIN_PA04 4 /**< \brief Pin Number for PA04 */ +#define PORT_PA04 (1ul << 4) /**< \brief PORT Mask for PA04 */ +#define PIN_PA05 5 /**< \brief Pin Number for PA05 */ +#define PORT_PA05 (1ul << 5) /**< \brief PORT Mask for PA05 */ +#define PIN_PA06 6 /**< \brief Pin Number for PA06 */ +#define PORT_PA06 (1ul << 6) /**< \brief PORT Mask for PA06 */ +#define PIN_PA07 7 /**< \brief Pin Number for PA07 */ +#define PORT_PA07 (1ul << 7) /**< \brief PORT Mask for PA07 */ +#define PIN_PA08 8 /**< \brief Pin Number for PA08 */ +#define PORT_PA08 (1ul << 8) /**< \brief PORT Mask for PA08 */ +#define PIN_PA09 9 /**< \brief Pin Number for PA09 */ +#define PORT_PA09 (1ul << 9) /**< \brief PORT Mask for PA09 */ +#define PIN_PA10 10 /**< \brief Pin Number for PA10 */ +#define PORT_PA10 (1ul << 10) /**< \brief PORT Mask for PA10 */ +#define PIN_PA11 11 /**< \brief Pin Number for PA11 */ +#define PORT_PA11 (1ul << 11) /**< \brief PORT Mask for PA11 */ +#define PIN_PA12 12 /**< \brief Pin Number for PA12 */ +#define PORT_PA12 (1ul << 12) /**< \brief PORT Mask for PA12 */ +#define PIN_PA13 13 /**< \brief Pin Number for PA13 */ +#define PORT_PA13 (1ul << 13) /**< \brief PORT Mask for PA13 */ +#define PIN_PA14 14 /**< \brief Pin Number for PA14 */ +#define PORT_PA14 (1ul << 14) /**< \brief PORT Mask for PA14 */ +#define PIN_PA15 15 /**< \brief Pin Number for PA15 */ +#define PORT_PA15 (1ul << 15) /**< \brief PORT Mask for PA15 */ +#define PIN_PA16 16 /**< \brief Pin Number for PA16 */ +#define PORT_PA16 (1ul << 16) /**< \brief PORT Mask for PA16 */ +#define PIN_PA17 17 /**< \brief Pin Number for PA17 */ +#define PORT_PA17 (1ul << 17) /**< \brief PORT Mask for PA17 */ +#define PIN_PA18 18 /**< \brief Pin Number for PA18 */ +#define PORT_PA18 (1ul << 18) /**< \brief PORT Mask for PA18 */ +#define PIN_PA19 19 /**< \brief Pin Number for PA19 */ +#define PORT_PA19 (1ul << 19) /**< \brief PORT Mask for PA19 */ +#define PIN_PA20 20 /**< \brief Pin Number for PA20 */ +#define PORT_PA20 (1ul << 20) /**< \brief PORT Mask for PA20 */ +#define PIN_PA21 21 /**< \brief Pin Number for PA21 */ +#define PORT_PA21 (1ul << 21) /**< \brief PORT Mask for PA21 */ +#define PIN_PA22 22 /**< \brief Pin Number for PA22 */ +#define PORT_PA22 (1ul << 22) /**< \brief PORT Mask for PA22 */ +#define PIN_PA23 23 /**< \brief Pin Number for PA23 */ +#define PORT_PA23 (1ul << 23) /**< \brief PORT Mask for PA23 */ +#define PIN_PA24 24 /**< \brief Pin Number for PA24 */ +#define PORT_PA24 (1ul << 24) /**< \brief PORT Mask for PA24 */ +#define PIN_PA25 25 /**< \brief Pin Number for PA25 */ +#define PORT_PA25 (1ul << 25) /**< \brief PORT Mask for PA25 */ +#define PIN_PA27 27 /**< \brief Pin Number for PA27 */ +#define PORT_PA27 (1ul << 27) /**< \brief PORT Mask for PA27 */ +#define PIN_PA28 28 /**< \brief Pin Number for PA28 */ +#define PORT_PA28 (1ul << 28) /**< \brief PORT Mask for PA28 */ +#define PIN_PA30 30 /**< \brief Pin Number for PA30 */ +#define PORT_PA30 (1ul << 30) /**< \brief PORT Mask for PA30 */ +#define PIN_PA31 31 /**< \brief Pin Number for PA31 */ +#define PORT_PA31 (1ul << 31) /**< \brief PORT Mask for PA31 */ +#define PIN_PB00 32 /**< \brief Pin Number for PB00 */ +#define PORT_PB00 (1ul << 0) /**< \brief PORT Mask for PB00 */ +#define PIN_PB01 33 /**< \brief Pin Number for PB01 */ +#define PORT_PB01 (1ul << 1) /**< \brief PORT Mask for PB01 */ +#define PIN_PB02 34 /**< \brief Pin Number for PB02 */ +#define PORT_PB02 (1ul << 2) /**< \brief PORT Mask for PB02 */ +#define PIN_PB03 35 /**< \brief Pin Number for PB03 */ +#define PORT_PB03 (1ul << 3) /**< \brief PORT Mask for PB03 */ +#define PIN_PB04 36 /**< \brief Pin Number for PB04 */ +#define PORT_PB04 (1ul << 4) /**< \brief PORT Mask for PB04 */ +#define PIN_PB05 37 /**< \brief Pin Number for PB05 */ +#define PORT_PB05 (1ul << 5) /**< \brief PORT Mask for PB05 */ +#define PIN_PB06 38 /**< \brief Pin Number for PB06 */ +#define PORT_PB06 (1ul << 6) /**< \brief PORT Mask for PB06 */ +#define PIN_PB07 39 /**< \brief Pin Number for PB07 */ +#define PORT_PB07 (1ul << 7) /**< \brief PORT Mask for PB07 */ +#define PIN_PB08 40 /**< \brief Pin Number for PB08 */ +#define PORT_PB08 (1ul << 8) /**< \brief PORT Mask for PB08 */ +#define PIN_PB09 41 /**< \brief Pin Number for PB09 */ +#define PORT_PB09 (1ul << 9) /**< \brief PORT Mask for PB09 */ +#define PIN_PB10 42 /**< \brief Pin Number for PB10 */ +#define PORT_PB10 (1ul << 10) /**< \brief PORT Mask for PB10 */ +#define PIN_PB11 43 /**< \brief Pin Number for PB11 */ +#define PORT_PB11 (1ul << 11) /**< \brief PORT Mask for PB11 */ +#define PIN_PB12 44 /**< \brief Pin Number for PB12 */ +#define PORT_PB12 (1ul << 12) /**< \brief PORT Mask for PB12 */ +#define PIN_PB13 45 /**< \brief Pin Number for PB13 */ +#define PORT_PB13 (1ul << 13) /**< \brief PORT Mask for PB13 */ +#define PIN_PB14 46 /**< \brief Pin Number for PB14 */ +#define PORT_PB14 (1ul << 14) /**< \brief PORT Mask for PB14 */ +#define PIN_PB15 47 /**< \brief Pin Number for PB15 */ +#define PORT_PB15 (1ul << 15) /**< \brief PORT Mask for PB15 */ +#define PIN_PB16 48 /**< \brief Pin Number for PB16 */ +#define PORT_PB16 (1ul << 16) /**< \brief PORT Mask for PB16 */ +#define PIN_PB17 49 /**< \brief Pin Number for PB17 */ +#define PORT_PB17 (1ul << 17) /**< \brief PORT Mask for PB17 */ +#define PIN_PB22 54 /**< \brief Pin Number for PB22 */ +#define PORT_PB22 (1ul << 22) /**< \brief PORT Mask for PB22 */ +#define PIN_PB23 55 /**< \brief Pin Number for PB23 */ +#define PORT_PB23 (1ul << 23) /**< \brief PORT Mask for PB23 */ +#define PIN_PB30 62 /**< \brief Pin Number for PB30 */ +#define PORT_PB30 (1ul << 30) /**< \brief PORT Mask for PB30 */ +#define PIN_PB31 63 /**< \brief Pin Number for PB31 */ +#define PORT_PB31 (1ul << 31) /**< \brief PORT Mask for PB31 */ +/* ========== PORT definition for GCLK peripheral ========== */ +#define PIN_PB14H_GCLK_IO0 46L /**< \brief GCLK signal: IO0 on PB14 mux H */ +#define MUX_PB14H_GCLK_IO0 7L +#define PINMUX_PB14H_GCLK_IO0 ((PIN_PB14H_GCLK_IO0 << 16) | MUX_PB14H_GCLK_IO0) +#define PORT_PB14H_GCLK_IO0 (1ul << 14) +#define PIN_PB22H_GCLK_IO0 54L /**< \brief GCLK signal: IO0 on PB22 mux H */ +#define MUX_PB22H_GCLK_IO0 7L +#define PINMUX_PB22H_GCLK_IO0 ((PIN_PB22H_GCLK_IO0 << 16) | MUX_PB22H_GCLK_IO0) +#define PORT_PB22H_GCLK_IO0 (1ul << 22) +#define PIN_PA14H_GCLK_IO0 14L /**< \brief GCLK signal: IO0 on PA14 mux H */ +#define MUX_PA14H_GCLK_IO0 7L +#define PINMUX_PA14H_GCLK_IO0 ((PIN_PA14H_GCLK_IO0 << 16) | MUX_PA14H_GCLK_IO0) +#define PORT_PA14H_GCLK_IO0 (1ul << 14) +#define PIN_PA27H_GCLK_IO0 27L /**< \brief GCLK signal: IO0 on PA27 mux H */ +#define MUX_PA27H_GCLK_IO0 7L +#define PINMUX_PA27H_GCLK_IO0 ((PIN_PA27H_GCLK_IO0 << 16) | MUX_PA27H_GCLK_IO0) +#define PORT_PA27H_GCLK_IO0 (1ul << 27) +#define PIN_PA28H_GCLK_IO0 28L /**< \brief GCLK signal: IO0 on PA28 mux H */ +#define MUX_PA28H_GCLK_IO0 7L +#define PINMUX_PA28H_GCLK_IO0 ((PIN_PA28H_GCLK_IO0 << 16) | MUX_PA28H_GCLK_IO0) +#define PORT_PA28H_GCLK_IO0 (1ul << 28) +#define PIN_PA30H_GCLK_IO0 30L /**< \brief GCLK signal: IO0 on PA30 mux H */ +#define MUX_PA30H_GCLK_IO0 7L +#define PINMUX_PA30H_GCLK_IO0 ((PIN_PA30H_GCLK_IO0 << 16) | MUX_PA30H_GCLK_IO0) +#define PORT_PA30H_GCLK_IO0 (1ul << 30) +#define PIN_PB15H_GCLK_IO1 47L /**< \brief GCLK signal: IO1 on PB15 mux H */ +#define MUX_PB15H_GCLK_IO1 7L +#define PINMUX_PB15H_GCLK_IO1 ((PIN_PB15H_GCLK_IO1 << 16) | MUX_PB15H_GCLK_IO1) +#define PORT_PB15H_GCLK_IO1 (1ul << 15) +#define PIN_PB23H_GCLK_IO1 55L /**< \brief GCLK signal: IO1 on PB23 mux H */ +#define MUX_PB23H_GCLK_IO1 7L +#define PINMUX_PB23H_GCLK_IO1 ((PIN_PB23H_GCLK_IO1 << 16) | MUX_PB23H_GCLK_IO1) +#define PORT_PB23H_GCLK_IO1 (1ul << 23) +#define PIN_PA15H_GCLK_IO1 15L /**< \brief GCLK signal: IO1 on PA15 mux H */ +#define MUX_PA15H_GCLK_IO1 7L +#define PINMUX_PA15H_GCLK_IO1 ((PIN_PA15H_GCLK_IO1 << 16) | MUX_PA15H_GCLK_IO1) +#define PORT_PA15H_GCLK_IO1 (1ul << 15) +#define PIN_PB16H_GCLK_IO2 48L /**< \brief GCLK signal: IO2 on PB16 mux H */ +#define MUX_PB16H_GCLK_IO2 7L +#define PINMUX_PB16H_GCLK_IO2 ((PIN_PB16H_GCLK_IO2 << 16) | MUX_PB16H_GCLK_IO2) +#define PORT_PB16H_GCLK_IO2 (1ul << 16) +#define PIN_PA16H_GCLK_IO2 16L /**< \brief GCLK signal: IO2 on PA16 mux H */ +#define MUX_PA16H_GCLK_IO2 7L +#define PINMUX_PA16H_GCLK_IO2 ((PIN_PA16H_GCLK_IO2 << 16) | MUX_PA16H_GCLK_IO2) +#define PORT_PA16H_GCLK_IO2 (1ul << 16) +#define PIN_PA17H_GCLK_IO3 17L /**< \brief GCLK signal: IO3 on PA17 mux H */ +#define MUX_PA17H_GCLK_IO3 7L +#define PINMUX_PA17H_GCLK_IO3 ((PIN_PA17H_GCLK_IO3 << 16) | MUX_PA17H_GCLK_IO3) +#define PORT_PA17H_GCLK_IO3 (1ul << 17) +#define PIN_PB17H_GCLK_IO3 49L /**< \brief GCLK signal: IO3 on PB17 mux H */ +#define MUX_PB17H_GCLK_IO3 7L +#define PINMUX_PB17H_GCLK_IO3 ((PIN_PB17H_GCLK_IO3 << 16) | MUX_PB17H_GCLK_IO3) +#define PORT_PB17H_GCLK_IO3 (1ul << 17) +#define PIN_PA10H_GCLK_IO4 10L /**< \brief GCLK signal: IO4 on PA10 mux H */ +#define MUX_PA10H_GCLK_IO4 7L +#define PINMUX_PA10H_GCLK_IO4 ((PIN_PA10H_GCLK_IO4 << 16) | MUX_PA10H_GCLK_IO4) +#define PORT_PA10H_GCLK_IO4 (1ul << 10) +#define PIN_PA20H_GCLK_IO4 20L /**< \brief GCLK signal: IO4 on PA20 mux H */ +#define MUX_PA20H_GCLK_IO4 7L +#define PINMUX_PA20H_GCLK_IO4 ((PIN_PA20H_GCLK_IO4 << 16) | MUX_PA20H_GCLK_IO4) +#define PORT_PA20H_GCLK_IO4 (1ul << 20) +#define PIN_PB10H_GCLK_IO4 42L /**< \brief GCLK signal: IO4 on PB10 mux H */ +#define MUX_PB10H_GCLK_IO4 7L +#define PINMUX_PB10H_GCLK_IO4 ((PIN_PB10H_GCLK_IO4 << 16) | MUX_PB10H_GCLK_IO4) +#define PORT_PB10H_GCLK_IO4 (1ul << 10) +#define PIN_PA11H_GCLK_IO5 11L /**< \brief GCLK signal: IO5 on PA11 mux H */ +#define MUX_PA11H_GCLK_IO5 7L +#define PINMUX_PA11H_GCLK_IO5 ((PIN_PA11H_GCLK_IO5 << 16) | MUX_PA11H_GCLK_IO5) +#define PORT_PA11H_GCLK_IO5 (1ul << 11) +#define PIN_PA21H_GCLK_IO5 21L /**< \brief GCLK signal: IO5 on PA21 mux H */ +#define MUX_PA21H_GCLK_IO5 7L +#define PINMUX_PA21H_GCLK_IO5 ((PIN_PA21H_GCLK_IO5 << 16) | MUX_PA21H_GCLK_IO5) +#define PORT_PA21H_GCLK_IO5 (1ul << 21) +#define PIN_PB11H_GCLK_IO5 43L /**< \brief GCLK signal: IO5 on PB11 mux H */ +#define MUX_PB11H_GCLK_IO5 7L +#define PINMUX_PB11H_GCLK_IO5 ((PIN_PB11H_GCLK_IO5 << 16) | MUX_PB11H_GCLK_IO5) +#define PORT_PB11H_GCLK_IO5 (1ul << 11) +#define PIN_PA22H_GCLK_IO6 22L /**< \brief GCLK signal: IO6 on PA22 mux H */ +#define MUX_PA22H_GCLK_IO6 7L +#define PINMUX_PA22H_GCLK_IO6 ((PIN_PA22H_GCLK_IO6 << 16) | MUX_PA22H_GCLK_IO6) +#define PORT_PA22H_GCLK_IO6 (1ul << 22) +#define PIN_PB12H_GCLK_IO6 44L /**< \brief GCLK signal: IO6 on PB12 mux H */ +#define MUX_PB12H_GCLK_IO6 7L +#define PINMUX_PB12H_GCLK_IO6 ((PIN_PB12H_GCLK_IO6 << 16) | MUX_PB12H_GCLK_IO6) +#define PORT_PB12H_GCLK_IO6 (1ul << 12) +#define PIN_PA23H_GCLK_IO7 23L /**< \brief GCLK signal: IO7 on PA23 mux H */ +#define MUX_PA23H_GCLK_IO7 7L +#define PINMUX_PA23H_GCLK_IO7 ((PIN_PA23H_GCLK_IO7 << 16) | MUX_PA23H_GCLK_IO7) +#define PORT_PA23H_GCLK_IO7 (1ul << 23) +#define PIN_PB13H_GCLK_IO7 45L /**< \brief GCLK signal: IO7 on PB13 mux H */ +#define MUX_PB13H_GCLK_IO7 7L +#define PINMUX_PB13H_GCLK_IO7 ((PIN_PB13H_GCLK_IO7 << 16) | MUX_PB13H_GCLK_IO7) +#define PORT_PB13H_GCLK_IO7 (1ul << 13) +/* ========== PORT definition for EIC peripheral ========== */ +#define PIN_PA16A_EIC_EXTINT0 16L /**< \brief EIC signal: EXTINT0 on PA16 mux A */ +#define MUX_PA16A_EIC_EXTINT0 0L +#define PINMUX_PA16A_EIC_EXTINT0 ((PIN_PA16A_EIC_EXTINT0 << 16) | MUX_PA16A_EIC_EXTINT0) +#define PORT_PA16A_EIC_EXTINT0 (1ul << 16) +#define PIN_PB00A_EIC_EXTINT0 32L /**< \brief EIC signal: EXTINT0 on PB00 mux A */ +#define MUX_PB00A_EIC_EXTINT0 0L +#define PINMUX_PB00A_EIC_EXTINT0 ((PIN_PB00A_EIC_EXTINT0 << 16) | MUX_PB00A_EIC_EXTINT0) +#define PORT_PB00A_EIC_EXTINT0 (1ul << 0) +#define PIN_PB16A_EIC_EXTINT0 48L /**< \brief EIC signal: EXTINT0 on PB16 mux A */ +#define MUX_PB16A_EIC_EXTINT0 0L +#define PINMUX_PB16A_EIC_EXTINT0 ((PIN_PB16A_EIC_EXTINT0 << 16) | MUX_PB16A_EIC_EXTINT0) +#define PORT_PB16A_EIC_EXTINT0 (1ul << 16) +#define PIN_PA00A_EIC_EXTINT0 0L /**< \brief EIC signal: EXTINT0 on PA00 mux A */ +#define MUX_PA00A_EIC_EXTINT0 0L +#define PINMUX_PA00A_EIC_EXTINT0 ((PIN_PA00A_EIC_EXTINT0 << 16) | MUX_PA00A_EIC_EXTINT0) +#define PORT_PA00A_EIC_EXTINT0 (1ul << 0) +#define PIN_PA17A_EIC_EXTINT1 17L /**< \brief EIC signal: EXTINT1 on PA17 mux A */ +#define MUX_PA17A_EIC_EXTINT1 0L +#define PINMUX_PA17A_EIC_EXTINT1 ((PIN_PA17A_EIC_EXTINT1 << 16) | MUX_PA17A_EIC_EXTINT1) +#define PORT_PA17A_EIC_EXTINT1 (1ul << 17) +#define PIN_PB01A_EIC_EXTINT1 33L /**< \brief EIC signal: EXTINT1 on PB01 mux A */ +#define MUX_PB01A_EIC_EXTINT1 0L +#define PINMUX_PB01A_EIC_EXTINT1 ((PIN_PB01A_EIC_EXTINT1 << 16) | MUX_PB01A_EIC_EXTINT1) +#define PORT_PB01A_EIC_EXTINT1 (1ul << 1) +#define PIN_PB17A_EIC_EXTINT1 49L /**< \brief EIC signal: EXTINT1 on PB17 mux A */ +#define MUX_PB17A_EIC_EXTINT1 0L +#define PINMUX_PB17A_EIC_EXTINT1 ((PIN_PB17A_EIC_EXTINT1 << 16) | MUX_PB17A_EIC_EXTINT1) +#define PORT_PB17A_EIC_EXTINT1 (1ul << 17) +#define PIN_PA01A_EIC_EXTINT1 1L /**< \brief EIC signal: EXTINT1 on PA01 mux A */ +#define MUX_PA01A_EIC_EXTINT1 0L +#define PINMUX_PA01A_EIC_EXTINT1 ((PIN_PA01A_EIC_EXTINT1 << 16) | MUX_PA01A_EIC_EXTINT1) +#define PORT_PA01A_EIC_EXTINT1 (1ul << 1) +#define PIN_PA18A_EIC_EXTINT2 18L /**< \brief EIC signal: EXTINT2 on PA18 mux A */ +#define MUX_PA18A_EIC_EXTINT2 0L +#define PINMUX_PA18A_EIC_EXTINT2 ((PIN_PA18A_EIC_EXTINT2 << 16) | MUX_PA18A_EIC_EXTINT2) +#define PORT_PA18A_EIC_EXTINT2 (1ul << 18) +#define PIN_PA02A_EIC_EXTINT2 2L /**< \brief EIC signal: EXTINT2 on PA02 mux A */ +#define MUX_PA02A_EIC_EXTINT2 0L +#define PINMUX_PA02A_EIC_EXTINT2 ((PIN_PA02A_EIC_EXTINT2 << 16) | MUX_PA02A_EIC_EXTINT2) +#define PORT_PA02A_EIC_EXTINT2 (1ul << 2) +#define PIN_PB02A_EIC_EXTINT2 34L /**< \brief EIC signal: EXTINT2 on PB02 mux A */ +#define MUX_PB02A_EIC_EXTINT2 0L +#define PINMUX_PB02A_EIC_EXTINT2 ((PIN_PB02A_EIC_EXTINT2 << 16) | MUX_PB02A_EIC_EXTINT2) +#define PORT_PB02A_EIC_EXTINT2 (1ul << 2) +#define PIN_PA03A_EIC_EXTINT3 3L /**< \brief EIC signal: EXTINT3 on PA03 mux A */ +#define MUX_PA03A_EIC_EXTINT3 0L +#define PINMUX_PA03A_EIC_EXTINT3 ((PIN_PA03A_EIC_EXTINT3 << 16) | MUX_PA03A_EIC_EXTINT3) +#define PORT_PA03A_EIC_EXTINT3 (1ul << 3) +#define PIN_PA19A_EIC_EXTINT3 19L /**< \brief EIC signal: EXTINT3 on PA19 mux A */ +#define MUX_PA19A_EIC_EXTINT3 0L +#define PINMUX_PA19A_EIC_EXTINT3 ((PIN_PA19A_EIC_EXTINT3 << 16) | MUX_PA19A_EIC_EXTINT3) +#define PORT_PA19A_EIC_EXTINT3 (1ul << 19) +#define PIN_PB03A_EIC_EXTINT3 35L /**< \brief EIC signal: EXTINT3 on PB03 mux A */ +#define MUX_PB03A_EIC_EXTINT3 0L +#define PINMUX_PB03A_EIC_EXTINT3 ((PIN_PB03A_EIC_EXTINT3 << 16) | MUX_PB03A_EIC_EXTINT3) +#define PORT_PB03A_EIC_EXTINT3 (1ul << 3) +#define PIN_PA04A_EIC_EXTINT4 4L /**< \brief EIC signal: EXTINT4 on PA04 mux A */ +#define MUX_PA04A_EIC_EXTINT4 0L +#define PINMUX_PA04A_EIC_EXTINT4 ((PIN_PA04A_EIC_EXTINT4 << 16) | MUX_PA04A_EIC_EXTINT4) +#define PORT_PA04A_EIC_EXTINT4 (1ul << 4) +#define PIN_PA20A_EIC_EXTINT4 20L /**< \brief EIC signal: EXTINT4 on PA20 mux A */ +#define MUX_PA20A_EIC_EXTINT4 0L +#define PINMUX_PA20A_EIC_EXTINT4 ((PIN_PA20A_EIC_EXTINT4 << 16) | MUX_PA20A_EIC_EXTINT4) +#define PORT_PA20A_EIC_EXTINT4 (1ul << 20) +#define PIN_PB04A_EIC_EXTINT4 36L /**< \brief EIC signal: EXTINT4 on PB04 mux A */ +#define MUX_PB04A_EIC_EXTINT4 0L +#define PINMUX_PB04A_EIC_EXTINT4 ((PIN_PB04A_EIC_EXTINT4 << 16) | MUX_PB04A_EIC_EXTINT4) +#define PORT_PB04A_EIC_EXTINT4 (1ul << 4) +#define PIN_PA05A_EIC_EXTINT5 5L /**< \brief EIC signal: EXTINT5 on PA05 mux A */ +#define MUX_PA05A_EIC_EXTINT5 0L +#define PINMUX_PA05A_EIC_EXTINT5 ((PIN_PA05A_EIC_EXTINT5 << 16) | MUX_PA05A_EIC_EXTINT5) +#define PORT_PA05A_EIC_EXTINT5 (1ul << 5) +#define PIN_PA21A_EIC_EXTINT5 21L /**< \brief EIC signal: EXTINT5 on PA21 mux A */ +#define MUX_PA21A_EIC_EXTINT5 0L +#define PINMUX_PA21A_EIC_EXTINT5 ((PIN_PA21A_EIC_EXTINT5 << 16) | MUX_PA21A_EIC_EXTINT5) +#define PORT_PA21A_EIC_EXTINT5 (1ul << 21) +#define PIN_PB05A_EIC_EXTINT5 37L /**< \brief EIC signal: EXTINT5 on PB05 mux A */ +#define MUX_PB05A_EIC_EXTINT5 0L +#define PINMUX_PB05A_EIC_EXTINT5 ((PIN_PB05A_EIC_EXTINT5 << 16) | MUX_PB05A_EIC_EXTINT5) +#define PORT_PB05A_EIC_EXTINT5 (1ul << 5) +#define PIN_PA06A_EIC_EXTINT6 6L /**< \brief EIC signal: EXTINT6 on PA06 mux A */ +#define MUX_PA06A_EIC_EXTINT6 0L +#define PINMUX_PA06A_EIC_EXTINT6 ((PIN_PA06A_EIC_EXTINT6 << 16) | MUX_PA06A_EIC_EXTINT6) +#define PORT_PA06A_EIC_EXTINT6 (1ul << 6) +#define PIN_PA22A_EIC_EXTINT6 22L /**< \brief EIC signal: EXTINT6 on PA22 mux A */ +#define MUX_PA22A_EIC_EXTINT6 0L +#define PINMUX_PA22A_EIC_EXTINT6 ((PIN_PA22A_EIC_EXTINT6 << 16) | MUX_PA22A_EIC_EXTINT6) +#define PORT_PA22A_EIC_EXTINT6 (1ul << 22) +#define PIN_PB06A_EIC_EXTINT6 38L /**< \brief EIC signal: EXTINT6 on PB06 mux A */ +#define MUX_PB06A_EIC_EXTINT6 0L +#define PINMUX_PB06A_EIC_EXTINT6 ((PIN_PB06A_EIC_EXTINT6 << 16) | MUX_PB06A_EIC_EXTINT6) +#define PORT_PB06A_EIC_EXTINT6 (1ul << 6) +#define PIN_PB22A_EIC_EXTINT6 54L /**< \brief EIC signal: EXTINT6 on PB22 mux A */ +#define MUX_PB22A_EIC_EXTINT6 0L +#define PINMUX_PB22A_EIC_EXTINT6 ((PIN_PB22A_EIC_EXTINT6 << 16) | MUX_PB22A_EIC_EXTINT6) +#define PORT_PB22A_EIC_EXTINT6 (1ul << 22) +#define PIN_PA07A_EIC_EXTINT7 7L /**< \brief EIC signal: EXTINT7 on PA07 mux A */ +#define MUX_PA07A_EIC_EXTINT7 0L +#define PINMUX_PA07A_EIC_EXTINT7 ((PIN_PA07A_EIC_EXTINT7 << 16) | MUX_PA07A_EIC_EXTINT7) +#define PORT_PA07A_EIC_EXTINT7 (1ul << 7) +#define PIN_PA23A_EIC_EXTINT7 23L /**< \brief EIC signal: EXTINT7 on PA23 mux A */ +#define MUX_PA23A_EIC_EXTINT7 0L +#define PINMUX_PA23A_EIC_EXTINT7 ((PIN_PA23A_EIC_EXTINT7 << 16) | MUX_PA23A_EIC_EXTINT7) +#define PORT_PA23A_EIC_EXTINT7 (1ul << 23) +#define PIN_PB07A_EIC_EXTINT7 39L /**< \brief EIC signal: EXTINT7 on PB07 mux A */ +#define MUX_PB07A_EIC_EXTINT7 0L +#define PINMUX_PB07A_EIC_EXTINT7 ((PIN_PB07A_EIC_EXTINT7 << 16) | MUX_PB07A_EIC_EXTINT7) +#define PORT_PB07A_EIC_EXTINT7 (1ul << 7) +#define PIN_PB23A_EIC_EXTINT7 55L /**< \brief EIC signal: EXTINT7 on PB23 mux A */ +#define MUX_PB23A_EIC_EXTINT7 0L +#define PINMUX_PB23A_EIC_EXTINT7 ((PIN_PB23A_EIC_EXTINT7 << 16) | MUX_PB23A_EIC_EXTINT7) +#define PORT_PB23A_EIC_EXTINT7 (1ul << 23) +#define PIN_PA28A_EIC_EXTINT8 28L /**< \brief EIC signal: EXTINT8 on PA28 mux A */ +#define MUX_PA28A_EIC_EXTINT8 0L +#define PINMUX_PA28A_EIC_EXTINT8 ((PIN_PA28A_EIC_EXTINT8 << 16) | MUX_PA28A_EIC_EXTINT8) +#define PORT_PA28A_EIC_EXTINT8 (1ul << 28) +#define PIN_PB08A_EIC_EXTINT8 40L /**< \brief EIC signal: EXTINT8 on PB08 mux A */ +#define MUX_PB08A_EIC_EXTINT8 0L +#define PINMUX_PB08A_EIC_EXTINT8 ((PIN_PB08A_EIC_EXTINT8 << 16) | MUX_PB08A_EIC_EXTINT8) +#define PORT_PB08A_EIC_EXTINT8 (1ul << 8) +#define PIN_PA09A_EIC_EXTINT9 9L /**< \brief EIC signal: EXTINT9 on PA09 mux A */ +#define MUX_PA09A_EIC_EXTINT9 0L +#define PINMUX_PA09A_EIC_EXTINT9 ((PIN_PA09A_EIC_EXTINT9 << 16) | MUX_PA09A_EIC_EXTINT9) +#define PORT_PA09A_EIC_EXTINT9 (1ul << 9) +#define PIN_PB09A_EIC_EXTINT9 41L /**< \brief EIC signal: EXTINT9 on PB09 mux A */ +#define MUX_PB09A_EIC_EXTINT9 0L +#define PINMUX_PB09A_EIC_EXTINT9 ((PIN_PB09A_EIC_EXTINT9 << 16) | MUX_PB09A_EIC_EXTINT9) +#define PORT_PB09A_EIC_EXTINT9 (1ul << 9) +#define PIN_PA10A_EIC_EXTINT10 10L /**< \brief EIC signal: EXTINT10 on PA10 mux A */ +#define MUX_PA10A_EIC_EXTINT10 0L +#define PINMUX_PA10A_EIC_EXTINT10 ((PIN_PA10A_EIC_EXTINT10 << 16) | MUX_PA10A_EIC_EXTINT10) +#define PORT_PA10A_EIC_EXTINT10 (1ul << 10) +#define PIN_PA30A_EIC_EXTINT10 30L /**< \brief EIC signal: EXTINT10 on PA30 mux A */ +#define MUX_PA30A_EIC_EXTINT10 0L +#define PINMUX_PA30A_EIC_EXTINT10 ((PIN_PA30A_EIC_EXTINT10 << 16) | MUX_PA30A_EIC_EXTINT10) +#define PORT_PA30A_EIC_EXTINT10 (1ul << 30) +#define PIN_PB10A_EIC_EXTINT10 42L /**< \brief EIC signal: EXTINT10 on PB10 mux A */ +#define MUX_PB10A_EIC_EXTINT10 0L +#define PINMUX_PB10A_EIC_EXTINT10 ((PIN_PB10A_EIC_EXTINT10 << 16) | MUX_PB10A_EIC_EXTINT10) +#define PORT_PB10A_EIC_EXTINT10 (1ul << 10) +#define PIN_PA11A_EIC_EXTINT11 11L /**< \brief EIC signal: EXTINT11 on PA11 mux A */ +#define MUX_PA11A_EIC_EXTINT11 0L +#define PINMUX_PA11A_EIC_EXTINT11 ((PIN_PA11A_EIC_EXTINT11 << 16) | MUX_PA11A_EIC_EXTINT11) +#define PORT_PA11A_EIC_EXTINT11 (1ul << 11) +#define PIN_PA31A_EIC_EXTINT11 31L /**< \brief EIC signal: EXTINT11 on PA31 mux A */ +#define MUX_PA31A_EIC_EXTINT11 0L +#define PINMUX_PA31A_EIC_EXTINT11 ((PIN_PA31A_EIC_EXTINT11 << 16) | MUX_PA31A_EIC_EXTINT11) +#define PORT_PA31A_EIC_EXTINT11 (1ul << 31) +#define PIN_PB11A_EIC_EXTINT11 43L /**< \brief EIC signal: EXTINT11 on PB11 mux A */ +#define MUX_PB11A_EIC_EXTINT11 0L +#define PINMUX_PB11A_EIC_EXTINT11 ((PIN_PB11A_EIC_EXTINT11 << 16) | MUX_PB11A_EIC_EXTINT11) +#define PORT_PB11A_EIC_EXTINT11 (1ul << 11) +#define PIN_PA12A_EIC_EXTINT12 12L /**< \brief EIC signal: EXTINT12 on PA12 mux A */ +#define MUX_PA12A_EIC_EXTINT12 0L +#define PINMUX_PA12A_EIC_EXTINT12 ((PIN_PA12A_EIC_EXTINT12 << 16) | MUX_PA12A_EIC_EXTINT12) +#define PORT_PA12A_EIC_EXTINT12 (1ul << 12) +#define PIN_PA24A_EIC_EXTINT12 24L /**< \brief EIC signal: EXTINT12 on PA24 mux A */ +#define MUX_PA24A_EIC_EXTINT12 0L +#define PINMUX_PA24A_EIC_EXTINT12 ((PIN_PA24A_EIC_EXTINT12 << 16) | MUX_PA24A_EIC_EXTINT12) +#define PORT_PA24A_EIC_EXTINT12 (1ul << 24) +#define PIN_PB12A_EIC_EXTINT12 44L /**< \brief EIC signal: EXTINT12 on PB12 mux A */ +#define MUX_PB12A_EIC_EXTINT12 0L +#define PINMUX_PB12A_EIC_EXTINT12 ((PIN_PB12A_EIC_EXTINT12 << 16) | MUX_PB12A_EIC_EXTINT12) +#define PORT_PB12A_EIC_EXTINT12 (1ul << 12) +#define PIN_PA13A_EIC_EXTINT13 13L /**< \brief EIC signal: EXTINT13 on PA13 mux A */ +#define MUX_PA13A_EIC_EXTINT13 0L +#define PINMUX_PA13A_EIC_EXTINT13 ((PIN_PA13A_EIC_EXTINT13 << 16) | MUX_PA13A_EIC_EXTINT13) +#define PORT_PA13A_EIC_EXTINT13 (1ul << 13) +#define PIN_PA25A_EIC_EXTINT13 25L /**< \brief EIC signal: EXTINT13 on PA25 mux A */ +#define MUX_PA25A_EIC_EXTINT13 0L +#define PINMUX_PA25A_EIC_EXTINT13 ((PIN_PA25A_EIC_EXTINT13 << 16) | MUX_PA25A_EIC_EXTINT13) +#define PORT_PA25A_EIC_EXTINT13 (1ul << 25) +#define PIN_PB13A_EIC_EXTINT13 45L /**< \brief EIC signal: EXTINT13 on PB13 mux A */ +#define MUX_PB13A_EIC_EXTINT13 0L +#define PINMUX_PB13A_EIC_EXTINT13 ((PIN_PB13A_EIC_EXTINT13 << 16) | MUX_PB13A_EIC_EXTINT13) +#define PORT_PB13A_EIC_EXTINT13 (1ul << 13) +#define PIN_PB14A_EIC_EXTINT14 46L /**< \brief EIC signal: EXTINT14 on PB14 mux A */ +#define MUX_PB14A_EIC_EXTINT14 0L +#define PINMUX_PB14A_EIC_EXTINT14 ((PIN_PB14A_EIC_EXTINT14 << 16) | MUX_PB14A_EIC_EXTINT14) +#define PORT_PB14A_EIC_EXTINT14 (1ul << 14) +#define PIN_PB30A_EIC_EXTINT14 62L /**< \brief EIC signal: EXTINT14 on PB30 mux A */ +#define MUX_PB30A_EIC_EXTINT14 0L +#define PINMUX_PB30A_EIC_EXTINT14 ((PIN_PB30A_EIC_EXTINT14 << 16) | MUX_PB30A_EIC_EXTINT14) +#define PORT_PB30A_EIC_EXTINT14 (1ul << 30) +#define PIN_PA14A_EIC_EXTINT14 14L /**< \brief EIC signal: EXTINT14 on PA14 mux A */ +#define MUX_PA14A_EIC_EXTINT14 0L +#define PINMUX_PA14A_EIC_EXTINT14 ((PIN_PA14A_EIC_EXTINT14 << 16) | MUX_PA14A_EIC_EXTINT14) +#define PORT_PA14A_EIC_EXTINT14 (1ul << 14) +#define PIN_PA15A_EIC_EXTINT15 15L /**< \brief EIC signal: EXTINT15 on PA15 mux A */ +#define MUX_PA15A_EIC_EXTINT15 0L +#define PINMUX_PA15A_EIC_EXTINT15 ((PIN_PA15A_EIC_EXTINT15 << 16) | MUX_PA15A_EIC_EXTINT15) +#define PORT_PA15A_EIC_EXTINT15 (1ul << 15) +#define PIN_PA27A_EIC_EXTINT15 27L /**< \brief EIC signal: EXTINT15 on PA27 mux A */ +#define MUX_PA27A_EIC_EXTINT15 0L +#define PINMUX_PA27A_EIC_EXTINT15 ((PIN_PA27A_EIC_EXTINT15 << 16) | MUX_PA27A_EIC_EXTINT15) +#define PORT_PA27A_EIC_EXTINT15 (1ul << 27) +#define PIN_PB15A_EIC_EXTINT15 47L /**< \brief EIC signal: EXTINT15 on PB15 mux A */ +#define MUX_PB15A_EIC_EXTINT15 0L +#define PINMUX_PB15A_EIC_EXTINT15 ((PIN_PB15A_EIC_EXTINT15 << 16) | MUX_PB15A_EIC_EXTINT15) +#define PORT_PB15A_EIC_EXTINT15 (1ul << 15) +#define PIN_PB31A_EIC_EXTINT15 63L /**< \brief EIC signal: EXTINT15 on PB31 mux A */ +#define MUX_PB31A_EIC_EXTINT15 0L +#define PINMUX_PB31A_EIC_EXTINT15 ((PIN_PB31A_EIC_EXTINT15 << 16) | MUX_PB31A_EIC_EXTINT15) +#define PORT_PB31A_EIC_EXTINT15 (1ul << 31) +#define PIN_PA08A_EIC_NMI 8L /**< \brief EIC signal: NMI on PA08 mux A */ +#define MUX_PA08A_EIC_NMI 0L +#define PINMUX_PA08A_EIC_NMI ((PIN_PA08A_EIC_NMI << 16) | MUX_PA08A_EIC_NMI) +#define PORT_PA08A_EIC_NMI (1ul << 8) +/* ========== PORT definition for USB peripheral ========== */ +#define PIN_PA24G_USB_DM 24L /**< \brief USB signal: DM on PA24 mux G */ +#define MUX_PA24G_USB_DM 6L +#define PINMUX_PA24G_USB_DM ((PIN_PA24G_USB_DM << 16) | MUX_PA24G_USB_DM) +#define PORT_PA24G_USB_DM (1ul << 24) +#define PIN_PA25G_USB_DP 25L /**< \brief USB signal: DP on PA25 mux G */ +#define MUX_PA25G_USB_DP 6L +#define PINMUX_PA25G_USB_DP ((PIN_PA25G_USB_DP << 16) | MUX_PA25G_USB_DP) +#define PORT_PA25G_USB_DP (1ul << 25) +#define PIN_PA23G_USB_SOF_1KHZ 23L /**< \brief USB signal: SOF_1KHZ on PA23 mux G */ +#define MUX_PA23G_USB_SOF_1KHZ 6L +#define PINMUX_PA23G_USB_SOF_1KHZ ((PIN_PA23G_USB_SOF_1KHZ << 16) | MUX_PA23G_USB_SOF_1KHZ) +#define PORT_PA23G_USB_SOF_1KHZ (1ul << 23) +/* ========== PORT definition for SERCOM0 peripheral ========== */ +#define PIN_PA04D_SERCOM0_PAD0 4L /**< \brief SERCOM0 signal: PAD0 on PA04 mux D */ +#define MUX_PA04D_SERCOM0_PAD0 3L +#define PINMUX_PA04D_SERCOM0_PAD0 ((PIN_PA04D_SERCOM0_PAD0 << 16) | MUX_PA04D_SERCOM0_PAD0) +#define PORT_PA04D_SERCOM0_PAD0 (1ul << 4) +#define PIN_PA08C_SERCOM0_PAD0 8L /**< \brief SERCOM0 signal: PAD0 on PA08 mux C */ +#define MUX_PA08C_SERCOM0_PAD0 2L +#define PINMUX_PA08C_SERCOM0_PAD0 ((PIN_PA08C_SERCOM0_PAD0 << 16) | MUX_PA08C_SERCOM0_PAD0) +#define PORT_PA08C_SERCOM0_PAD0 (1ul << 8) +#define PIN_PA05D_SERCOM0_PAD1 5L /**< \brief SERCOM0 signal: PAD1 on PA05 mux D */ +#define MUX_PA05D_SERCOM0_PAD1 3L +#define PINMUX_PA05D_SERCOM0_PAD1 ((PIN_PA05D_SERCOM0_PAD1 << 16) | MUX_PA05D_SERCOM0_PAD1) +#define PORT_PA05D_SERCOM0_PAD1 (1ul << 5) +#define PIN_PA09C_SERCOM0_PAD1 9L /**< \brief SERCOM0 signal: PAD1 on PA09 mux C */ +#define MUX_PA09C_SERCOM0_PAD1 2L +#define PINMUX_PA09C_SERCOM0_PAD1 ((PIN_PA09C_SERCOM0_PAD1 << 16) | MUX_PA09C_SERCOM0_PAD1) +#define PORT_PA09C_SERCOM0_PAD1 (1ul << 9) +#define PIN_PA06D_SERCOM0_PAD2 6L /**< \brief SERCOM0 signal: PAD2 on PA06 mux D */ +#define MUX_PA06D_SERCOM0_PAD2 3L +#define PINMUX_PA06D_SERCOM0_PAD2 ((PIN_PA06D_SERCOM0_PAD2 << 16) | MUX_PA06D_SERCOM0_PAD2) +#define PORT_PA06D_SERCOM0_PAD2 (1ul << 6) +#define PIN_PA10C_SERCOM0_PAD2 10L /**< \brief SERCOM0 signal: PAD2 on PA10 mux C */ +#define MUX_PA10C_SERCOM0_PAD2 2L +#define PINMUX_PA10C_SERCOM0_PAD2 ((PIN_PA10C_SERCOM0_PAD2 << 16) | MUX_PA10C_SERCOM0_PAD2) +#define PORT_PA10C_SERCOM0_PAD2 (1ul << 10) +#define PIN_PA07D_SERCOM0_PAD3 7L /**< \brief SERCOM0 signal: PAD3 on PA07 mux D */ +#define MUX_PA07D_SERCOM0_PAD3 3L +#define PINMUX_PA07D_SERCOM0_PAD3 ((PIN_PA07D_SERCOM0_PAD3 << 16) | MUX_PA07D_SERCOM0_PAD3) +#define PORT_PA07D_SERCOM0_PAD3 (1ul << 7) +#define PIN_PA11C_SERCOM0_PAD3 11L /**< \brief SERCOM0 signal: PAD3 on PA11 mux C */ +#define MUX_PA11C_SERCOM0_PAD3 2L +#define PINMUX_PA11C_SERCOM0_PAD3 ((PIN_PA11C_SERCOM0_PAD3 << 16) | MUX_PA11C_SERCOM0_PAD3) +#define PORT_PA11C_SERCOM0_PAD3 (1ul << 11) +/* ========== PORT definition for SERCOM1 peripheral ========== */ +#define PIN_PA16C_SERCOM1_PAD0 16L /**< \brief SERCOM1 signal: PAD0 on PA16 mux C */ +#define MUX_PA16C_SERCOM1_PAD0 2L +#define PINMUX_PA16C_SERCOM1_PAD0 ((PIN_PA16C_SERCOM1_PAD0 << 16) | MUX_PA16C_SERCOM1_PAD0) +#define PORT_PA16C_SERCOM1_PAD0 (1ul << 16) +#define PIN_PA00D_SERCOM1_PAD0 0L /**< \brief SERCOM1 signal: PAD0 on PA00 mux D */ +#define MUX_PA00D_SERCOM1_PAD0 3L +#define PINMUX_PA00D_SERCOM1_PAD0 ((PIN_PA00D_SERCOM1_PAD0 << 16) | MUX_PA00D_SERCOM1_PAD0) +#define PORT_PA00D_SERCOM1_PAD0 (1ul << 0) +#define PIN_PA17C_SERCOM1_PAD1 17L /**< \brief SERCOM1 signal: PAD1 on PA17 mux C */ +#define MUX_PA17C_SERCOM1_PAD1 2L +#define PINMUX_PA17C_SERCOM1_PAD1 ((PIN_PA17C_SERCOM1_PAD1 << 16) | MUX_PA17C_SERCOM1_PAD1) +#define PORT_PA17C_SERCOM1_PAD1 (1ul << 17) +#define PIN_PA01D_SERCOM1_PAD1 1L /**< \brief SERCOM1 signal: PAD1 on PA01 mux D */ +#define MUX_PA01D_SERCOM1_PAD1 3L +#define PINMUX_PA01D_SERCOM1_PAD1 ((PIN_PA01D_SERCOM1_PAD1 << 16) | MUX_PA01D_SERCOM1_PAD1) +#define PORT_PA01D_SERCOM1_PAD1 (1ul << 1) +#define PIN_PA30D_SERCOM1_PAD2 30L /**< \brief SERCOM1 signal: PAD2 on PA30 mux D */ +#define MUX_PA30D_SERCOM1_PAD2 3L +#define PINMUX_PA30D_SERCOM1_PAD2 ((PIN_PA30D_SERCOM1_PAD2 << 16) | MUX_PA30D_SERCOM1_PAD2) +#define PORT_PA30D_SERCOM1_PAD2 (1ul << 30) +#define PIN_PA18C_SERCOM1_PAD2 18L /**< \brief SERCOM1 signal: PAD2 on PA18 mux C */ +#define MUX_PA18C_SERCOM1_PAD2 2L +#define PINMUX_PA18C_SERCOM1_PAD2 ((PIN_PA18C_SERCOM1_PAD2 << 16) | MUX_PA18C_SERCOM1_PAD2) +#define PORT_PA18C_SERCOM1_PAD2 (1ul << 18) +#define PIN_PA31D_SERCOM1_PAD3 31L /**< \brief SERCOM1 signal: PAD3 on PA31 mux D */ +#define MUX_PA31D_SERCOM1_PAD3 3L +#define PINMUX_PA31D_SERCOM1_PAD3 ((PIN_PA31D_SERCOM1_PAD3 << 16) | MUX_PA31D_SERCOM1_PAD3) +#define PORT_PA31D_SERCOM1_PAD3 (1ul << 31) +#define PIN_PA19C_SERCOM1_PAD3 19L /**< \brief SERCOM1 signal: PAD3 on PA19 mux C */ +#define MUX_PA19C_SERCOM1_PAD3 2L +#define PINMUX_PA19C_SERCOM1_PAD3 ((PIN_PA19C_SERCOM1_PAD3 << 16) | MUX_PA19C_SERCOM1_PAD3) +#define PORT_PA19C_SERCOM1_PAD3 (1ul << 19) +/* ========== PORT definition for SERCOM2 peripheral ========== */ +#define PIN_PA08D_SERCOM2_PAD0 8L /**< \brief SERCOM2 signal: PAD0 on PA08 mux D */ +#define MUX_PA08D_SERCOM2_PAD0 3L +#define PINMUX_PA08D_SERCOM2_PAD0 ((PIN_PA08D_SERCOM2_PAD0 << 16) | MUX_PA08D_SERCOM2_PAD0) +#define PORT_PA08D_SERCOM2_PAD0 (1ul << 8) +#define PIN_PA12C_SERCOM2_PAD0 12L /**< \brief SERCOM2 signal: PAD0 on PA12 mux C */ +#define MUX_PA12C_SERCOM2_PAD0 2L +#define PINMUX_PA12C_SERCOM2_PAD0 ((PIN_PA12C_SERCOM2_PAD0 << 16) | MUX_PA12C_SERCOM2_PAD0) +#define PORT_PA12C_SERCOM2_PAD0 (1ul << 12) +#define PIN_PA09D_SERCOM2_PAD1 9L /**< \brief SERCOM2 signal: PAD1 on PA09 mux D */ +#define MUX_PA09D_SERCOM2_PAD1 3L +#define PINMUX_PA09D_SERCOM2_PAD1 ((PIN_PA09D_SERCOM2_PAD1 << 16) | MUX_PA09D_SERCOM2_PAD1) +#define PORT_PA09D_SERCOM2_PAD1 (1ul << 9) +#define PIN_PA13C_SERCOM2_PAD1 13L /**< \brief SERCOM2 signal: PAD1 on PA13 mux C */ +#define MUX_PA13C_SERCOM2_PAD1 2L +#define PINMUX_PA13C_SERCOM2_PAD1 ((PIN_PA13C_SERCOM2_PAD1 << 16) | MUX_PA13C_SERCOM2_PAD1) +#define PORT_PA13C_SERCOM2_PAD1 (1ul << 13) +#define PIN_PA10D_SERCOM2_PAD2 10L /**< \brief SERCOM2 signal: PAD2 on PA10 mux D */ +#define MUX_PA10D_SERCOM2_PAD2 3L +#define PINMUX_PA10D_SERCOM2_PAD2 ((PIN_PA10D_SERCOM2_PAD2 << 16) | MUX_PA10D_SERCOM2_PAD2) +#define PORT_PA10D_SERCOM2_PAD2 (1ul << 10) +#define PIN_PA14C_SERCOM2_PAD2 14L /**< \brief SERCOM2 signal: PAD2 on PA14 mux C */ +#define MUX_PA14C_SERCOM2_PAD2 2L +#define PINMUX_PA14C_SERCOM2_PAD2 ((PIN_PA14C_SERCOM2_PAD2 << 16) | MUX_PA14C_SERCOM2_PAD2) +#define PORT_PA14C_SERCOM2_PAD2 (1ul << 14) +#define PIN_PA11D_SERCOM2_PAD3 11L /**< \brief SERCOM2 signal: PAD3 on PA11 mux D */ +#define MUX_PA11D_SERCOM2_PAD3 3L +#define PINMUX_PA11D_SERCOM2_PAD3 ((PIN_PA11D_SERCOM2_PAD3 << 16) | MUX_PA11D_SERCOM2_PAD3) +#define PORT_PA11D_SERCOM2_PAD3 (1ul << 11) +#define PIN_PA15C_SERCOM2_PAD3 15L /**< \brief SERCOM2 signal: PAD3 on PA15 mux C */ +#define MUX_PA15C_SERCOM2_PAD3 2L +#define PINMUX_PA15C_SERCOM2_PAD3 ((PIN_PA15C_SERCOM2_PAD3 << 16) | MUX_PA15C_SERCOM2_PAD3) +#define PORT_PA15C_SERCOM2_PAD3 (1ul << 15) +/* ========== PORT definition for SERCOM3 peripheral ========== */ +#define PIN_PA16D_SERCOM3_PAD0 16L /**< \brief SERCOM3 signal: PAD0 on PA16 mux D */ +#define MUX_PA16D_SERCOM3_PAD0 3L +#define PINMUX_PA16D_SERCOM3_PAD0 ((PIN_PA16D_SERCOM3_PAD0 << 16) | MUX_PA16D_SERCOM3_PAD0) +#define PORT_PA16D_SERCOM3_PAD0 (1ul << 16) +#define PIN_PA22C_SERCOM3_PAD0 22L /**< \brief SERCOM3 signal: PAD0 on PA22 mux C */ +#define MUX_PA22C_SERCOM3_PAD0 2L +#define PINMUX_PA22C_SERCOM3_PAD0 ((PIN_PA22C_SERCOM3_PAD0 << 16) | MUX_PA22C_SERCOM3_PAD0) +#define PORT_PA22C_SERCOM3_PAD0 (1ul << 22) +#define PIN_PA17D_SERCOM3_PAD1 17L /**< \brief SERCOM3 signal: PAD1 on PA17 mux D */ +#define MUX_PA17D_SERCOM3_PAD1 3L +#define PINMUX_PA17D_SERCOM3_PAD1 ((PIN_PA17D_SERCOM3_PAD1 << 16) | MUX_PA17D_SERCOM3_PAD1) +#define PORT_PA17D_SERCOM3_PAD1 (1ul << 17) +#define PIN_PA23C_SERCOM3_PAD1 23L /**< \brief SERCOM3 signal: PAD1 on PA23 mux C */ +#define MUX_PA23C_SERCOM3_PAD1 2L +#define PINMUX_PA23C_SERCOM3_PAD1 ((PIN_PA23C_SERCOM3_PAD1 << 16) | MUX_PA23C_SERCOM3_PAD1) +#define PORT_PA23C_SERCOM3_PAD1 (1ul << 23) +#define PIN_PA18D_SERCOM3_PAD2 18L /**< \brief SERCOM3 signal: PAD2 on PA18 mux D */ +#define MUX_PA18D_SERCOM3_PAD2 3L +#define PINMUX_PA18D_SERCOM3_PAD2 ((PIN_PA18D_SERCOM3_PAD2 << 16) | MUX_PA18D_SERCOM3_PAD2) +#define PORT_PA18D_SERCOM3_PAD2 (1ul << 18) +#define PIN_PA20D_SERCOM3_PAD2 20L /**< \brief SERCOM3 signal: PAD2 on PA20 mux D */ +#define MUX_PA20D_SERCOM3_PAD2 3L +#define PINMUX_PA20D_SERCOM3_PAD2 ((PIN_PA20D_SERCOM3_PAD2 << 16) | MUX_PA20D_SERCOM3_PAD2) +#define PORT_PA20D_SERCOM3_PAD2 (1ul << 20) +#define PIN_PA24C_SERCOM3_PAD2 24L /**< \brief SERCOM3 signal: PAD2 on PA24 mux C */ +#define MUX_PA24C_SERCOM3_PAD2 2L +#define PINMUX_PA24C_SERCOM3_PAD2 ((PIN_PA24C_SERCOM3_PAD2 << 16) | MUX_PA24C_SERCOM3_PAD2) +#define PORT_PA24C_SERCOM3_PAD2 (1ul << 24) +#define PIN_PA19D_SERCOM3_PAD3 19L /**< \brief SERCOM3 signal: PAD3 on PA19 mux D */ +#define MUX_PA19D_SERCOM3_PAD3 3L +#define PINMUX_PA19D_SERCOM3_PAD3 ((PIN_PA19D_SERCOM3_PAD3 << 16) | MUX_PA19D_SERCOM3_PAD3) +#define PORT_PA19D_SERCOM3_PAD3 (1ul << 19) +#define PIN_PA21D_SERCOM3_PAD3 21L /**< \brief SERCOM3 signal: PAD3 on PA21 mux D */ +#define MUX_PA21D_SERCOM3_PAD3 3L +#define PINMUX_PA21D_SERCOM3_PAD3 ((PIN_PA21D_SERCOM3_PAD3 << 16) | MUX_PA21D_SERCOM3_PAD3) +#define PORT_PA21D_SERCOM3_PAD3 (1ul << 21) +#define PIN_PA25C_SERCOM3_PAD3 25L /**< \brief SERCOM3 signal: PAD3 on PA25 mux C */ +#define MUX_PA25C_SERCOM3_PAD3 2L +#define PINMUX_PA25C_SERCOM3_PAD3 ((PIN_PA25C_SERCOM3_PAD3 << 16) | MUX_PA25C_SERCOM3_PAD3) +#define PORT_PA25C_SERCOM3_PAD3 (1ul << 25) +/* ========== PORT definition for SERCOM4 peripheral ========== */ +#define PIN_PA12D_SERCOM4_PAD0 12L /**< \brief SERCOM4 signal: PAD0 on PA12 mux D */ +#define MUX_PA12D_SERCOM4_PAD0 3L +#define PINMUX_PA12D_SERCOM4_PAD0 ((PIN_PA12D_SERCOM4_PAD0 << 16) | MUX_PA12D_SERCOM4_PAD0) +#define PORT_PA12D_SERCOM4_PAD0 (1ul << 12) +#define PIN_PB08D_SERCOM4_PAD0 40L /**< \brief SERCOM4 signal: PAD0 on PB08 mux D */ +#define MUX_PB08D_SERCOM4_PAD0 3L +#define PINMUX_PB08D_SERCOM4_PAD0 ((PIN_PB08D_SERCOM4_PAD0 << 16) | MUX_PB08D_SERCOM4_PAD0) +#define PORT_PB08D_SERCOM4_PAD0 (1ul << 8) +#define PIN_PB12C_SERCOM4_PAD0 44L /**< \brief SERCOM4 signal: PAD0 on PB12 mux C */ +#define MUX_PB12C_SERCOM4_PAD0 2L +#define PINMUX_PB12C_SERCOM4_PAD0 ((PIN_PB12C_SERCOM4_PAD0 << 16) | MUX_PB12C_SERCOM4_PAD0) +#define PORT_PB12C_SERCOM4_PAD0 (1ul << 12) +#define PIN_PA13D_SERCOM4_PAD1 13L /**< \brief SERCOM4 signal: PAD1 on PA13 mux D */ +#define MUX_PA13D_SERCOM4_PAD1 3L +#define PINMUX_PA13D_SERCOM4_PAD1 ((PIN_PA13D_SERCOM4_PAD1 << 16) | MUX_PA13D_SERCOM4_PAD1) +#define PORT_PA13D_SERCOM4_PAD1 (1ul << 13) +#define PIN_PB09D_SERCOM4_PAD1 41L /**< \brief SERCOM4 signal: PAD1 on PB09 mux D */ +#define MUX_PB09D_SERCOM4_PAD1 3L +#define PINMUX_PB09D_SERCOM4_PAD1 ((PIN_PB09D_SERCOM4_PAD1 << 16) | MUX_PB09D_SERCOM4_PAD1) +#define PORT_PB09D_SERCOM4_PAD1 (1ul << 9) +#define PIN_PB13C_SERCOM4_PAD1 45L /**< \brief SERCOM4 signal: PAD1 on PB13 mux C */ +#define MUX_PB13C_SERCOM4_PAD1 2L +#define PINMUX_PB13C_SERCOM4_PAD1 ((PIN_PB13C_SERCOM4_PAD1 << 16) | MUX_PB13C_SERCOM4_PAD1) +#define PORT_PB13C_SERCOM4_PAD1 (1ul << 13) +#define PIN_PA14D_SERCOM4_PAD2 14L /**< \brief SERCOM4 signal: PAD2 on PA14 mux D */ +#define MUX_PA14D_SERCOM4_PAD2 3L +#define PINMUX_PA14D_SERCOM4_PAD2 ((PIN_PA14D_SERCOM4_PAD2 << 16) | MUX_PA14D_SERCOM4_PAD2) +#define PORT_PA14D_SERCOM4_PAD2 (1ul << 14) +#define PIN_PB10D_SERCOM4_PAD2 42L /**< \brief SERCOM4 signal: PAD2 on PB10 mux D */ +#define MUX_PB10D_SERCOM4_PAD2 3L +#define PINMUX_PB10D_SERCOM4_PAD2 ((PIN_PB10D_SERCOM4_PAD2 << 16) | MUX_PB10D_SERCOM4_PAD2) +#define PORT_PB10D_SERCOM4_PAD2 (1ul << 10) +#define PIN_PB14C_SERCOM4_PAD2 46L /**< \brief SERCOM4 signal: PAD2 on PB14 mux C */ +#define MUX_PB14C_SERCOM4_PAD2 2L +#define PINMUX_PB14C_SERCOM4_PAD2 ((PIN_PB14C_SERCOM4_PAD2 << 16) | MUX_PB14C_SERCOM4_PAD2) +#define PORT_PB14C_SERCOM4_PAD2 (1ul << 14) +#define PIN_PA15D_SERCOM4_PAD3 15L /**< \brief SERCOM4 signal: PAD3 on PA15 mux D */ +#define MUX_PA15D_SERCOM4_PAD3 3L +#define PINMUX_PA15D_SERCOM4_PAD3 ((PIN_PA15D_SERCOM4_PAD3 << 16) | MUX_PA15D_SERCOM4_PAD3) +#define PORT_PA15D_SERCOM4_PAD3 (1ul << 15) +#define PIN_PB11D_SERCOM4_PAD3 43L /**< \brief SERCOM4 signal: PAD3 on PB11 mux D */ +#define MUX_PB11D_SERCOM4_PAD3 3L +#define PINMUX_PB11D_SERCOM4_PAD3 ((PIN_PB11D_SERCOM4_PAD3 << 16) | MUX_PB11D_SERCOM4_PAD3) +#define PORT_PB11D_SERCOM4_PAD3 (1ul << 11) +#define PIN_PB15C_SERCOM4_PAD3 47L /**< \brief SERCOM4 signal: PAD3 on PB15 mux C */ +#define MUX_PB15C_SERCOM4_PAD3 2L +#define PINMUX_PB15C_SERCOM4_PAD3 ((PIN_PB15C_SERCOM4_PAD3 << 16) | MUX_PB15C_SERCOM4_PAD3) +#define PORT_PB15C_SERCOM4_PAD3 (1ul << 15) +/* ========== PORT definition for SERCOM5 peripheral ========== */ +#define PIN_PB16C_SERCOM5_PAD0 48L /**< \brief SERCOM5 signal: PAD0 on PB16 mux C */ +#define MUX_PB16C_SERCOM5_PAD0 2L +#define PINMUX_PB16C_SERCOM5_PAD0 ((PIN_PB16C_SERCOM5_PAD0 << 16) | MUX_PB16C_SERCOM5_PAD0) +#define PORT_PB16C_SERCOM5_PAD0 (1ul << 16) +#define PIN_PA22D_SERCOM5_PAD0 22L /**< \brief SERCOM5 signal: PAD0 on PA22 mux D */ +#define MUX_PA22D_SERCOM5_PAD0 3L +#define PINMUX_PA22D_SERCOM5_PAD0 ((PIN_PA22D_SERCOM5_PAD0 << 16) | MUX_PA22D_SERCOM5_PAD0) +#define PORT_PA22D_SERCOM5_PAD0 (1ul << 22) +#define PIN_PB02D_SERCOM5_PAD0 34L /**< \brief SERCOM5 signal: PAD0 on PB02 mux D */ +#define MUX_PB02D_SERCOM5_PAD0 3L +#define PINMUX_PB02D_SERCOM5_PAD0 ((PIN_PB02D_SERCOM5_PAD0 << 16) | MUX_PB02D_SERCOM5_PAD0) +#define PORT_PB02D_SERCOM5_PAD0 (1ul << 2) +#define PIN_PB30D_SERCOM5_PAD0 62L /**< \brief SERCOM5 signal: PAD0 on PB30 mux D */ +#define MUX_PB30D_SERCOM5_PAD0 3L +#define PINMUX_PB30D_SERCOM5_PAD0 ((PIN_PB30D_SERCOM5_PAD0 << 16) | MUX_PB30D_SERCOM5_PAD0) +#define PORT_PB30D_SERCOM5_PAD0 (1ul << 30) +#define PIN_PB17C_SERCOM5_PAD1 49L /**< \brief SERCOM5 signal: PAD1 on PB17 mux C */ +#define MUX_PB17C_SERCOM5_PAD1 2L +#define PINMUX_PB17C_SERCOM5_PAD1 ((PIN_PB17C_SERCOM5_PAD1 << 16) | MUX_PB17C_SERCOM5_PAD1) +#define PORT_PB17C_SERCOM5_PAD1 (1ul << 17) +#define PIN_PA23D_SERCOM5_PAD1 23L /**< \brief SERCOM5 signal: PAD1 on PA23 mux D */ +#define MUX_PA23D_SERCOM5_PAD1 3L +#define PINMUX_PA23D_SERCOM5_PAD1 ((PIN_PA23D_SERCOM5_PAD1 << 16) | MUX_PA23D_SERCOM5_PAD1) +#define PORT_PA23D_SERCOM5_PAD1 (1ul << 23) +#define PIN_PB03D_SERCOM5_PAD1 35L /**< \brief SERCOM5 signal: PAD1 on PB03 mux D */ +#define MUX_PB03D_SERCOM5_PAD1 3L +#define PINMUX_PB03D_SERCOM5_PAD1 ((PIN_PB03D_SERCOM5_PAD1 << 16) | MUX_PB03D_SERCOM5_PAD1) +#define PORT_PB03D_SERCOM5_PAD1 (1ul << 3) +#define PIN_PB31D_SERCOM5_PAD1 63L /**< \brief SERCOM5 signal: PAD1 on PB31 mux D */ +#define MUX_PB31D_SERCOM5_PAD1 3L +#define PINMUX_PB31D_SERCOM5_PAD1 ((PIN_PB31D_SERCOM5_PAD1 << 16) | MUX_PB31D_SERCOM5_PAD1) +#define PORT_PB31D_SERCOM5_PAD1 (1ul << 31) +#define PIN_PA24D_SERCOM5_PAD2 24L /**< \brief SERCOM5 signal: PAD2 on PA24 mux D */ +#define MUX_PA24D_SERCOM5_PAD2 3L +#define PINMUX_PA24D_SERCOM5_PAD2 ((PIN_PA24D_SERCOM5_PAD2 << 16) | MUX_PA24D_SERCOM5_PAD2) +#define PORT_PA24D_SERCOM5_PAD2 (1ul << 24) +#define PIN_PB00D_SERCOM5_PAD2 32L /**< \brief SERCOM5 signal: PAD2 on PB00 mux D */ +#define MUX_PB00D_SERCOM5_PAD2 3L +#define PINMUX_PB00D_SERCOM5_PAD2 ((PIN_PB00D_SERCOM5_PAD2 << 16) | MUX_PB00D_SERCOM5_PAD2) +#define PORT_PB00D_SERCOM5_PAD2 (1ul << 0) +#define PIN_PB22D_SERCOM5_PAD2 54L /**< \brief SERCOM5 signal: PAD2 on PB22 mux D */ +#define MUX_PB22D_SERCOM5_PAD2 3L +#define PINMUX_PB22D_SERCOM5_PAD2 ((PIN_PB22D_SERCOM5_PAD2 << 16) | MUX_PB22D_SERCOM5_PAD2) +#define PORT_PB22D_SERCOM5_PAD2 (1ul << 22) +#define PIN_PA20C_SERCOM5_PAD2 20L /**< \brief SERCOM5 signal: PAD2 on PA20 mux C */ +#define MUX_PA20C_SERCOM5_PAD2 2L +#define PINMUX_PA20C_SERCOM5_PAD2 ((PIN_PA20C_SERCOM5_PAD2 << 16) | MUX_PA20C_SERCOM5_PAD2) +#define PORT_PA20C_SERCOM5_PAD2 (1ul << 20) +#define PIN_PA25D_SERCOM5_PAD3 25L /**< \brief SERCOM5 signal: PAD3 on PA25 mux D */ +#define MUX_PA25D_SERCOM5_PAD3 3L +#define PINMUX_PA25D_SERCOM5_PAD3 ((PIN_PA25D_SERCOM5_PAD3 << 16) | MUX_PA25D_SERCOM5_PAD3) +#define PORT_PA25D_SERCOM5_PAD3 (1ul << 25) +#define PIN_PB01D_SERCOM5_PAD3 33L /**< \brief SERCOM5 signal: PAD3 on PB01 mux D */ +#define MUX_PB01D_SERCOM5_PAD3 3L +#define PINMUX_PB01D_SERCOM5_PAD3 ((PIN_PB01D_SERCOM5_PAD3 << 16) | MUX_PB01D_SERCOM5_PAD3) +#define PORT_PB01D_SERCOM5_PAD3 (1ul << 1) +#define PIN_PB23D_SERCOM5_PAD3 55L /**< \brief SERCOM5 signal: PAD3 on PB23 mux D */ +#define MUX_PB23D_SERCOM5_PAD3 3L +#define PINMUX_PB23D_SERCOM5_PAD3 ((PIN_PB23D_SERCOM5_PAD3 << 16) | MUX_PB23D_SERCOM5_PAD3) +#define PORT_PB23D_SERCOM5_PAD3 (1ul << 23) +#define PIN_PA21C_SERCOM5_PAD3 21L /**< \brief SERCOM5 signal: PAD3 on PA21 mux C */ +#define MUX_PA21C_SERCOM5_PAD3 2L +#define PINMUX_PA21C_SERCOM5_PAD3 ((PIN_PA21C_SERCOM5_PAD3 << 16) | MUX_PA21C_SERCOM5_PAD3) +#define PORT_PA21C_SERCOM5_PAD3 (1ul << 21) +/* ========== PORT definition for TCC0 peripheral ========== */ +#define PIN_PA04E_TCC0_WO0 4L /**< \brief TCC0 signal: WO0 on PA04 mux E */ +#define MUX_PA04E_TCC0_WO0 4L +#define PINMUX_PA04E_TCC0_WO0 ((PIN_PA04E_TCC0_WO0 << 16) | MUX_PA04E_TCC0_WO0) +#define PORT_PA04E_TCC0_WO0 (1ul << 4) +#define PIN_PA08E_TCC0_WO0 8L /**< \brief TCC0 signal: WO0 on PA08 mux E */ +#define MUX_PA08E_TCC0_WO0 4L +#define PINMUX_PA08E_TCC0_WO0 ((PIN_PA08E_TCC0_WO0 << 16) | MUX_PA08E_TCC0_WO0) +#define PORT_PA08E_TCC0_WO0 (1ul << 8) +#define PIN_PB30E_TCC0_WO0 62L /**< \brief TCC0 signal: WO0 on PB30 mux E */ +#define MUX_PB30E_TCC0_WO0 4L +#define PINMUX_PB30E_TCC0_WO0 ((PIN_PB30E_TCC0_WO0 << 16) | MUX_PB30E_TCC0_WO0) +#define PORT_PB30E_TCC0_WO0 (1ul << 30) +#define PIN_PA05E_TCC0_WO1 5L /**< \brief TCC0 signal: WO1 on PA05 mux E */ +#define MUX_PA05E_TCC0_WO1 4L +#define PINMUX_PA05E_TCC0_WO1 ((PIN_PA05E_TCC0_WO1 << 16) | MUX_PA05E_TCC0_WO1) +#define PORT_PA05E_TCC0_WO1 (1ul << 5) +#define PIN_PA09E_TCC0_WO1 9L /**< \brief TCC0 signal: WO1 on PA09 mux E */ +#define MUX_PA09E_TCC0_WO1 4L +#define PINMUX_PA09E_TCC0_WO1 ((PIN_PA09E_TCC0_WO1 << 16) | MUX_PA09E_TCC0_WO1) +#define PORT_PA09E_TCC0_WO1 (1ul << 9) +#define PIN_PB31E_TCC0_WO1 63L /**< \brief TCC0 signal: WO1 on PB31 mux E */ +#define MUX_PB31E_TCC0_WO1 4L +#define PINMUX_PB31E_TCC0_WO1 ((PIN_PB31E_TCC0_WO1 << 16) | MUX_PB31E_TCC0_WO1) +#define PORT_PB31E_TCC0_WO1 (1ul << 31) +#define PIN_PA10F_TCC0_WO2 10L /**< \brief TCC0 signal: WO2 on PA10 mux F */ +#define MUX_PA10F_TCC0_WO2 5L +#define PINMUX_PA10F_TCC0_WO2 ((PIN_PA10F_TCC0_WO2 << 16) | MUX_PA10F_TCC0_WO2) +#define PORT_PA10F_TCC0_WO2 (1ul << 10) +#define PIN_PA18F_TCC0_WO2 18L /**< \brief TCC0 signal: WO2 on PA18 mux F */ +#define MUX_PA18F_TCC0_WO2 5L +#define PINMUX_PA18F_TCC0_WO2 ((PIN_PA18F_TCC0_WO2 << 16) | MUX_PA18F_TCC0_WO2) +#define PORT_PA18F_TCC0_WO2 (1ul << 18) +#define PIN_PA11F_TCC0_WO3 11L /**< \brief TCC0 signal: WO3 on PA11 mux F */ +#define MUX_PA11F_TCC0_WO3 5L +#define PINMUX_PA11F_TCC0_WO3 ((PIN_PA11F_TCC0_WO3 << 16) | MUX_PA11F_TCC0_WO3) +#define PORT_PA11F_TCC0_WO3 (1ul << 11) +#define PIN_PA19F_TCC0_WO3 19L /**< \brief TCC0 signal: WO3 on PA19 mux F */ +#define MUX_PA19F_TCC0_WO3 5L +#define PINMUX_PA19F_TCC0_WO3 ((PIN_PA19F_TCC0_WO3 << 16) | MUX_PA19F_TCC0_WO3) +#define PORT_PA19F_TCC0_WO3 (1ul << 19) +#define PIN_PA14F_TCC0_WO4 14L /**< \brief TCC0 signal: WO4 on PA14 mux F */ +#define MUX_PA14F_TCC0_WO4 5L +#define PINMUX_PA14F_TCC0_WO4 ((PIN_PA14F_TCC0_WO4 << 16) | MUX_PA14F_TCC0_WO4) +#define PORT_PA14F_TCC0_WO4 (1ul << 14) +#define PIN_PA22F_TCC0_WO4 22L /**< \brief TCC0 signal: WO4 on PA22 mux F */ +#define MUX_PA22F_TCC0_WO4 5L +#define PINMUX_PA22F_TCC0_WO4 ((PIN_PA22F_TCC0_WO4 << 16) | MUX_PA22F_TCC0_WO4) +#define PORT_PA22F_TCC0_WO4 (1ul << 22) +#define PIN_PB10F_TCC0_WO4 42L /**< \brief TCC0 signal: WO4 on PB10 mux F */ +#define MUX_PB10F_TCC0_WO4 5L +#define PINMUX_PB10F_TCC0_WO4 ((PIN_PB10F_TCC0_WO4 << 16) | MUX_PB10F_TCC0_WO4) +#define PORT_PB10F_TCC0_WO4 (1ul << 10) +#define PIN_PB16F_TCC0_WO4 48L /**< \brief TCC0 signal: WO4 on PB16 mux F */ +#define MUX_PB16F_TCC0_WO4 5L +#define PINMUX_PB16F_TCC0_WO4 ((PIN_PB16F_TCC0_WO4 << 16) | MUX_PB16F_TCC0_WO4) +#define PORT_PB16F_TCC0_WO4 (1ul << 16) +#define PIN_PA15F_TCC0_WO5 15L /**< \brief TCC0 signal: WO5 on PA15 mux F */ +#define MUX_PA15F_TCC0_WO5 5L +#define PINMUX_PA15F_TCC0_WO5 ((PIN_PA15F_TCC0_WO5 << 16) | MUX_PA15F_TCC0_WO5) +#define PORT_PA15F_TCC0_WO5 (1ul << 15) +#define PIN_PA23F_TCC0_WO5 23L /**< \brief TCC0 signal: WO5 on PA23 mux F */ +#define MUX_PA23F_TCC0_WO5 5L +#define PINMUX_PA23F_TCC0_WO5 ((PIN_PA23F_TCC0_WO5 << 16) | MUX_PA23F_TCC0_WO5) +#define PORT_PA23F_TCC0_WO5 (1ul << 23) +#define PIN_PB11F_TCC0_WO5 43L /**< \brief TCC0 signal: WO5 on PB11 mux F */ +#define MUX_PB11F_TCC0_WO5 5L +#define PINMUX_PB11F_TCC0_WO5 ((PIN_PB11F_TCC0_WO5 << 16) | MUX_PB11F_TCC0_WO5) +#define PORT_PB11F_TCC0_WO5 (1ul << 11) +#define PIN_PB17F_TCC0_WO5 49L /**< \brief TCC0 signal: WO5 on PB17 mux F */ +#define MUX_PB17F_TCC0_WO5 5L +#define PINMUX_PB17F_TCC0_WO5 ((PIN_PB17F_TCC0_WO5 << 16) | MUX_PB17F_TCC0_WO5) +#define PORT_PB17F_TCC0_WO5 (1ul << 17) +#define PIN_PA12F_TCC0_WO6 12L /**< \brief TCC0 signal: WO6 on PA12 mux F */ +#define MUX_PA12F_TCC0_WO6 5L +#define PINMUX_PA12F_TCC0_WO6 ((PIN_PA12F_TCC0_WO6 << 16) | MUX_PA12F_TCC0_WO6) +#define PORT_PA12F_TCC0_WO6 (1ul << 12) +#define PIN_PA20F_TCC0_WO6 20L /**< \brief TCC0 signal: WO6 on PA20 mux F */ +#define MUX_PA20F_TCC0_WO6 5L +#define PINMUX_PA20F_TCC0_WO6 ((PIN_PA20F_TCC0_WO6 << 16) | MUX_PA20F_TCC0_WO6) +#define PORT_PA20F_TCC0_WO6 (1ul << 20) +#define PIN_PB12F_TCC0_WO6 44L /**< \brief TCC0 signal: WO6 on PB12 mux F */ +#define MUX_PB12F_TCC0_WO6 5L +#define PINMUX_PB12F_TCC0_WO6 ((PIN_PB12F_TCC0_WO6 << 16) | MUX_PB12F_TCC0_WO6) +#define PORT_PB12F_TCC0_WO6 (1ul << 12) +#define PIN_PA16F_TCC0_WO6 16L /**< \brief TCC0 signal: WO6 on PA16 mux F */ +#define MUX_PA16F_TCC0_WO6 5L +#define PINMUX_PA16F_TCC0_WO6 ((PIN_PA16F_TCC0_WO6 << 16) | MUX_PA16F_TCC0_WO6) +#define PORT_PA16F_TCC0_WO6 (1ul << 16) +#define PIN_PA13F_TCC0_WO7 13L /**< \brief TCC0 signal: WO7 on PA13 mux F */ +#define MUX_PA13F_TCC0_WO7 5L +#define PINMUX_PA13F_TCC0_WO7 ((PIN_PA13F_TCC0_WO7 << 16) | MUX_PA13F_TCC0_WO7) +#define PORT_PA13F_TCC0_WO7 (1ul << 13) +#define PIN_PA21F_TCC0_WO7 21L /**< \brief TCC0 signal: WO7 on PA21 mux F */ +#define MUX_PA21F_TCC0_WO7 5L +#define PINMUX_PA21F_TCC0_WO7 ((PIN_PA21F_TCC0_WO7 << 16) | MUX_PA21F_TCC0_WO7) +#define PORT_PA21F_TCC0_WO7 (1ul << 21) +#define PIN_PB13F_TCC0_WO7 45L /**< \brief TCC0 signal: WO7 on PB13 mux F */ +#define MUX_PB13F_TCC0_WO7 5L +#define PINMUX_PB13F_TCC0_WO7 ((PIN_PB13F_TCC0_WO7 << 16) | MUX_PB13F_TCC0_WO7) +#define PORT_PB13F_TCC0_WO7 (1ul << 13) +#define PIN_PA17F_TCC0_WO7 17L /**< \brief TCC0 signal: WO7 on PA17 mux F */ +#define MUX_PA17F_TCC0_WO7 5L +#define PINMUX_PA17F_TCC0_WO7 ((PIN_PA17F_TCC0_WO7 << 16) | MUX_PA17F_TCC0_WO7) +#define PORT_PA17F_TCC0_WO7 (1ul << 17) +/* ========== PORT definition for TCC1 peripheral ========== */ +#define PIN_PA06E_TCC1_WO0 6L /**< \brief TCC1 signal: WO0 on PA06 mux E */ +#define MUX_PA06E_TCC1_WO0 4L +#define PINMUX_PA06E_TCC1_WO0 ((PIN_PA06E_TCC1_WO0 << 16) | MUX_PA06E_TCC1_WO0) +#define PORT_PA06E_TCC1_WO0 (1ul << 6) +#define PIN_PA10E_TCC1_WO0 10L /**< \brief TCC1 signal: WO0 on PA10 mux E */ +#define MUX_PA10E_TCC1_WO0 4L +#define PINMUX_PA10E_TCC1_WO0 ((PIN_PA10E_TCC1_WO0 << 16) | MUX_PA10E_TCC1_WO0) +#define PORT_PA10E_TCC1_WO0 (1ul << 10) +#define PIN_PA30E_TCC1_WO0 30L /**< \brief TCC1 signal: WO0 on PA30 mux E */ +#define MUX_PA30E_TCC1_WO0 4L +#define PINMUX_PA30E_TCC1_WO0 ((PIN_PA30E_TCC1_WO0 << 16) | MUX_PA30E_TCC1_WO0) +#define PORT_PA30E_TCC1_WO0 (1ul << 30) +#define PIN_PA07E_TCC1_WO1 7L /**< \brief TCC1 signal: WO1 on PA07 mux E */ +#define MUX_PA07E_TCC1_WO1 4L +#define PINMUX_PA07E_TCC1_WO1 ((PIN_PA07E_TCC1_WO1 << 16) | MUX_PA07E_TCC1_WO1) +#define PORT_PA07E_TCC1_WO1 (1ul << 7) +#define PIN_PA11E_TCC1_WO1 11L /**< \brief TCC1 signal: WO1 on PA11 mux E */ +#define MUX_PA11E_TCC1_WO1 4L +#define PINMUX_PA11E_TCC1_WO1 ((PIN_PA11E_TCC1_WO1 << 16) | MUX_PA11E_TCC1_WO1) +#define PORT_PA11E_TCC1_WO1 (1ul << 11) +#define PIN_PA31E_TCC1_WO1 31L /**< \brief TCC1 signal: WO1 on PA31 mux E */ +#define MUX_PA31E_TCC1_WO1 4L +#define PINMUX_PA31E_TCC1_WO1 ((PIN_PA31E_TCC1_WO1 << 16) | MUX_PA31E_TCC1_WO1) +#define PORT_PA31E_TCC1_WO1 (1ul << 31) +#define PIN_PA08F_TCC1_WO2 8L /**< \brief TCC1 signal: WO2 on PA08 mux F */ +#define MUX_PA08F_TCC1_WO2 5L +#define PINMUX_PA08F_TCC1_WO2 ((PIN_PA08F_TCC1_WO2 << 16) | MUX_PA08F_TCC1_WO2) +#define PORT_PA08F_TCC1_WO2 (1ul << 8) +#define PIN_PA24F_TCC1_WO2 24L /**< \brief TCC1 signal: WO2 on PA24 mux F */ +#define MUX_PA24F_TCC1_WO2 5L +#define PINMUX_PA24F_TCC1_WO2 ((PIN_PA24F_TCC1_WO2 << 16) | MUX_PA24F_TCC1_WO2) +#define PORT_PA24F_TCC1_WO2 (1ul << 24) +#define PIN_PB30F_TCC1_WO2 62L /**< \brief TCC1 signal: WO2 on PB30 mux F */ +#define MUX_PB30F_TCC1_WO2 5L +#define PINMUX_PB30F_TCC1_WO2 ((PIN_PB30F_TCC1_WO2 << 16) | MUX_PB30F_TCC1_WO2) +#define PORT_PB30F_TCC1_WO2 (1ul << 30) +#define PIN_PA09F_TCC1_WO3 9L /**< \brief TCC1 signal: WO3 on PA09 mux F */ +#define MUX_PA09F_TCC1_WO3 5L +#define PINMUX_PA09F_TCC1_WO3 ((PIN_PA09F_TCC1_WO3 << 16) | MUX_PA09F_TCC1_WO3) +#define PORT_PA09F_TCC1_WO3 (1ul << 9) +#define PIN_PA25F_TCC1_WO3 25L /**< \brief TCC1 signal: WO3 on PA25 mux F */ +#define MUX_PA25F_TCC1_WO3 5L +#define PINMUX_PA25F_TCC1_WO3 ((PIN_PA25F_TCC1_WO3 << 16) | MUX_PA25F_TCC1_WO3) +#define PORT_PA25F_TCC1_WO3 (1ul << 25) +#define PIN_PB31F_TCC1_WO3 63L /**< \brief TCC1 signal: WO3 on PB31 mux F */ +#define MUX_PB31F_TCC1_WO3 5L +#define PINMUX_PB31F_TCC1_WO3 ((PIN_PB31F_TCC1_WO3 << 16) | MUX_PB31F_TCC1_WO3) +#define PORT_PB31F_TCC1_WO3 (1ul << 31) +/* ========== PORT definition for TCC2 peripheral ========== */ +#define PIN_PA12E_TCC2_WO0 12L /**< \brief TCC2 signal: WO0 on PA12 mux E */ +#define MUX_PA12E_TCC2_WO0 4L +#define PINMUX_PA12E_TCC2_WO0 ((PIN_PA12E_TCC2_WO0 << 16) | MUX_PA12E_TCC2_WO0) +#define PORT_PA12E_TCC2_WO0 (1ul << 12) +#define PIN_PA16E_TCC2_WO0 16L /**< \brief TCC2 signal: WO0 on PA16 mux E */ +#define MUX_PA16E_TCC2_WO0 4L +#define PINMUX_PA16E_TCC2_WO0 ((PIN_PA16E_TCC2_WO0 << 16) | MUX_PA16E_TCC2_WO0) +#define PORT_PA16E_TCC2_WO0 (1ul << 16) +#define PIN_PA00E_TCC2_WO0 0L /**< \brief TCC2 signal: WO0 on PA00 mux E */ +#define MUX_PA00E_TCC2_WO0 4L +#define PINMUX_PA00E_TCC2_WO0 ((PIN_PA00E_TCC2_WO0 << 16) | MUX_PA00E_TCC2_WO0) +#define PORT_PA00E_TCC2_WO0 (1ul << 0) +#define PIN_PA13E_TCC2_WO1 13L /**< \brief TCC2 signal: WO1 on PA13 mux E */ +#define MUX_PA13E_TCC2_WO1 4L +#define PINMUX_PA13E_TCC2_WO1 ((PIN_PA13E_TCC2_WO1 << 16) | MUX_PA13E_TCC2_WO1) +#define PORT_PA13E_TCC2_WO1 (1ul << 13) +#define PIN_PA17E_TCC2_WO1 17L /**< \brief TCC2 signal: WO1 on PA17 mux E */ +#define MUX_PA17E_TCC2_WO1 4L +#define PINMUX_PA17E_TCC2_WO1 ((PIN_PA17E_TCC2_WO1 << 16) | MUX_PA17E_TCC2_WO1) +#define PORT_PA17E_TCC2_WO1 (1ul << 17) +#define PIN_PA01E_TCC2_WO1 1L /**< \brief TCC2 signal: WO1 on PA01 mux E */ +#define MUX_PA01E_TCC2_WO1 4L +#define PINMUX_PA01E_TCC2_WO1 ((PIN_PA01E_TCC2_WO1 << 16) | MUX_PA01E_TCC2_WO1) +#define PORT_PA01E_TCC2_WO1 (1ul << 1) +/* ========== PORT definition for TC3 peripheral ========== */ +#define PIN_PA18E_TC3_WO0 18L /**< \brief TC3 signal: WO0 on PA18 mux E */ +#define MUX_PA18E_TC3_WO0 4L +#define PINMUX_PA18E_TC3_WO0 ((PIN_PA18E_TC3_WO0 << 16) | MUX_PA18E_TC3_WO0) +#define PORT_PA18E_TC3_WO0 (1ul << 18) +#define PIN_PA14E_TC3_WO0 14L /**< \brief TC3 signal: WO0 on PA14 mux E */ +#define MUX_PA14E_TC3_WO0 4L +#define PINMUX_PA14E_TC3_WO0 ((PIN_PA14E_TC3_WO0 << 16) | MUX_PA14E_TC3_WO0) +#define PORT_PA14E_TC3_WO0 (1ul << 14) +#define PIN_PA19E_TC3_WO1 19L /**< \brief TC3 signal: WO1 on PA19 mux E */ +#define MUX_PA19E_TC3_WO1 4L +#define PINMUX_PA19E_TC3_WO1 ((PIN_PA19E_TC3_WO1 << 16) | MUX_PA19E_TC3_WO1) +#define PORT_PA19E_TC3_WO1 (1ul << 19) +#define PIN_PA15E_TC3_WO1 15L /**< \brief TC3 signal: WO1 on PA15 mux E */ +#define MUX_PA15E_TC3_WO1 4L +#define PINMUX_PA15E_TC3_WO1 ((PIN_PA15E_TC3_WO1 << 16) | MUX_PA15E_TC3_WO1) +#define PORT_PA15E_TC3_WO1 (1ul << 15) +/* ========== PORT definition for TC4 peripheral ========== */ +#define PIN_PA22E_TC4_WO0 22L /**< \brief TC4 signal: WO0 on PA22 mux E */ +#define MUX_PA22E_TC4_WO0 4L +#define PINMUX_PA22E_TC4_WO0 ((PIN_PA22E_TC4_WO0 << 16) | MUX_PA22E_TC4_WO0) +#define PORT_PA22E_TC4_WO0 (1ul << 22) +#define PIN_PB08E_TC4_WO0 40L /**< \brief TC4 signal: WO0 on PB08 mux E */ +#define MUX_PB08E_TC4_WO0 4L +#define PINMUX_PB08E_TC4_WO0 ((PIN_PB08E_TC4_WO0 << 16) | MUX_PB08E_TC4_WO0) +#define PORT_PB08E_TC4_WO0 (1ul << 8) +#define PIN_PB12E_TC4_WO0 44L /**< \brief TC4 signal: WO0 on PB12 mux E */ +#define MUX_PB12E_TC4_WO0 4L +#define PINMUX_PB12E_TC4_WO0 ((PIN_PB12E_TC4_WO0 << 16) | MUX_PB12E_TC4_WO0) +#define PORT_PB12E_TC4_WO0 (1ul << 12) +#define PIN_PA23E_TC4_WO1 23L /**< \brief TC4 signal: WO1 on PA23 mux E */ +#define MUX_PA23E_TC4_WO1 4L +#define PINMUX_PA23E_TC4_WO1 ((PIN_PA23E_TC4_WO1 << 16) | MUX_PA23E_TC4_WO1) +#define PORT_PA23E_TC4_WO1 (1ul << 23) +#define PIN_PB09E_TC4_WO1 41L /**< \brief TC4 signal: WO1 on PB09 mux E */ +#define MUX_PB09E_TC4_WO1 4L +#define PINMUX_PB09E_TC4_WO1 ((PIN_PB09E_TC4_WO1 << 16) | MUX_PB09E_TC4_WO1) +#define PORT_PB09E_TC4_WO1 (1ul << 9) +#define PIN_PB13E_TC4_WO1 45L /**< \brief TC4 signal: WO1 on PB13 mux E */ +#define MUX_PB13E_TC4_WO1 4L +#define PINMUX_PB13E_TC4_WO1 ((PIN_PB13E_TC4_WO1 << 16) | MUX_PB13E_TC4_WO1) +#define PORT_PB13E_TC4_WO1 (1ul << 13) +/* ========== PORT definition for TC5 peripheral ========== */ +#define PIN_PA24E_TC5_WO0 24L /**< \brief TC5 signal: WO0 on PA24 mux E */ +#define MUX_PA24E_TC5_WO0 4L +#define PINMUX_PA24E_TC5_WO0 ((PIN_PA24E_TC5_WO0 << 16) | MUX_PA24E_TC5_WO0) +#define PORT_PA24E_TC5_WO0 (1ul << 24) +#define PIN_PB10E_TC5_WO0 42L /**< \brief TC5 signal: WO0 on PB10 mux E */ +#define MUX_PB10E_TC5_WO0 4L +#define PINMUX_PB10E_TC5_WO0 ((PIN_PB10E_TC5_WO0 << 16) | MUX_PB10E_TC5_WO0) +#define PORT_PB10E_TC5_WO0 (1ul << 10) +#define PIN_PB14E_TC5_WO0 46L /**< \brief TC5 signal: WO0 on PB14 mux E */ +#define MUX_PB14E_TC5_WO0 4L +#define PINMUX_PB14E_TC5_WO0 ((PIN_PB14E_TC5_WO0 << 16) | MUX_PB14E_TC5_WO0) +#define PORT_PB14E_TC5_WO0 (1ul << 14) +#define PIN_PA25E_TC5_WO1 25L /**< \brief TC5 signal: WO1 on PA25 mux E */ +#define MUX_PA25E_TC5_WO1 4L +#define PINMUX_PA25E_TC5_WO1 ((PIN_PA25E_TC5_WO1 << 16) | MUX_PA25E_TC5_WO1) +#define PORT_PA25E_TC5_WO1 (1ul << 25) +#define PIN_PB11E_TC5_WO1 43L /**< \brief TC5 signal: WO1 on PB11 mux E */ +#define MUX_PB11E_TC5_WO1 4L +#define PINMUX_PB11E_TC5_WO1 ((PIN_PB11E_TC5_WO1 << 16) | MUX_PB11E_TC5_WO1) +#define PORT_PB11E_TC5_WO1 (1ul << 11) +#define PIN_PB15E_TC5_WO1 47L /**< \brief TC5 signal: WO1 on PB15 mux E */ +#define MUX_PB15E_TC5_WO1 4L +#define PINMUX_PB15E_TC5_WO1 ((PIN_PB15E_TC5_WO1 << 16) | MUX_PB15E_TC5_WO1) +#define PORT_PB15E_TC5_WO1 (1ul << 15) +/* ========== PORT definition for TC6 peripheral ========== */ +#define PIN_PB02E_TC6_WO0 34L /**< \brief TC6 signal: WO0 on PB02 mux E */ +#define MUX_PB02E_TC6_WO0 4L +#define PINMUX_PB02E_TC6_WO0 ((PIN_PB02E_TC6_WO0 << 16) | MUX_PB02E_TC6_WO0) +#define PORT_PB02E_TC6_WO0 (1ul << 2) +#define PIN_PB16E_TC6_WO0 48L /**< \brief TC6 signal: WO0 on PB16 mux E */ +#define MUX_PB16E_TC6_WO0 4L +#define PINMUX_PB16E_TC6_WO0 ((PIN_PB16E_TC6_WO0 << 16) | MUX_PB16E_TC6_WO0) +#define PORT_PB16E_TC6_WO0 (1ul << 16) +#define PIN_PB03E_TC6_WO1 35L /**< \brief TC6 signal: WO1 on PB03 mux E */ +#define MUX_PB03E_TC6_WO1 4L +#define PINMUX_PB03E_TC6_WO1 ((PIN_PB03E_TC6_WO1 << 16) | MUX_PB03E_TC6_WO1) +#define PORT_PB03E_TC6_WO1 (1ul << 3) +#define PIN_PB17E_TC6_WO1 49L /**< \brief TC6 signal: WO1 on PB17 mux E */ +#define MUX_PB17E_TC6_WO1 4L +#define PINMUX_PB17E_TC6_WO1 ((PIN_PB17E_TC6_WO1 << 16) | MUX_PB17E_TC6_WO1) +#define PORT_PB17E_TC6_WO1 (1ul << 17) +/* ========== PORT definition for TC7 peripheral ========== */ +#define PIN_PA20E_TC7_WO0 20L /**< \brief TC7 signal: WO0 on PA20 mux E */ +#define MUX_PA20E_TC7_WO0 4L +#define PINMUX_PA20E_TC7_WO0 ((PIN_PA20E_TC7_WO0 << 16) | MUX_PA20E_TC7_WO0) +#define PORT_PA20E_TC7_WO0 (1ul << 20) +#define PIN_PB00E_TC7_WO0 32L /**< \brief TC7 signal: WO0 on PB00 mux E */ +#define MUX_PB00E_TC7_WO0 4L +#define PINMUX_PB00E_TC7_WO0 ((PIN_PB00E_TC7_WO0 << 16) | MUX_PB00E_TC7_WO0) +#define PORT_PB00E_TC7_WO0 (1ul << 0) +#define PIN_PB22E_TC7_WO0 54L /**< \brief TC7 signal: WO0 on PB22 mux E */ +#define MUX_PB22E_TC7_WO0 4L +#define PINMUX_PB22E_TC7_WO0 ((PIN_PB22E_TC7_WO0 << 16) | MUX_PB22E_TC7_WO0) +#define PORT_PB22E_TC7_WO0 (1ul << 22) +#define PIN_PA21E_TC7_WO1 21L /**< \brief TC7 signal: WO1 on PA21 mux E */ +#define MUX_PA21E_TC7_WO1 4L +#define PINMUX_PA21E_TC7_WO1 ((PIN_PA21E_TC7_WO1 << 16) | MUX_PA21E_TC7_WO1) +#define PORT_PA21E_TC7_WO1 (1ul << 21) +#define PIN_PB01E_TC7_WO1 33L /**< \brief TC7 signal: WO1 on PB01 mux E */ +#define MUX_PB01E_TC7_WO1 4L +#define PINMUX_PB01E_TC7_WO1 ((PIN_PB01E_TC7_WO1 << 16) | MUX_PB01E_TC7_WO1) +#define PORT_PB01E_TC7_WO1 (1ul << 1) +#define PIN_PB23E_TC7_WO1 55L /**< \brief TC7 signal: WO1 on PB23 mux E */ +#define MUX_PB23E_TC7_WO1 4L +#define PINMUX_PB23E_TC7_WO1 ((PIN_PB23E_TC7_WO1 << 16) | MUX_PB23E_TC7_WO1) +#define PORT_PB23E_TC7_WO1 (1ul << 23) +/* ========== PORT definition for ADC peripheral ========== */ +#define PIN_PA02B_ADC_AIN0 2L /**< \brief ADC signal: AIN0 on PA02 mux B */ +#define MUX_PA02B_ADC_AIN0 1L +#define PINMUX_PA02B_ADC_AIN0 ((PIN_PA02B_ADC_AIN0 << 16) | MUX_PA02B_ADC_AIN0) +#define PORT_PA02B_ADC_AIN0 (1ul << 2) +#define PIN_PA03B_ADC_AIN1 3L /**< \brief ADC signal: AIN1 on PA03 mux B */ +#define MUX_PA03B_ADC_AIN1 1L +#define PINMUX_PA03B_ADC_AIN1 ((PIN_PA03B_ADC_AIN1 << 16) | MUX_PA03B_ADC_AIN1) +#define PORT_PA03B_ADC_AIN1 (1ul << 3) +#define PIN_PB08B_ADC_AIN2 40L /**< \brief ADC signal: AIN2 on PB08 mux B */ +#define MUX_PB08B_ADC_AIN2 1L +#define PINMUX_PB08B_ADC_AIN2 ((PIN_PB08B_ADC_AIN2 << 16) | MUX_PB08B_ADC_AIN2) +#define PORT_PB08B_ADC_AIN2 (1ul << 8) +#define PIN_PB09B_ADC_AIN3 41L /**< \brief ADC signal: AIN3 on PB09 mux B */ +#define MUX_PB09B_ADC_AIN3 1L +#define PINMUX_PB09B_ADC_AIN3 ((PIN_PB09B_ADC_AIN3 << 16) | MUX_PB09B_ADC_AIN3) +#define PORT_PB09B_ADC_AIN3 (1ul << 9) +#define PIN_PA04B_ADC_AIN4 4L /**< \brief ADC signal: AIN4 on PA04 mux B */ +#define MUX_PA04B_ADC_AIN4 1L +#define PINMUX_PA04B_ADC_AIN4 ((PIN_PA04B_ADC_AIN4 << 16) | MUX_PA04B_ADC_AIN4) +#define PORT_PA04B_ADC_AIN4 (1ul << 4) +#define PIN_PA05B_ADC_AIN5 5L /**< \brief ADC signal: AIN5 on PA05 mux B */ +#define MUX_PA05B_ADC_AIN5 1L +#define PINMUX_PA05B_ADC_AIN5 ((PIN_PA05B_ADC_AIN5 << 16) | MUX_PA05B_ADC_AIN5) +#define PORT_PA05B_ADC_AIN5 (1ul << 5) +#define PIN_PA06B_ADC_AIN6 6L /**< \brief ADC signal: AIN6 on PA06 mux B */ +#define MUX_PA06B_ADC_AIN6 1L +#define PINMUX_PA06B_ADC_AIN6 ((PIN_PA06B_ADC_AIN6 << 16) | MUX_PA06B_ADC_AIN6) +#define PORT_PA06B_ADC_AIN6 (1ul << 6) +#define PIN_PA07B_ADC_AIN7 7L /**< \brief ADC signal: AIN7 on PA07 mux B */ +#define MUX_PA07B_ADC_AIN7 1L +#define PINMUX_PA07B_ADC_AIN7 ((PIN_PA07B_ADC_AIN7 << 16) | MUX_PA07B_ADC_AIN7) +#define PORT_PA07B_ADC_AIN7 (1ul << 7) +#define PIN_PB00B_ADC_AIN8 32L /**< \brief ADC signal: AIN8 on PB00 mux B */ +#define MUX_PB00B_ADC_AIN8 1L +#define PINMUX_PB00B_ADC_AIN8 ((PIN_PB00B_ADC_AIN8 << 16) | MUX_PB00B_ADC_AIN8) +#define PORT_PB00B_ADC_AIN8 (1ul << 0) +#define PIN_PB01B_ADC_AIN9 33L /**< \brief ADC signal: AIN9 on PB01 mux B */ +#define MUX_PB01B_ADC_AIN9 1L +#define PINMUX_PB01B_ADC_AIN9 ((PIN_PB01B_ADC_AIN9 << 16) | MUX_PB01B_ADC_AIN9) +#define PORT_PB01B_ADC_AIN9 (1ul << 1) +#define PIN_PB02B_ADC_AIN10 34L /**< \brief ADC signal: AIN10 on PB02 mux B */ +#define MUX_PB02B_ADC_AIN10 1L +#define PINMUX_PB02B_ADC_AIN10 ((PIN_PB02B_ADC_AIN10 << 16) | MUX_PB02B_ADC_AIN10) +#define PORT_PB02B_ADC_AIN10 (1ul << 2) +#define PIN_PB03B_ADC_AIN11 35L /**< \brief ADC signal: AIN11 on PB03 mux B */ +#define MUX_PB03B_ADC_AIN11 1L +#define PINMUX_PB03B_ADC_AIN11 ((PIN_PB03B_ADC_AIN11 << 16) | MUX_PB03B_ADC_AIN11) +#define PORT_PB03B_ADC_AIN11 (1ul << 3) +#define PIN_PB04B_ADC_AIN12 36L /**< \brief ADC signal: AIN12 on PB04 mux B */ +#define MUX_PB04B_ADC_AIN12 1L +#define PINMUX_PB04B_ADC_AIN12 ((PIN_PB04B_ADC_AIN12 << 16) | MUX_PB04B_ADC_AIN12) +#define PORT_PB04B_ADC_AIN12 (1ul << 4) +#define PIN_PB05B_ADC_AIN13 37L /**< \brief ADC signal: AIN13 on PB05 mux B */ +#define MUX_PB05B_ADC_AIN13 1L +#define PINMUX_PB05B_ADC_AIN13 ((PIN_PB05B_ADC_AIN13 << 16) | MUX_PB05B_ADC_AIN13) +#define PORT_PB05B_ADC_AIN13 (1ul << 5) +#define PIN_PB06B_ADC_AIN14 38L /**< \brief ADC signal: AIN14 on PB06 mux B */ +#define MUX_PB06B_ADC_AIN14 1L +#define PINMUX_PB06B_ADC_AIN14 ((PIN_PB06B_ADC_AIN14 << 16) | MUX_PB06B_ADC_AIN14) +#define PORT_PB06B_ADC_AIN14 (1ul << 6) +#define PIN_PB07B_ADC_AIN15 39L /**< \brief ADC signal: AIN15 on PB07 mux B */ +#define MUX_PB07B_ADC_AIN15 1L +#define PINMUX_PB07B_ADC_AIN15 ((PIN_PB07B_ADC_AIN15 << 16) | MUX_PB07B_ADC_AIN15) +#define PORT_PB07B_ADC_AIN15 (1ul << 7) +#define PIN_PA08B_ADC_AIN16 8L /**< \brief ADC signal: AIN16 on PA08 mux B */ +#define MUX_PA08B_ADC_AIN16 1L +#define PINMUX_PA08B_ADC_AIN16 ((PIN_PA08B_ADC_AIN16 << 16) | MUX_PA08B_ADC_AIN16) +#define PORT_PA08B_ADC_AIN16 (1ul << 8) +#define PIN_PA09B_ADC_AIN17 9L /**< \brief ADC signal: AIN17 on PA09 mux B */ +#define MUX_PA09B_ADC_AIN17 1L +#define PINMUX_PA09B_ADC_AIN17 ((PIN_PA09B_ADC_AIN17 << 16) | MUX_PA09B_ADC_AIN17) +#define PORT_PA09B_ADC_AIN17 (1ul << 9) +#define PIN_PA10B_ADC_AIN18 10L /**< \brief ADC signal: AIN18 on PA10 mux B */ +#define MUX_PA10B_ADC_AIN18 1L +#define PINMUX_PA10B_ADC_AIN18 ((PIN_PA10B_ADC_AIN18 << 16) | MUX_PA10B_ADC_AIN18) +#define PORT_PA10B_ADC_AIN18 (1ul << 10) +#define PIN_PA11B_ADC_AIN19 11L /**< \brief ADC signal: AIN19 on PA11 mux B */ +#define MUX_PA11B_ADC_AIN19 1L +#define PINMUX_PA11B_ADC_AIN19 ((PIN_PA11B_ADC_AIN19 << 16) | MUX_PA11B_ADC_AIN19) +#define PORT_PA11B_ADC_AIN19 (1ul << 11) +#define PIN_PA04B_ADC_VREFP 4L /**< \brief ADC signal: VREFP on PA04 mux B */ +#define MUX_PA04B_ADC_VREFP 1L +#define PINMUX_PA04B_ADC_VREFP ((PIN_PA04B_ADC_VREFP << 16) | MUX_PA04B_ADC_VREFP) +#define PORT_PA04B_ADC_VREFP (1ul << 4) +/* ========== PORT definition for AC peripheral ========== */ +#define PIN_PA04B_AC_AIN0 4L /**< \brief AC signal: AIN0 on PA04 mux B */ +#define MUX_PA04B_AC_AIN0 1L +#define PINMUX_PA04B_AC_AIN0 ((PIN_PA04B_AC_AIN0 << 16) | MUX_PA04B_AC_AIN0) +#define PORT_PA04B_AC_AIN0 (1ul << 4) +#define PIN_PA05B_AC_AIN1 5L /**< \brief AC signal: AIN1 on PA05 mux B */ +#define MUX_PA05B_AC_AIN1 1L +#define PINMUX_PA05B_AC_AIN1 ((PIN_PA05B_AC_AIN1 << 16) | MUX_PA05B_AC_AIN1) +#define PORT_PA05B_AC_AIN1 (1ul << 5) +#define PIN_PA06B_AC_AIN2 6L /**< \brief AC signal: AIN2 on PA06 mux B */ +#define MUX_PA06B_AC_AIN2 1L +#define PINMUX_PA06B_AC_AIN2 ((PIN_PA06B_AC_AIN2 << 16) | MUX_PA06B_AC_AIN2) +#define PORT_PA06B_AC_AIN2 (1ul << 6) +#define PIN_PA07B_AC_AIN3 7L /**< \brief AC signal: AIN3 on PA07 mux B */ +#define MUX_PA07B_AC_AIN3 1L +#define PINMUX_PA07B_AC_AIN3 ((PIN_PA07B_AC_AIN3 << 16) | MUX_PA07B_AC_AIN3) +#define PORT_PA07B_AC_AIN3 (1ul << 7) +#define PIN_PA12H_AC_CMP0 12L /**< \brief AC signal: CMP0 on PA12 mux H */ +#define MUX_PA12H_AC_CMP0 7L +#define PINMUX_PA12H_AC_CMP0 ((PIN_PA12H_AC_CMP0 << 16) | MUX_PA12H_AC_CMP0) +#define PORT_PA12H_AC_CMP0 (1ul << 12) +#define PIN_PA18H_AC_CMP0 18L /**< \brief AC signal: CMP0 on PA18 mux H */ +#define MUX_PA18H_AC_CMP0 7L +#define PINMUX_PA18H_AC_CMP0 ((PIN_PA18H_AC_CMP0 << 16) | MUX_PA18H_AC_CMP0) +#define PORT_PA18H_AC_CMP0 (1ul << 18) +#define PIN_PA13H_AC_CMP1 13L /**< \brief AC signal: CMP1 on PA13 mux H */ +#define MUX_PA13H_AC_CMP1 7L +#define PINMUX_PA13H_AC_CMP1 ((PIN_PA13H_AC_CMP1 << 16) | MUX_PA13H_AC_CMP1) +#define PORT_PA13H_AC_CMP1 (1ul << 13) +#define PIN_PA19H_AC_CMP1 19L /**< \brief AC signal: CMP1 on PA19 mux H */ +#define MUX_PA19H_AC_CMP1 7L +#define PINMUX_PA19H_AC_CMP1 ((PIN_PA19H_AC_CMP1 << 16) | MUX_PA19H_AC_CMP1) +#define PORT_PA19H_AC_CMP1 (1ul << 19) +/* ========== PORT definition for DAC peripheral ========== */ +#define PIN_PA02B_DAC_VOUT 2L /**< \brief DAC signal: VOUT on PA02 mux B */ +#define MUX_PA02B_DAC_VOUT 1L +#define PINMUX_PA02B_DAC_VOUT ((PIN_PA02B_DAC_VOUT << 16) | MUX_PA02B_DAC_VOUT) +#define PORT_PA02B_DAC_VOUT (1ul << 2) +#define PIN_PA03B_DAC_VREFP 3L /**< \brief DAC signal: VREFP on PA03 mux B */ +#define MUX_PA03B_DAC_VREFP 1L +#define PINMUX_PA03B_DAC_VREFP ((PIN_PA03B_DAC_VREFP << 16) | MUX_PA03B_DAC_VREFP) +#define PORT_PA03B_DAC_VREFP (1ul << 3) +/* ========== PORT definition for I2S peripheral ========== */ +#define PIN_PA11G_I2S_FS0 11L /**< \brief I2S signal: FS0 on PA11 mux G */ +#define MUX_PA11G_I2S_FS0 6L +#define PINMUX_PA11G_I2S_FS0 ((PIN_PA11G_I2S_FS0 << 16) | MUX_PA11G_I2S_FS0) +#define PORT_PA11G_I2S_FS0 (1ul << 11) +#define PIN_PA21G_I2S_FS0 21L /**< \brief I2S signal: FS0 on PA21 mux G */ +#define MUX_PA21G_I2S_FS0 6L +#define PINMUX_PA21G_I2S_FS0 ((PIN_PA21G_I2S_FS0 << 16) | MUX_PA21G_I2S_FS0) +#define PORT_PA21G_I2S_FS0 (1ul << 21) +#define PIN_PB12G_I2S_FS1 44L /**< \brief I2S signal: FS1 on PB12 mux G */ +#define MUX_PB12G_I2S_FS1 6L +#define PINMUX_PB12G_I2S_FS1 ((PIN_PB12G_I2S_FS1 << 16) | MUX_PB12G_I2S_FS1) +#define PORT_PB12G_I2S_FS1 (1ul << 12) +#define PIN_PA09G_I2S_MCK0 9L /**< \brief I2S signal: MCK0 on PA09 mux G */ +#define MUX_PA09G_I2S_MCK0 6L +#define PINMUX_PA09G_I2S_MCK0 ((PIN_PA09G_I2S_MCK0 << 16) | MUX_PA09G_I2S_MCK0) +#define PORT_PA09G_I2S_MCK0 (1ul << 9) +#define PIN_PB17G_I2S_MCK0 49L /**< \brief I2S signal: MCK0 on PB17 mux G */ +#define MUX_PB17G_I2S_MCK0 6L +#define PINMUX_PB17G_I2S_MCK0 ((PIN_PB17G_I2S_MCK0 << 16) | MUX_PB17G_I2S_MCK0) +#define PORT_PB17G_I2S_MCK0 (1ul << 17) +#define PIN_PB10G_I2S_MCK1 42L /**< \brief I2S signal: MCK1 on PB10 mux G */ +#define MUX_PB10G_I2S_MCK1 6L +#define PINMUX_PB10G_I2S_MCK1 ((PIN_PB10G_I2S_MCK1 << 16) | MUX_PB10G_I2S_MCK1) +#define PORT_PB10G_I2S_MCK1 (1ul << 10) +#define PIN_PA10G_I2S_SCK0 10L /**< \brief I2S signal: SCK0 on PA10 mux G */ +#define MUX_PA10G_I2S_SCK0 6L +#define PINMUX_PA10G_I2S_SCK0 ((PIN_PA10G_I2S_SCK0 << 16) | MUX_PA10G_I2S_SCK0) +#define PORT_PA10G_I2S_SCK0 (1ul << 10) +#define PIN_PA20G_I2S_SCK0 20L /**< \brief I2S signal: SCK0 on PA20 mux G */ +#define MUX_PA20G_I2S_SCK0 6L +#define PINMUX_PA20G_I2S_SCK0 ((PIN_PA20G_I2S_SCK0 << 16) | MUX_PA20G_I2S_SCK0) +#define PORT_PA20G_I2S_SCK0 (1ul << 20) +#define PIN_PB11G_I2S_SCK1 43L /**< \brief I2S signal: SCK1 on PB11 mux G */ +#define MUX_PB11G_I2S_SCK1 6L +#define PINMUX_PB11G_I2S_SCK1 ((PIN_PB11G_I2S_SCK1 << 16) | MUX_PB11G_I2S_SCK1) +#define PORT_PB11G_I2S_SCK1 (1ul << 11) +#define PIN_PA07G_I2S_SD0 7L /**< \brief I2S signal: SD0 on PA07 mux G */ +#define MUX_PA07G_I2S_SD0 6L +#define PINMUX_PA07G_I2S_SD0 ((PIN_PA07G_I2S_SD0 << 16) | MUX_PA07G_I2S_SD0) +#define PORT_PA07G_I2S_SD0 (1ul << 7) +#define PIN_PA19G_I2S_SD0 19L /**< \brief I2S signal: SD0 on PA19 mux G */ +#define MUX_PA19G_I2S_SD0 6L +#define PINMUX_PA19G_I2S_SD0 ((PIN_PA19G_I2S_SD0 << 16) | MUX_PA19G_I2S_SD0) +#define PORT_PA19G_I2S_SD0 (1ul << 19) +#define PIN_PA08G_I2S_SD1 8L /**< \brief I2S signal: SD1 on PA08 mux G */ +#define MUX_PA08G_I2S_SD1 6L +#define PINMUX_PA08G_I2S_SD1 ((PIN_PA08G_I2S_SD1 << 16) | MUX_PA08G_I2S_SD1) +#define PORT_PA08G_I2S_SD1 (1ul << 8) +#define PIN_PB16G_I2S_SD1 48L /**< \brief I2S signal: SD1 on PB16 mux G */ +#define MUX_PB16G_I2S_SD1 6L +#define PINMUX_PB16G_I2S_SD1 ((PIN_PB16G_I2S_SD1 << 16) | MUX_PB16G_I2S_SD1) +#define PORT_PB16G_I2S_SD1 (1ul << 16) + +#endif /* _SAMD21J18A_PIO_ */
--- a/targets/cmsis/TARGET_Atmel/TARGET_SAM21/utils/cmsis/samd21/include/pio/pio_samr21g18a.h Wed Jul 15 08:15:08 2015 +0100 +++ b/targets/cmsis/TARGET_Atmel/TARGET_SAM21/utils/cmsis/samd21/include/pio/pio_samr21g18a.h Fri Jul 17 09:15:10 2015 +0100 @@ -1,49 +1,3 @@ -/** - * \file - * - * \brief Peripheral I/O description for SAMR21G18A - * - * Copyright (c) 2014 Atmel Corporation. All rights reserved. - * - * \asf_license_start - * - * \page License - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are met: - * - * 1. Redistributions of source code must retain the above copyright notice, - * this list of conditions and the following disclaimer. - * - * 2. Redistributions in binary form must reproduce the above copyright notice, - * this list of conditions and the following disclaimer in the documentation - * and/or other materials provided with the distribution. - * - * 3. The name of Atmel may not be used to endorse or promote products derived - * from this software without specific prior written permission. - * - * 4. This software may only be redistributed and used in connection with an - * Atmel microcontroller product. - * - * THIS SOFTWARE IS PROVIDED BY ATMEL "AS IS" AND ANY EXPRESS OR IMPLIED - * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF - * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT ARE - * EXPRESSLY AND SPECIFICALLY DISCLAIMED. IN NO EVENT SHALL ATMEL BE LIABLE FOR - * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL - * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS - * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) - * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, - * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN - * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE - * POSSIBILITY OF SUCH DAMAGE. - * - * \asf_license_stop - * - */ -/** -* Support and FAQ: visit <a href="http://www.atmel.com/design-support/">Atmel Support</a> -*/ - #ifndef _SAMR21G18A_PIO_ #define _SAMR21G18A_PIO_
--- a/targets/cmsis/TARGET_Atmel/TARGET_SAM21/utils/cmsis/samd21/include/samd21.h Wed Jul 15 08:15:08 2015 +0100 +++ b/targets/cmsis/TARGET_Atmel/TARGET_SAM21/utils/cmsis/samd21/include/samd21.h Fri Jul 17 09:15:10 2015 +0100 @@ -1,49 +1,3 @@ -/** - * \file - * - * \brief Top header file for SAMD21 - * - * Copyright (c) 2013-2014 Atmel Corporation. All rights reserved. - * - * \asf_license_start - * - * \page License - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are met: - * - * 1. Redistributions of source code must retain the above copyright notice, - * this list of conditions and the following disclaimer. - * - * 2. Redistributions in binary form must reproduce the above copyright notice, - * this list of conditions and the following disclaimer in the documentation - * and/or other materials provided with the distribution. - * - * 3. The name of Atmel may not be used to endorse or promote products derived - * from this software without specific prior written permission. - * - * 4. This software may only be redistributed and used in connection with an - * Atmel microcontroller product. - * - * THIS SOFTWARE IS PROVIDED BY ATMEL "AS IS" AND ANY EXPRESS OR IMPLIED - * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF - * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT ARE - * EXPRESSLY AND SPECIFICALLY DISCLAIMED. IN NO EVENT SHALL ATMEL BE LIABLE FOR - * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL - * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS - * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) - * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, - * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN - * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE - * POSSIBILITY OF SUCH DAMAGE. - * - * \asf_license_stop - * - */ -/** -* Support and FAQ: visit <a href="http://www.atmel.com/design-support/">Atmel Support</a> -*/ - #ifndef _SAMD21_ #define _SAMD21_
--- a/targets/cmsis/TARGET_Atmel/TARGET_SAM21/utils/cmsis/samd21/include/samd21j18a.h Wed Jul 15 08:15:08 2015 +0100 +++ b/targets/cmsis/TARGET_Atmel/TARGET_SAM21/utils/cmsis/samd21/include/samd21j18a.h Fri Jul 17 09:15:10 2015 +0100 @@ -1,49 +1,3 @@ -/** - * \file - * - * \brief Header file for SAMD21J18A - * - * Copyright (c) 2014 Atmel Corporation. All rights reserved. - * - * \asf_license_start - * - * \page License - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are met: - * - * 1. Redistributions of source code must retain the above copyright notice, - * this list of conditions and the following disclaimer. - * - * 2. Redistributions in binary form must reproduce the above copyright notice, - * this list of conditions and the following disclaimer in the documentation - * and/or other materials provided with the distribution. - * - * 3. The name of Atmel may not be used to endorse or promote products derived - * from this software without specific prior written permission. - * - * 4. This software may only be redistributed and used in connection with an - * Atmel microcontroller product. - * - * THIS SOFTWARE IS PROVIDED BY ATMEL "AS IS" AND ANY EXPRESS OR IMPLIED - * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF - * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT ARE - * EXPRESSLY AND SPECIFICALLY DISCLAIMED. IN NO EVENT SHALL ATMEL BE LIABLE FOR - * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL - * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS - * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) - * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, - * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN - * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE - * POSSIBILITY OF SUCH DAMAGE. - * - * \asf_license_stop - * - */ -/** -* Support and FAQ: visit <a href="http://www.atmel.com/design-support/">Atmel Support</a> -*/ - #ifndef _SAMD21J18A_ #define _SAMD21J18A_
--- a/targets/cmsis/TARGET_Atmel/TARGET_SAM21/utils/cmsis/samd21/include/samr21.h Wed Jul 15 08:15:08 2015 +0100 +++ b/targets/cmsis/TARGET_Atmel/TARGET_SAM21/utils/cmsis/samd21/include/samr21.h Fri Jul 17 09:15:10 2015 +0100 @@ -1,49 +1,3 @@ -/** - * \file - * - * \brief Top header file for SAMR21 - * - * Copyright (c) 2014 Atmel Corporation. All rights reserved. - * - * \asf_license_start - * - * \page License - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are met: - * - * 1. Redistributions of source code must retain the above copyright notice, - * this list of conditions and the following disclaimer. - * - * 2. Redistributions in binary form must reproduce the above copyright notice, - * this list of conditions and the following disclaimer in the documentation - * and/or other materials provided with the distribution. - * - * 3. The name of Atmel may not be used to endorse or promote products derived - * from this software without specific prior written permission. - * - * 4. This software may only be redistributed and used in connection with an - * Atmel microcontroller product. - * - * THIS SOFTWARE IS PROVIDED BY ATMEL "AS IS" AND ANY EXPRESS OR IMPLIED - * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF - * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT ARE - * EXPRESSLY AND SPECIFICALLY DISCLAIMED. IN NO EVENT SHALL ATMEL BE LIABLE FOR - * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL - * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS - * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) - * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, - * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN - * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE - * POSSIBILITY OF SUCH DAMAGE. - * - * \asf_license_stop - * - */ -/** -* Support and FAQ: visit <a href="http://www.atmel.com/design-support/">Atmel Support</a> -*/ - #ifndef _SAMR21_ #define _SAMR21_
--- a/targets/cmsis/TARGET_Atmel/TARGET_SAM21/utils/cmsis/samd21/include/samr21g18a.h Wed Jul 15 08:15:08 2015 +0100 +++ b/targets/cmsis/TARGET_Atmel/TARGET_SAM21/utils/cmsis/samd21/include/samr21g18a.h Fri Jul 17 09:15:10 2015 +0100 @@ -1,49 +1,3 @@ -/** - * \file - * - * \brief Header file for SAMR21G18A - * - * Copyright (c) 2014 Atmel Corporation. All rights reserved. - * - * \asf_license_start - * - * \page License - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are met: - * - * 1. Redistributions of source code must retain the above copyright notice, - * this list of conditions and the following disclaimer. - * - * 2. Redistributions in binary form must reproduce the above copyright notice, - * this list of conditions and the following disclaimer in the documentation - * and/or other materials provided with the distribution. - * - * 3. The name of Atmel may not be used to endorse or promote products derived - * from this software without specific prior written permission. - * - * 4. This software may only be redistributed and used in connection with an - * Atmel microcontroller product. - * - * THIS SOFTWARE IS PROVIDED BY ATMEL "AS IS" AND ANY EXPRESS OR IMPLIED - * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF - * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT ARE - * EXPRESSLY AND SPECIFICALLY DISCLAIMED. IN NO EVENT SHALL ATMEL BE LIABLE FOR - * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL - * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS - * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) - * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, - * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN - * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE - * POSSIBILITY OF SUCH DAMAGE. - * - * \asf_license_stop - * - */ -/** -* Support and FAQ: visit <a href="http://www.atmel.com/design-support/">Atmel Support</a> -*/ - #ifndef _SAMR21G18A_ #define _SAMR21G18A_
--- a/targets/cmsis/TARGET_Atmel/TARGET_SAM21/utils/compiler.h Wed Jul 15 08:15:08 2015 +0100 +++ b/targets/cmsis/TARGET_Atmel/TARGET_SAM21/utils/compiler.h Fri Jul 17 09:15:10 2015 +0100 @@ -1,47 +1,3 @@ -/** - * \file - * - * \brief Commonly used includes, types and macros. - * - * Copyright (C) 2012-2014 Atmel Corporation. All rights reserved. - * - * \asf_license_start - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are met: - * - * 1. Redistributions of source code must retain the above copyright notice, - * this list of conditions and the following disclaimer. - * - * 2. Redistributions in binary form must reproduce the above copyright notice, - * this list of conditions and the following disclaimer in the documentation - * and/or other materials provided with the distribution. - * - * 3. The name of Atmel may not be used to endorse or promote products derived - * from this software without specific prior written permission. - * - * 4. This software may only be redistributed and used in connection with an - * Atmel microcontroller product. - * - * THIS SOFTWARE IS PROVIDED BY ATMEL "AS IS" AND ANY EXPRESS OR IMPLIED - * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF - * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT ARE - * EXPRESSLY AND SPECIFICALLY DISCLAIMED. IN NO EVENT SHALL ATMEL BE LIABLE FOR - * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL - * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS - * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) - * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, - * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN - * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE - * POSSIBILITY OF SUCH DAMAGE. - * - * \asf_license_stop - * - */ -/** -* Support and FAQ: visit <a href="http://www.atmel.com/design-support/">Atmel Support</a> -*/ - #ifndef UTILS_COMPILER_H_INCLUDED #define UTILS_COMPILER_H_INCLUDED
--- a/targets/cmsis/TARGET_Atmel/TARGET_SAM21/utils/header_files/io.h Wed Jul 15 08:15:08 2015 +0100 +++ b/targets/cmsis/TARGET_Atmel/TARGET_SAM21/utils/header_files/io.h Fri Jul 17 09:15:10 2015 +0100 @@ -1,51 +1,3 @@ -/** - * \file - * - * \brief Arch file for SAM0. - * - * This file defines common SAM0 series. - * - * Copyright (C) 2012-2014 Atmel Corporation. All rights reserved. - * - * \asf_license_start - * - * \page License - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are met: - * - * 1. Redistributions of source code must retain the above copyright notice, - * this list of conditions and the following disclaimer. - * - * 2. Redistributions in binary form must reproduce the above copyright notice, - * this list of conditions and the following disclaimer in the documentation - * and/or other materials provided with the distribution. - * - * 3. The name of Atmel may not be used to endorse or promote products derived - * from this software without specific prior written permission. - * - * 4. This software may only be redistributed and used in connection with an - * Atmel microcontroller product. - * - * THIS SOFTWARE IS PROVIDED BY ATMEL "AS IS" AND ANY EXPRESS OR IMPLIED - * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF - * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT ARE - * EXPRESSLY AND SPECIFICALLY DISCLAIMED. IN NO EVENT SHALL ATMEL BE LIABLE FOR - * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL - * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS - * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) - * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, - * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN - * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE - * POSSIBILITY OF SUCH DAMAGE. - * - * \asf_license_stop - * - */ -/** -* Support and FAQ: visit <a href="http://www.atmel.com/design-support/">Atmel Support</a> -*/ - #ifndef _SAM_IO_ #define _SAM_IO_
--- a/targets/cmsis/TARGET_Atmel/TARGET_SAM21/utils/preprocessor/mrecursion.h Wed Jul 15 08:15:08 2015 +0100 +++ b/targets/cmsis/TARGET_Atmel/TARGET_SAM21/utils/preprocessor/mrecursion.h Fri Jul 17 09:15:10 2015 +0100 @@ -1,49 +1,3 @@ -/** - * \file - * - * \brief Preprocessor macro recursion utils. - * - * Copyright (C) 2013-2014 Atmel Corporation. All rights reserved. - * - * \asf_license_start - * - * \page License - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are met: - * - * 1. Redistributions of source code must retain the above copyright notice, - * this list of conditions and the following disclaimer. - * - * 2. Redistributions in binary form must reproduce the above copyright notice, - * this list of conditions and the following disclaimer in the documentation - * and/or other materials provided with the distribution. - * - * 3. The name of Atmel may not be used to endorse or promote products derived - * from this software without specific prior written permission. - * - * 4. This software may only be redistributed and used in connection with an - * Atmel microcontroller product. - * - * THIS SOFTWARE IS PROVIDED BY ATMEL "AS IS" AND ANY EXPRESS OR IMPLIED - * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF - * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT ARE - * EXPRESSLY AND SPECIFICALLY DISCLAIMED. IN NO EVENT SHALL ATMEL BE LIABLE FOR - * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL - * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS - * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) - * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, - * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN - * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE - * POSSIBILITY OF SUCH DAMAGE. - * - * \asf_license_stop - * - */ -/** -* Support and FAQ: visit <a href="http://www.atmel.com/design-support/">Atmel Support</a> -*/ - #ifndef _MRECURSION_H_ #define _MRECURSION_H_
--- a/targets/cmsis/TARGET_Atmel/TARGET_SAM21/utils/preprocessor/mrepeat.h Wed Jul 15 08:15:08 2015 +0100 +++ b/targets/cmsis/TARGET_Atmel/TARGET_SAM21/utils/preprocessor/mrepeat.h Fri Jul 17 09:15:10 2015 +0100 @@ -1,49 +1,3 @@ -/** - * \file - * - * \brief Preprocessor macro repeating utils. - * - * Copyright (C) 2012-2014 Atmel Corporation. All rights reserved. - * - * \asf_license_start - * - * \page License - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are met: - * - * 1. Redistributions of source code must retain the above copyright notice, - * this list of conditions and the following disclaimer. - * - * 2. Redistributions in binary form must reproduce the above copyright notice, - * this list of conditions and the following disclaimer in the documentation - * and/or other materials provided with the distribution. - * - * 3. The name of Atmel may not be used to endorse or promote products derived - * from this software without specific prior written permission. - * - * 4. This software may only be redistributed and used in connection with an - * Atmel microcontroller product. - * - * THIS SOFTWARE IS PROVIDED BY ATMEL "AS IS" AND ANY EXPRESS OR IMPLIED - * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF - * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT ARE - * EXPRESSLY AND SPECIFICALLY DISCLAIMED. IN NO EVENT SHALL ATMEL BE LIABLE FOR - * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL - * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS - * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) - * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, - * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN - * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE - * POSSIBILITY OF SUCH DAMAGE. - * - * \asf_license_stop - * - */ -/** -* Support and FAQ: visit <a href="http://www.atmel.com/design-support/">Atmel Support</a> -*/ - #ifndef _MREPEAT_H_ #define _MREPEAT_H_
--- a/targets/cmsis/TARGET_Atmel/TARGET_SAM21/utils/preprocessor/preprocessor.h Wed Jul 15 08:15:08 2015 +0100 +++ b/targets/cmsis/TARGET_Atmel/TARGET_SAM21/utils/preprocessor/preprocessor.h Fri Jul 17 09:15:10 2015 +0100 @@ -1,49 +1,3 @@ -/** - * \file - * - * \brief Preprocessor utils. - * - * Copyright (C) 2012-2014 Atmel Corporation. All rights reserved. - * - * \asf_license_start - * - * \page License - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are met: - * - * 1. Redistributions of source code must retain the above copyright notice, - * this list of conditions and the following disclaimer. - * - * 2. Redistributions in binary form must reproduce the above copyright notice, - * this list of conditions and the following disclaimer in the documentation - * and/or other materials provided with the distribution. - * - * 3. The name of Atmel may not be used to endorse or promote products derived - * from this software without specific prior written permission. - * - * 4. This software may only be redistributed and used in connection with an - * Atmel microcontroller product. - * - * THIS SOFTWARE IS PROVIDED BY ATMEL "AS IS" AND ANY EXPRESS OR IMPLIED - * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF - * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT ARE - * EXPRESSLY AND SPECIFICALLY DISCLAIMED. IN NO EVENT SHALL ATMEL BE LIABLE FOR - * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL - * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS - * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) - * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, - * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN - * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE - * POSSIBILITY OF SUCH DAMAGE. - * - * \asf_license_stop - * - */ -/** -* Support and FAQ: visit <a href="http://www.atmel.com/design-support/">Atmel Support</a> -*/ - #ifndef _PREPROCESSOR_H_ #define _PREPROCESSOR_H_
--- a/targets/cmsis/TARGET_Atmel/TARGET_SAM21/utils/preprocessor/stringz.h Wed Jul 15 08:15:08 2015 +0100 +++ b/targets/cmsis/TARGET_Atmel/TARGET_SAM21/utils/preprocessor/stringz.h Fri Jul 17 09:15:10 2015 +0100 @@ -1,49 +1,3 @@ -/** - * \file - * - * \brief Preprocessor stringizing utils. - * - * Copyright (C) 2012-2014 Atmel Corporation. All rights reserved. - * - * \asf_license_start - * - * \page License - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are met: - * - * 1. Redistributions of source code must retain the above copyright notice, - * this list of conditions and the following disclaimer. - * - * 2. Redistributions in binary form must reproduce the above copyright notice, - * this list of conditions and the following disclaimer in the documentation - * and/or other materials provided with the distribution. - * - * 3. The name of Atmel may not be used to endorse or promote products derived - * from this software without specific prior written permission. - * - * 4. This software may only be redistributed and used in connection with an - * Atmel microcontroller product. - * - * THIS SOFTWARE IS PROVIDED BY ATMEL "AS IS" AND ANY EXPRESS OR IMPLIED - * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF - * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT ARE - * EXPRESSLY AND SPECIFICALLY DISCLAIMED. IN NO EVENT SHALL ATMEL BE LIABLE FOR - * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL - * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS - * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) - * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, - * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN - * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE - * POSSIBILITY OF SUCH DAMAGE. - * - * \asf_license_stop - * - */ -/** -* Support and FAQ: visit <a href="http://www.atmel.com/design-support/">Atmel Support</a> -*/ - #ifndef _STRINGZ_H_ #define _STRINGZ_H_
--- a/targets/cmsis/TARGET_Atmel/TARGET_SAM21/utils/preprocessor/tpaste.h Wed Jul 15 08:15:08 2015 +0100 +++ b/targets/cmsis/TARGET_Atmel/TARGET_SAM21/utils/preprocessor/tpaste.h Fri Jul 17 09:15:10 2015 +0100 @@ -1,49 +1,3 @@ -/** - * \file - * - * \brief Preprocessor token pasting utils. - * - * Copyright (C) 2012-2014 Atmel Corporation. All rights reserved. - * - * \asf_license_start - * - * \page License - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are met: - * - * 1. Redistributions of source code must retain the above copyright notice, - * this list of conditions and the following disclaimer. - * - * 2. Redistributions in binary form must reproduce the above copyright notice, - * this list of conditions and the following disclaimer in the documentation - * and/or other materials provided with the distribution. - * - * 3. The name of Atmel may not be used to endorse or promote products derived - * from this software without specific prior written permission. - * - * 4. This software may only be redistributed and used in connection with an - * Atmel microcontroller product. - * - * THIS SOFTWARE IS PROVIDED BY ATMEL "AS IS" AND ANY EXPRESS OR IMPLIED - * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF - * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT ARE - * EXPRESSLY AND SPECIFICALLY DISCLAIMED. IN NO EVENT SHALL ATMEL BE LIABLE FOR - * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL - * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS - * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) - * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, - * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN - * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE - * POSSIBILITY OF SUCH DAMAGE. - * - * \asf_license_stop - * - */ -/** -* Support and FAQ: visit <a href="http://www.atmel.com/design-support/">Atmel Support</a> -*/ - #ifndef _TPASTE_H_ #define _TPASTE_H_
--- a/targets/cmsis/TARGET_Atmel/TARGET_SAM21/utils/status_codes.h Wed Jul 15 08:15:08 2015 +0100 +++ b/targets/cmsis/TARGET_Atmel/TARGET_SAM21/utils/status_codes.h Fri Jul 17 09:15:10 2015 +0100 @@ -1,52 +1,3 @@ -/** - * \file - * - * \brief Status code definitions. - * - * This file defines various status codes returned by functions, - * indicating success or failure as well as what kind of failure. - * - * Copyright (C) 2012-2014 Atmel Corporation. All rights reserved. - * - * \asf_license_start - * - * \page License - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are met: - * - * 1. Redistributions of source code must retain the above copyright notice, - * this list of conditions and the following disclaimer. - * - * 2. Redistributions in binary form must reproduce the above copyright notice, - * this list of conditions and the following disclaimer in the documentation - * and/or other materials provided with the distribution. - * - * 3. The name of Atmel may not be used to endorse or promote products derived - * from this software without specific prior written permission. - * - * 4. This software may only be redistributed and used in connection with an - * Atmel microcontroller product. - * - * THIS SOFTWARE IS PROVIDED BY ATMEL "AS IS" AND ANY EXPRESS OR IMPLIED - * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF - * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT ARE - * EXPRESSLY AND SPECIFICALLY DISCLAIMED. IN NO EVENT SHALL ATMEL BE LIABLE FOR - * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL - * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS - * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) - * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, - * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN - * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE - * POSSIBILITY OF SUCH DAMAGE. - * - * \asf_license_stop - * - */ -/** -* Support and FAQ: visit <a href="http://www.atmel.com/design-support/">Atmel Support</a> -*/ - #ifndef STATUS_CODES_H_INCLUDED #define STATUS_CODES_H_INCLUDED
--- a/targets/hal/TARGET_Atmel/TARGET_SAM21/PeripheralNames.h Wed Jul 15 08:15:08 2015 +0100
+++ b/targets/hal/TARGET_Atmel/TARGET_SAM21/PeripheralNames.h Fri Jul 17 09:15:10 2015 +0100
@@ -27,6 +27,9 @@
#define _SERCOM_SPI_NAME(n, unused) \
SPI##n,
+#define _SERCOM_PAD_NAME(n, pad) \
+ SERCOM##n##_PAD##pad = ((n & 0xF) | ((pad & 0xF) << 4)),
+
#define _SERCOM_I2C_NAME(n, unused) \
I2C##n,
@@ -40,18 +43,38 @@
UART_4 = (int)0x42001800UL, // Base address of SERCOM4
UART_5 = (int)0x42001C00UL // Base address of SERCOM5
} UARTName;
-/*
-typedef enum {
- ADC0_0 = 0,
- ADC0_1,
- ADC0_2,
- ADC0_3,
- ADC0_4,
- ADC0_5,
- ADC0_6,
- ADC0_7
+
+typedef enum { // for each input control mux 4,5,6,7,16,17,10,11 used in R21
+ ADC_4 = 0x4ul,
+ ADC_5 = 0x5ul,
+ ADC_6 = 0x6ul,
+ ADC_7 = 0x7ul,
+ ADC_10 = 0xAul,
+ ADC_11 = 0xBul,
+ ADC_16 = 0x10ul,
+ ADC_17 = 0x11ul
} ADCName;
+typedef enum { // for each channel
+ EXTINT_0 = 0,
+ EXTINT_1,
+ EXTINT_2,
+ EXTINT_3,
+ EXTINT_4,
+ EXTINT_5,
+ EXTINT_6,
+ EXTINT_7,
+ EXTINT_8,
+ EXTINT_9,
+ EXTINT_10,
+ EXTINT_11,
+ EXTINT_12,
+ EXTINT_13,
+ EXTINT_14,
+ EXTINT_15
+} EXTINTName;
+
+/*
typedef enum {
DAC_0 = 0
} DACName;*/
@@ -63,6 +86,20 @@
typedef enum {
MREPEAT(SERCOM_INST_NUM, _SERCOM_I2C_NAME, ~)
} I2CName;
+
+typedef enum {
+ /* Pad 0 definitions */
+ MREPEAT(SERCOM_INST_NUM, _SERCOM_PAD_NAME, 0)
+
+ /* Pad 1 definitions */
+ MREPEAT(SERCOM_INST_NUM, _SERCOM_PAD_NAME, 1)
+
+ /* Pad 2 definitions */
+ MREPEAT(SERCOM_INST_NUM, _SERCOM_PAD_NAME, 2)
+
+ /* Pad 3 definitions */
+ MREPEAT(SERCOM_INST_NUM, _SERCOM_PAD_NAME, 3)
+} SercomPadName;
/*
typedef enum {
PWM_1 = 1,
--- a/targets/hal/TARGET_Atmel/TARGET_SAM21/PeripheralPins.h Wed Jul 15 08:15:08 2015 +0100 +++ b/targets/hal/TARGET_Atmel/TARGET_SAM21/PeripheralPins.h Fri Jul 17 09:15:10 2015 +0100 @@ -20,34 +20,21 @@ #include "pinmap.h" #include "PeripheralNames.h" -void find_pin_settings (PinName output, PinName input, PinName clock, PinName chipsel, uint32_t* pad_pinmuxes); // clock also for RTS and chipsel for CTS -uint32_t find_mux_setting (PinName output, PinName input, PinName clock, PinName chipsel); /************RTC***************/ //extern const PinMap PinMap_RTC[]; /************ADC***************/ -//extern const PinMap PinMap_ADC[]; - -/************DAC***************/ -//extern const PinMap PinMap_DAC[]; - -/************I2C***************/ -//extern const PinMap PinMap_I2C_SDA[]; -//extern const PinMap PinMap_I2C_SCL[]; +extern const PinMap PinMap_ADC[]; -/************UART***************/ -extern const PinMap PinMap_UART_TX[]; -extern const PinMap PinMap_UART_RX[]; - -/************SPI***************/ -//extern const PinMap PinMap_SPI_SCLK[]; -//extern const PinMap PinMap_SPI_MOSI[]; -//extern const PinMap PinMap_SPI_MISO[]; -//extern const PinMap PinMap_SPI_SSEL[]; +//*********SERCOM*************/ +extern const PinMap PinMap_SERCOM_PAD[]; +extern const PinMap PinMap_SERCOM_PADEx[]; /************PWM***************/ //extern const PinMap PinMap_PWM[]; +/**********EXTINT*************/ +extern const PinMap PinMap_EXTINT[]; #endif
--- a/targets/hal/TARGET_Atmel/TARGET_SAM21/PinNames.h Wed Jul 15 08:15:08 2015 +0100
+++ b/targets/hal/TARGET_Atmel/TARGET_SAM21/PinNames.h Fri Jul 17 09:15:10 2015 +0100
@@ -31,8 +31,6 @@
typedef enum {
PA00 = 0,
PA01 = 1,
- PA02 = 2,
- PA03 = 3,
PA04 = 4,
PA05 = 5,
PA06 = 6,
@@ -50,58 +48,40 @@
PA18 = 18,
PA19 = 19,
PA20 = 20,
- PA21 = 21,
PA22 = 22,
PA23 = 23,
PA24 = 24,
PA25 = 25,
- PA26 = 26,
PA27 = 27,
PA28 = 28,
- PA29 = 29,
PA30 = 30,
PA31 = 31,
PB00 = 32,
- PB01 = 33,
PB02 = 34,
PB03 = 35,
- PB04 = 36,
- PB05 = 37,
- PB06 = 38,
- PB07 = 39,
PB08 = 40,
PB09 = 41,
- PB10 = 42,
- PB11 = 43,
- PB12 = 44,
- PB13 = 45,
PB14 = 46,
PB15 = 47,
PB16 = 48,
PB17 = 49,
- PB18 = 50,
- PB19 = 51,
- PB20 = 52,
- PB21 = 53,
PB22 = 54,
PB23 = 55,
- PB24 = 56,
- PB25 = 57,
- PB26 = 58,
- PB27 = 59,
- PB28 = 60,
- PB29 = 61,
PB30 = 62,
PB31 = 63,
- PC16 = 64,
- PC18 = 65,
- PC19 = 66,
+ PC16 = 80,
+ PC18 = 82,
+ PC19 = 83,
USBTX = PA04,
USBRX = PA05,
+
LED1 = PA19,
+ LED2 = PA19,
+ LED3 = PA19,
+ LED4 = PA19,
// Not connected
NC = (int)0xFFFFFFFF
--- a/targets/hal/TARGET_Atmel/TARGET_SAM21/TARGET_SAMD21J18A/SAMD21_XPLAINED_PRO/samd21_xplained_pro.h Wed Jul 15 08:15:08 2015 +0100 +++ b/targets/hal/TARGET_Atmel/TARGET_SAM21/TARGET_SAMD21J18A/SAMD21_XPLAINED_PRO/samd21_xplained_pro.h Fri Jul 17 09:15:10 2015 +0100 @@ -1,49 +1,3 @@ -/** - * \file - * - * \brief SAM D21 Xplained Pro board definition - * - * Copyright (c) 2014 Atmel Corporation. All rights reserved. - * - * \asf_license_start - * - * \page License - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are met: - * - * 1. Redistributions of source code must retain the above copyright notice, - * this list of conditions and the following disclaimer. - * - * 2. Redistributions in binary form must reproduce the above copyright notice, - * this list of conditions and the following disclaimer in the documentation - * and/or other materials provided with the distribution. - * - * 3. The name of Atmel may not be used to endorse or promote products derived - * from this software without specific prior written permission. - * - * 4. This software may only be redistributed and used in connection with an - * Atmel microcontroller product. - * - * THIS SOFTWARE IS PROVIDED BY ATMEL "AS IS" AND ANY EXPRESS OR IMPLIED - * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF - * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT ARE - * EXPRESSLY AND SPECIFICALLY DISCLAIMED. IN NO EVENT SHALL ATMEL BE LIABLE FOR - * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL - * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS - * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) - * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, - * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN - * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE - * POSSIBILITY OF SUCH DAMAGE. - * - * \asf_license_stop - * - */ -/** -* Support and FAQ: visit <a href="http://www.atmel.com/design-support/">Atmel Support</a> -*/ - #ifndef SAMD21_XPLAINED_PRO_H_INCLUDED #define SAMD21_XPLAINED_PRO_H_INCLUDED
--- a/targets/hal/TARGET_Atmel/TARGET_SAM21/TARGET_SAMD21J18A/device.h Wed Jul 15 08:15:08 2015 +0100 +++ b/targets/hal/TARGET_Atmel/TARGET_SAM21/TARGET_SAMD21J18A/device.h Fri Jul 17 09:15:10 2015 +0100 @@ -20,23 +20,25 @@ #define DEVICE_PORTOUT 1 #define DEVICE_PORTINOUT 1 -#define DEVICE_INTERRUPTIN 0 +#define DEVICE_INTERRUPTIN 1 -#define DEVICE_ANALOGIN 0 +#define DEVICE_ANALOGIN 1 #define DEVICE_ANALOGOUT 0 -#define DEVICE_SERIAL 0 -#define DEVICE_SERIAL_FC 0 +#define DEVICE_SERIAL 1 +#define DEVICE_SERIAL_FC 1 +#define DEVICE_SERIAL_ASYNCH 1 #define DEVICE_I2C 0 #define DEVICE_I2CSLAVE 0 -#define DEVICE_SPI 0 -#define DEVICE_SPISLAVE 0 +#define DEVICE_SPI 1 +#define DEVICE_SPISLAVE 1 +#define DEVICE_SPI_ASYNCH 1 #define DEVICE_CAN 0 -#define DEVICE_RTC 0 +#define DEVICE_RTC 1 #define DEVICE_ETHERNET 0 @@ -47,7 +49,7 @@ #define DEVICE_ID_LENGTH 0 #define DEVICE_MAC_OFFSET 0 -#define DEVICE_SLEEP 0 +#define DEVICE_SLEEP 1 #define DEVICE_DEBUG_AWARENESS 0
--- a/targets/hal/TARGET_Atmel/TARGET_SAM21/TARGET_SAMR21G18A/PeripheralPins.c Wed Jul 15 08:15:08 2015 +0100
+++ b/targets/hal/TARGET_Atmel/TARGET_SAM21/TARGET_SAMR21G18A/PeripheralPins.c Fri Jul 17 09:15:10 2015 +0100
@@ -16,503 +16,139 @@
#include "PeripheralPins.h"
-#define SERCOM_NULL 0xFF
-#define MUX_NULL 0xFF
-
-#define SERCOM_USART_CTRLA_RXPO_Pos 20 /**< \brief (SERCOM_USART_CTRLA) Receive Data Pinout */
-#define SERCOM_USART_CTRLA_RXPO_Msk (0x3ul << SERCOM_USART_CTRLA_RXPO_Pos)
-#define SERCOM_USART_CTRLA_RXPO(value) ((SERCOM_USART_CTRLA_RXPO_Msk & ((value) << SERCOM_USART_CTRLA_RXPO_Pos)))
-
-#define SERCOM_USART_CTRLA_TXPO_Pos 16 /**< \brief (SERCOM_USART_CTRLA) Transmit Data Pinout */
-#define SERCOM_USART_CTRLA_TXPO_Msk (0x3ul << SERCOM_USART_CTRLA_TXPO_Pos)
-#define SERCOM_USART_CTRLA_TXPO(value) ((SERCOM_USART_CTRLA_TXPO_Msk & ((value) << SERCOM_USART_CTRLA_TXPO_Pos)))
-
-
/************RTC***************/
const PinMap PinMap_RTC[] = {
+ /* Not connected */
+ {NC , NC , NC}
};
/************ADC***************/
const PinMap PinMap_ADC[] = {
-};
-
-/************DAC***************/
-const PinMap PinMap_DAC[] = {
-};
+ {PA04, ADC_4, 1},
+ {PA05, ADC_5, 1},
+ {PA06, ADC_6, 1},
+ {PA07, ADC_7, 1},
+ {PB02, ADC_10, 1},
+ {PB03, ADC_11, 1},
+ {PA08, ADC_16, 1},
+ {PA09, ADC_17, 1},
-/************I2C***************/
-const PinMap PinMap_I2C_SDA[] = {
-};
-
-const PinMap PinMap_I2C_SCL[] = {
+ /* Not connected */
+ {NC , NC , NC}
};
-/************UART***************/
-const PinMap PinMap_UART_TX[] = {
- {PA04, UART_0, 0}
-};
+/************SERCOM Pins***********/
+const PinMap PinMap_SERCOM_PAD[] = {
+ {PA04, SERCOM0_PAD0, 3},
+ {PA05, SERCOM0_PAD1, 3},
+ {PA06, SERCOM0_PAD2, 3},
+ {PA07, SERCOM0_PAD3, 3},
+ {PA08, SERCOM0_PAD0, 2},
+ {PA09, SERCOM0_PAD1, 2},
+ {PA12, SERCOM2_PAD0, 2},
+ {PA13, SERCOM2_PAD1, 2},
+ {PA14, SERCOM2_PAD2, 2},
+ {PA15, SERCOM2_PAD3, 2},
+ {PA16, SERCOM1_PAD0, 2},
+ {PA17, SERCOM1_PAD1, 2},
+ {PA18, SERCOM1_PAD2, 2},
+ {PA19, SERCOM1_PAD3, 2},
+ {PA22, SERCOM3_PAD0, 2},
+ {PA23, SERCOM3_PAD1, 2},
+ {PA24, SERCOM3_PAD2, 2},
+ {PA25, SERCOM3_PAD3, 2},
+ {PA27, SERCOM3_PAD0, 5},
+ {PA28, SERCOM3_PAD1, 5},
+ {PB02, SERCOM5_PAD0, 3},
+ {PB03, SERCOM5_PAD1, 3},
+ {PB22, SERCOM5_PAD2, 3},
+ {PB23, SERCOM5_PAD3, 3},
+ {PB30, SERCOM4_PAD2, 5},
+ {PB31, SERCOM4_PAD1, 5},
+ {PC18, SERCOM4_PAD3, 5},
+ {PC19, SERCOM4_PAD0, 5},
-const PinMap PinMap_UART_RX[] = {
- {PA05, UART_0, 0}
+ /* Not connected */
+ {NC , NC , NC}
};
-/************SPI***************/
-const PinMap PinMap_SPI_SCLK[] = {
+/*******SERCOM Pins extended*******/
+const PinMap PinMap_SERCOM_PADEx[] = {
+ {PA00, SERCOM1_PAD0, 3},
+ {PA01, SERCOM1_PAD1, 3},
+ {PA08, SERCOM2_PAD0, 3},
+ {PA09, SERCOM2_PAD1, 3},
+ {PA16, SERCOM3_PAD0, 3},
+ {PA17, SERCOM3_PAD1, 3},
+ {PA18, SERCOM3_PAD2, 3},
+ {PA19, SERCOM3_PAD3, 3},
+ {PA22, SERCOM5_PAD0, 3},
+ {PA23, SERCOM5_PAD1, 3},
+ {PA24, SERCOM5_PAD2, 3},
+ {PA25, SERCOM5_PAD3, 3},
+ {PA30, SERCOM1_PAD2, 3},
+ {PA31, SERCOM1_PAD3, 3},
+
+ /* Not connected */
+ {NC , NC , NC}
};
-const PinMap PinMap_SPI_MOSI[] = {
-};
-
-const PinMap PinMap_SPI_MISO[] = {
-};
-
-const PinMap PinMap_SPI_SSEL[] = {
-};
/************PWM***************/
const PinMap PinMap_PWM[] = {
-};
-
-/********SERCOM MAPPING*********/
-struct pin_sercom {
- uint8_t pad_num; // a pin always mapped to a pad
- uint8_t com_num[2]; // a pin always mapped to maximum of 2 sercoms
-// uint8_t pin_mux[2]; // Mux setting for the pin A,B...H ---> 0,1...7
-};
-struct pin_values {
- uint8_t pin;
- uint8_t pad;
- uint8_t com;
-};
-
-struct pin_sercom SAM21[] = {{0, {1, SERCOM_NULL}/*, {3, MUX_NULL}*/}, // PA00
- {1, {1, SERCOM_NULL}/*, {3, MUX_NULL}*/}, // PA01
- {0, {0, SERCOM_NULL}/*, {3, MUX_NULL}*/}, // PA04
- {1, {0, SERCOM_NULL}/*, {3, MUX_NULL}*/}, // PA05
- {2, {0, SERCOM_NULL}/*, {3, MUX_NULL}*/}, // PA06
- {3, {0, SERCOM_NULL}/*, {3, MUX_NULL}*/}, // PA07
- {0, {0, 2}/*, {2, 3}*/}, // PA08
- {1, {0, 2}/*, {2, 3}*/}, // PA09
- {0, {2, SERCOM_NULL}/*, {2, MUX_NULL}*/}, // PA12
- {1, {2, SERCOM_NULL}/*, {2, MUX_NULL}*/}, // PA13
- {2, {2, SERCOM_NULL}/*, {2, MUX_NULL}*/}, // PA14
- {3, {2, SERCOM_NULL}/*, {2, MUX_NULL}*/}, // PA15
- {0, {1, 3}/*, {2, 3}*/}, // PA16
- {1, {1, 3}/*, {2, 3}*/}, // PA17
- {2, {1, 3}/*, {2, 3}*/}, // PA18
- {3, {1, 3}/*, {2, 3}*/}, // PA19
- {0, {3, 5}/*, {2, 3}*/}, // PA22
- {1, {3, 5}/*, {2, 3}*/}, // PA23
- {2, {3, 5}/*, {2, 3}*/}, // PA24
- {3, {3, 5}/*, {2, 3}*/}, // PA25
- {0, {3, SERCOM_NULL}/*, {5, MUX_NULL}*/}, // PA27
- {1, {3, SERCOM_NULL}/*, {5, MUX_NULL}*/}, // PA28
- {2, {1, SERCOM_NULL}/*, {3, MUX_NULL}*/}, // PA30
- {3, {1, SERCOM_NULL}/*, {3, MUX_NULL}*/}, // PA31
- {0, {5, SERCOM_NULL}/*, {3, MUX_NULL}*/}, // PB02
- {1, {5, SERCOM_NULL}/*, {3, MUX_NULL}*/}, // PB03
- {2, {5, SERCOM_NULL}/*, {3, MUX_NULL}*/}, // PB22
- {3, {5, SERCOM_NULL}/*, {3, MUX_NULL}*/}, // PB23
- {2, {4, SERCOM_NULL}/*, {5, MUX_NULL}*/}, // PB30
- {1, {4, SERCOM_NULL}/*, {5, MUX_NULL}*/}, // PB31
- {3, {4, SERCOM_NULL}/*, {5, MUX_NULL}*/}, // PC18
- {0, {4, SERCOM_NULL}/*, {5, MUX_NULL}*/} // PC19
-};
-const PinMap PinMap_SERCOM_PINS[] = {
- {PA00},
- {PA01},
- {PA04},
- {PA05},
- {PA06},
- {PA07},
- {PA08},
- {PA09},
- {PA12},
- {PA13},
- {PA14},
- {PA15},
- {PA16},
- {PA17},
- {PA18},
- {PA19},
- {PA22},
- {PA23},
- {PA24},
- {PA25},
- {PA27},
- {PA28},
- {PA30},
- {PA31},
-
- {PB02},
- {PB03},
- {PB22},
- {PB23},
- {PB30},
- {PB31},
-
- {PC18},
- {PC19}
-
+ /* Not connected */
+ {NC , NC , NC}
};
-uint32_t pinmap_find_sercom_index (PinName pin, const PinMap* map)
-{
- uint8_t count = 0;
- while (map->pin != NC) {
- if (map->pin == pin)
- return count;
- map++;
- count++;
- }
- return (uint32_t)NC;
-}
+/**********EXTINT*************/
+const PinMap PinMap_EXTINT[] = {
+ {PB00, EXTINT_0, 0},
+ {PB16, EXTINT_0, 0},
-uint32_t pinmap_sercom_peripheral (PinName pin1, PinName pin2)
-{
- uint8_t index1 = 0, index2 = 0;
-
- if ((pin1 == (PinName)NC) || (pin2 == (PinName)NC)) {
- return (uint32_t)NC;
- }
+ {PA17, EXTINT_1, 0},
+ {PB17, EXTINT_1, 0},
+ {PA01, EXTINT_1, 0},
- index1 = pinmap_find_sercom_index(pin1, PinMap_SERCOM_PINS);
- index2 = pinmap_find_sercom_index(pin2, PinMap_SERCOM_PINS);
+ {PA18, EXTINT_2, 0},
+ {PB02, EXTINT_2, 0},
+
+ {PA19, EXTINT_3, 0},
+ {PB03, EXTINT_3, 0},
- if (SAM21[index1].com_num[1] == SERCOM_NULL) {
- return SAM21[index1].com_num[0];
- } else {
- if ((SAM21[index1].com_num[0] == SAM21[index2].com_num[0]) || (SAM21[index1].com_num[0] == SAM21[index2].com_num[1])) {
- return SAM21[index1].com_num[0];
- } else {
- return SAM21[index1].com_num[1];
- }
- }
-}
+ {PA04, EXTINT_4, 0},
+
+ {PA05, EXTINT_5, 0},
-uint32_t pinmap_sercom_pad (PinName pin)
-{
- uint8_t index = 0;
-
- if (pin == (PinName)NC)
- return (uint32_t)NC;
-
- index = pinmap_find_sercom_index(pin, PinMap_SERCOM_PINS);
- return SAM21[index].pad_num;
-}
+ {PA06, EXTINT_6, 0},
+ {PA22, EXTINT_6, 0},
+ {PB22, EXTINT_6, 0},
-uint32_t find_sercom_pinmux (struct pin_values* PinValues)
-{
- switch (PinValues->com) {
- case 0: // SERCOM0
- switch (PinValues->pin) {
- case PA04:
- return PINMUX_PA04D_SERCOM0_PAD0;
- break;
- case PA08:
- return PINMUX_PA08C_SERCOM0_PAD0;
- break;
- case PA05:
- return PINMUX_PA05D_SERCOM0_PAD1;
- break;
- case PA09:
- return PINMUX_PA09C_SERCOM0_PAD1;
- break;
- case PA06:
- return PINMUX_PA06D_SERCOM0_PAD2;
- break;
- case PA10:
- return PINMUX_PA10C_SERCOM0_PAD2;
- break;
- case PA07:
- return PINMUX_PA07D_SERCOM0_PAD3;
- break;
- case PA11:
- return PINMUX_PA11C_SERCOM0_PAD3;
- break;
- default:
- break;
- }
- break;
- case 1: // SERCOM1
- switch (PinValues->pin) {
- case PA16:
- return PINMUX_PA16C_SERCOM1_PAD0;
- break;
- case PA00:
- return PINMUX_PA00D_SERCOM1_PAD0;
- break;
- case PA17:
- return PINMUX_PA17C_SERCOM1_PAD1;
- break;
- case PA01:
- return PINMUX_PA01D_SERCOM1_PAD1;
- break;
- case PA30:
- return PINMUX_PA30D_SERCOM1_PAD2;
- break;
- case PA18:
- return PINMUX_PA18C_SERCOM1_PAD2;
- break;
- case PA31:
- return PINMUX_PA31D_SERCOM1_PAD3;
- break;
- case PA19:
- return PINMUX_PA19C_SERCOM1_PAD3;
- break;
- default:
- break;
- }
- break;
- case 2: // SERCOM2
- switch (PinValues->pin) {
- case PA08:
- return PINMUX_PA08D_SERCOM2_PAD0;
- break;
- case PA12:
- return PINMUX_PA12C_SERCOM2_PAD0;
- break;
- case PA09:
- return PINMUX_PA09D_SERCOM2_PAD1;
- break;
- case PA13:
- return PINMUX_PA13C_SERCOM2_PAD1;
- break;
- case PA10:
- return PINMUX_PA10D_SERCOM2_PAD2;
- break;
- case PA14:
- return PINMUX_PA14C_SERCOM2_PAD2;
- break;
- case PA11:
- return PINMUX_PA11D_SERCOM2_PAD3;
- break;
- case PA15:
- return PINMUX_PA15C_SERCOM2_PAD3;
- break;
- default:
- break;
- }
- break;
- case 3: // SERCOM3
- switch (PinValues->pin) {
- case PA16:
- return PINMUX_PA16D_SERCOM3_PAD0;
- break;
- case PA22:
- return PINMUX_PA22C_SERCOM3_PAD0;
- break;
- case PA27:
- return PINMUX_PA27F_SERCOM3_PAD0;
- break;
- case PA17:
- return PINMUX_PA17D_SERCOM3_PAD1;
- break;
- case PA23:
- return PINMUX_PA23C_SERCOM3_PAD1;
- break;
- case PA28:
- return PINMUX_PA28F_SERCOM3_PAD1;
- break;
- case PA18:
- return PINMUX_PA18D_SERCOM3_PAD2;
- break;
- case PA20:
- return PINMUX_PA20D_SERCOM3_PAD2;
- break;
- case PA24:
- return PINMUX_PA24C_SERCOM3_PAD2;
- break;
- case PA19:
- return PINMUX_PA19D_SERCOM3_PAD3;
- break;
- case PA25:
- return PINMUX_PA25C_SERCOM3_PAD3;
- break;
- default:
- break;
- }
- break;
- case 4: // SERCOM4
- switch (PinValues->pin) {
- case PA12:
- return PINMUX_PA12D_SERCOM4_PAD0;
- break;
- case PB08:
- return PINMUX_PB08D_SERCOM4_PAD0;
- break;
- case PC19:
- return PINMUX_PC19F_SERCOM4_PAD0;
- break;
- case PA13:
- return PINMUX_PA13D_SERCOM4_PAD1;
- break;
- case PB09:
- return PINMUX_PB09D_SERCOM4_PAD1;
- break;
- case PB31:
- return PINMUX_PB31F_SERCOM4_PAD1;
- break;
- case PA14:
- return PINMUX_PA14D_SERCOM4_PAD2;
- break;
- case PB14:
- return PINMUX_PB14C_SERCOM4_PAD2;
- break;
- case PB30:
- return PINMUX_PB30F_SERCOM4_PAD2;
- break;
- case PA15:
- return PINMUX_PA15D_SERCOM4_PAD3;
- break;
- case PB15:
- return PINMUX_PB15C_SERCOM4_PAD3;
- break;
- case PC18:
- return PINMUX_PC18F_SERCOM4_PAD3;
- break;
- default:
- break;
- }
- break;
- case 5: // SERCOM5
- switch (PinValues->pin) {
- case PB16:
- return PINMUX_PB16C_SERCOM5_PAD0;
- break;
- case PA22:
- return PINMUX_PA22D_SERCOM5_PAD0;
- break;
- case PB02:
- return PINMUX_PB02D_SERCOM5_PAD0;
- break;
- case PB30:
- return PINMUX_PB30D_SERCOM5_PAD0;
- break;
- case PB17:
- return PINMUX_PB17C_SERCOM5_PAD1;
- break;
- case PA23:
- return PINMUX_PA23D_SERCOM5_PAD1;
- break;
- case PB03:
- return PINMUX_PB03D_SERCOM5_PAD1;
- break;
- case PB31:
- return PINMUX_PB31D_SERCOM5_PAD1;
- break;
- case PA24:
- return PINMUX_PA24D_SERCOM5_PAD2;
- break;
- case PB00:
- return PINMUX_PB00D_SERCOM5_PAD2;
- break;
- case PB22:
- return PINMUX_PB22D_SERCOM5_PAD2;
- break;
- case PA20:
- return PINMUX_PA20C_SERCOM5_PAD2;
- break;
- case PA25:
- return PINMUX_PA25D_SERCOM5_PAD3;
- break;
- case PB23:
- return PINMUX_PB23D_SERCOM5_PAD3;
- break;
- default:
- break;
- }
- break;
- }
-}
-uint32_t find_mux_setting (PinName output, PinName input, PinName clock, PinName chipsel)
-{
- struct pin_values input_values, output_values, clock_values, chipsel_values;
- uint32_t mux_setting = 0;
+ {PA07, EXTINT_7, 0},
+ {PA23, EXTINT_7, 0},
+ {PB23, EXTINT_7, 0},
+
+ {PA28, EXTINT_8, 0},
+
+ {PA09, EXTINT_9, 0},
+
+ {PA30, EXTINT_10, 0},
+
+ {PA31, EXTINT_11, 0},
- input_values.pin = input;
- output_values.pin = output;
- clock_values.pin = clock;
- chipsel_values.pin = chipsel;
-
- input_values.com = pinmap_sercom_peripheral(input, output);
- output_values.com = input_values.com;
- clock_values.com = input_values.com;
- chipsel_values.com = input_values.com;
-
- input_values.pad = pinmap_sercom_pad(input);
- output_values.pad = pinmap_sercom_pad(output);
- clock_values.pad = pinmap_sercom_pad(clock);
- chipsel_values.pad = pinmap_sercom_pad(chipsel);
+ {PA12, EXTINT_12, 0},
+ {PA24, EXTINT_12, 0},
- switch(input_values.pad) { //TODO: Condition for hardware flow control enabled is different.
- case 0:
- mux_setting |= SERCOM_USART_CTRLA_RXPO(0);
- break;
- case 1:
- mux_setting |= SERCOM_USART_CTRLA_RXPO(1);
- break;
- case 2:
- mux_setting |= SERCOM_USART_CTRLA_RXPO(2);
- break;
- case 3:
- mux_setting |= SERCOM_USART_CTRLA_RXPO(3);
- break;
- }
+ {PA13, EXTINT_13, 0},
+ {PA25, EXTINT_13, 0},
- if ((clock == NC) && (chipsel == NC)) { // condition for no hardware control and uart
- if ((output_values.pad == 0)) { // condition for hardware enable and usart is different
- mux_setting |= SERCOM_USART_CTRLA_TXPO(0);
- } else if((output_values.pad == 2)) {
- mux_setting |= SERCOM_USART_CTRLA_TXPO(1);
- } else {
- mux_setting = mux_setting; // dummy condition
- }
- } else { // for hardware flow control and uart // expecting the tx in pad 0, rts in pad2 and cts in pad 3
- if((output_values.pad == 0) && (clock_values.pad/*rts pin*/ == 2) && (chipsel_values.pad/*cts pin*/ == 3)) {
- mux_setting |= SERCOM_USART_CTRLA_TXPO(2);
- }
- }
-
- return mux_setting;
-}
-
-void find_pin_settings (PinName output, PinName input, PinName clock, PinName chipsel, uint32_t* pad_pinmuxes)
-{
- struct pin_values input_values, output_values, clock_values, chipsel_values;
- uint8_t i = 0;
-
- for (i = 0; i < 4 ; i++ ) { // load default values for the pins
- pad_pinmuxes[i] = 0xFFFFFFFF; //PINMUX_UNUSED
- }
+ {PA14, EXTINT_14, 0},
- input_values.pin = input;
- output_values.pin = output;
- clock_values.pin = clock;
- chipsel_values.pin = chipsel;
-
- input_values.com = pinmap_sercom_peripheral(input, output);
- output_values.com = input_values.com;
- clock_values.com = input_values.com;
- chipsel_values.com = input_values.com;
+ {PA15, EXTINT_15, 0},
+ {PA27, EXTINT_15, 0},
- input_values.pad = pinmap_sercom_pad(input);
- output_values.pad = pinmap_sercom_pad(output);
- clock_values.pad = pinmap_sercom_pad(clock);
- chipsel_values.pad = pinmap_sercom_pad(chipsel);
-
- if (input_values.pad < 0x04)
- pad_pinmuxes[input_values.pad] = find_sercom_pinmux(&input_values);
- if (output_values.pad < 0x04)
- pad_pinmuxes[output_values.pad] = find_sercom_pinmux(&output_values);
- if (clock_values.pad < 0x04)
- pad_pinmuxes[clock_values.pad] = find_sercom_pinmux(&clock_values);
- if (chipsel_values.pad < 0x04)
- pad_pinmuxes[chipsel_values.pad] = find_sercom_pinmux(&chipsel_values);
-
-}
+ /* Not connected */
+ {NC , NC , NC}
+};
-
-
--- a/targets/hal/TARGET_Atmel/TARGET_SAM21/TARGET_SAMR21G18A/SAMR21_XPLAINED_PRO/samr21_xplained_pro.h Wed Jul 15 08:15:08 2015 +0100 +++ b/targets/hal/TARGET_Atmel/TARGET_SAM21/TARGET_SAMR21G18A/SAMR21_XPLAINED_PRO/samr21_xplained_pro.h Fri Jul 17 09:15:10 2015 +0100 @@ -1,49 +1,3 @@ -/** - * \file - * - * \brief SAM R21 Xplained Pro board definition - * - * Copyright (c) 2014 Atmel Corporation. All rights reserved. - * - * \asf_license_start - * - * \page License - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are met: - * - * 1. Redistributions of source code must retain the above copyright notice, - * this list of conditions and the following disclaimer. - * - * 2. Redistributions in binary form must reproduce the above copyright notice, - * this list of conditions and the following disclaimer in the documentation - * and/or other materials provided with the distribution. - * - * 3. The name of Atmel may not be used to endorse or promote products derived - * from this software without specific prior written permission. - * - * 4. This software may only be redistributed and used in connection with an - * Atmel microcontroller product. - * - * THIS SOFTWARE IS PROVIDED BY ATMEL "AS IS" AND ANY EXPRESS OR IMPLIED - * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF - * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT ARE - * EXPRESSLY AND SPECIFICALLY DISCLAIMED. IN NO EVENT SHALL ATMEL BE LIABLE FOR - * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL - * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS - * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) - * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, - * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN - * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE - * POSSIBILITY OF SUCH DAMAGE. - * - * \asf_license_stop - * - */ -/** -* Support and FAQ: visit <a href="http://www.atmel.com/design-support/">Atmel Support</a> -*/ - #ifndef SAMR21_XPLAINED_PRO_H_INCLUDED #define SAMR21_XPLAINED_PRO_H_INCLUDED
--- a/targets/hal/TARGET_Atmel/TARGET_SAM21/TARGET_SAMR21G18A/device.h Wed Jul 15 08:15:08 2015 +0100 +++ b/targets/hal/TARGET_Atmel/TARGET_SAM21/TARGET_SAMR21G18A/device.h Fri Jul 17 09:15:10 2015 +0100 @@ -20,9 +20,9 @@ #define DEVICE_PORTOUT 1 #define DEVICE_PORTINOUT 1 -#define DEVICE_INTERRUPTIN 0 +#define DEVICE_INTERRUPTIN 1 -#define DEVICE_ANALOGIN 0 +#define DEVICE_ANALOGIN 1 #define DEVICE_ANALOGOUT 0 #define DEVICE_SERIAL 1 @@ -38,7 +38,7 @@ #define DEVICE_CAN 0 -#define DEVICE_RTC 0 +#define DEVICE_RTC 1 #define DEVICE_ETHERNET 0 @@ -49,7 +49,7 @@ #define DEVICE_ID_LENGTH 0 #define DEVICE_MAC_OFFSET 0 -#define DEVICE_SLEEP 0 +#define DEVICE_SLEEP 1 #define DEVICE_DEBUG_AWARENESS 0
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/targets/hal/TARGET_Atmel/TARGET_SAM21/analogin_api.c Fri Jul 17 09:15:10 2015 +0100
@@ -0,0 +1,181 @@
+/* mbed Microcontroller Library
+ * Copyright (c) 2006-2013 ARM Limited
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+#include "mbed_assert.h"
+#include "analogin_api.h"
+
+#include "cmsis.h"
+#include "pinmap.h"
+#include "PeripheralPins.h"
+#include "adc.h"
+#include "status_codes.h"
+
+struct adc_module adc_instance;
+
+void adc_configure_ain_pin(uint32_t pin)
+{
+#define PIN_INVALID_ADC_AIN 0xFFFFUL
+
+ /* Pinmapping table for AINxx -> GPIO pin number */
+ const uint32_t pinmapping[] = {
+#if (SAMD20E | SAMD21E)
+ PIN_PA02B_ADC_AIN0, PIN_PA03B_ADC_AIN1,
+ PIN_INVALID_ADC_AIN, PIN_INVALID_ADC_AIN,
+ PIN_PA04B_ADC_AIN4, PIN_PA05B_ADC_AIN5,
+ PIN_PA06B_ADC_AIN6, PIN_PA07B_ADC_AIN7,
+ PIN_INVALID_ADC_AIN, PIN_INVALID_ADC_AIN,
+ PIN_INVALID_ADC_AIN, PIN_INVALID_ADC_AIN,
+ PIN_INVALID_ADC_AIN, PIN_INVALID_ADC_AIN,
+ PIN_INVALID_ADC_AIN, PIN_INVALID_ADC_AIN,
+ PIN_PA08B_ADC_AIN16, PIN_PA09B_ADC_AIN17,
+ PIN_PA10B_ADC_AIN18, PIN_PA11B_ADC_AIN19,
+#elif (SAMD20G | SAMD21G)
+ PIN_PA02B_ADC_AIN0, PIN_PA03B_ADC_AIN1,
+ PIN_PB08B_ADC_AIN2, PIN_PB09B_ADC_AIN3,
+ PIN_PA04B_ADC_AIN4, PIN_PA05B_ADC_AIN5,
+ PIN_PA06B_ADC_AIN6, PIN_PA07B_ADC_AIN7,
+ PIN_INVALID_ADC_AIN, PIN_INVALID_ADC_AIN,
+ PIN_PB02B_ADC_AIN10, PIN_PB03B_ADC_AIN11,
+ PIN_INVALID_ADC_AIN, PIN_INVALID_ADC_AIN,
+ PIN_INVALID_ADC_AIN, PIN_INVALID_ADC_AIN,
+ PIN_PA08B_ADC_AIN16, PIN_PA09B_ADC_AIN17,
+ PIN_PA10B_ADC_AIN18, PIN_PA11B_ADC_AIN19,
+#elif (SAMD20J | SAMD21J)
+ PIN_PA02B_ADC_AIN0, PIN_PA03B_ADC_AIN1,
+ PIN_PB08B_ADC_AIN2, PIN_PB09B_ADC_AIN3,
+ PIN_PA04B_ADC_AIN4, PIN_PA05B_ADC_AIN5,
+ PIN_PA06B_ADC_AIN6, PIN_PA07B_ADC_AIN7,
+ PIN_PB00B_ADC_AIN8, PIN_PB01B_ADC_AIN9,
+ PIN_PB02B_ADC_AIN10, PIN_PB03B_ADC_AIN11,
+ PIN_PB04B_ADC_AIN12, PIN_PB05B_ADC_AIN13,
+ PIN_PB06B_ADC_AIN14, PIN_PB07B_ADC_AIN15,
+ PIN_PA08B_ADC_AIN16, PIN_PA09B_ADC_AIN17,
+ PIN_PA10B_ADC_AIN18, PIN_PA11B_ADC_AIN19,
+#elif SAMR21E
+ PIN_INVALID_ADC_AIN, PIN_INVALID_ADC_AIN,
+ PIN_INVALID_ADC_AIN, PIN_INVALID_ADC_AIN,
+ PIN_INVALID_ADC_AIN, PIN_INVALID_ADC_AIN,
+ PIN_PA06B_ADC_AIN6, PIN_PA07B_ADC_AIN7,
+ PIN_INVALID_ADC_AIN, PIN_INVALID_ADC_AIN,
+ PIN_INVALID_ADC_AIN, PIN_INVALID_ADC_AIN,
+ PIN_INVALID_ADC_AIN, PIN_INVALID_ADC_AIN,
+ PIN_INVALID_ADC_AIN, PIN_INVALID_ADC_AIN,
+ PIN_PA08B_ADC_AIN16, PIN_PA09B_ADC_AIN17,
+ PIN_INVALID_ADC_AIN, PIN_INVALID_ADC_AIN,
+#elif SAMR21G
+ PIN_INVALID_ADC_AIN, PIN_INVALID_ADC_AIN,
+ PIN_INVALID_ADC_AIN, PIN_INVALID_ADC_AIN,
+ PIN_PA04B_ADC_AIN4, PIN_PA05B_ADC_AIN5,
+ PIN_PA06B_ADC_AIN6, PIN_PA07B_ADC_AIN7,
+ PIN_INVALID_ADC_AIN, PIN_INVALID_ADC_AIN,
+ PIN_PB02B_ADC_AIN10, PIN_PB03B_ADC_AIN11,
+ PIN_INVALID_ADC_AIN, PIN_INVALID_ADC_AIN,
+ PIN_INVALID_ADC_AIN, PIN_INVALID_ADC_AIN,
+ PIN_PA08B_ADC_AIN16, PIN_PA09B_ADC_AIN17,
+ PIN_INVALID_ADC_AIN, PIN_INVALID_ADC_AIN,
+#elif (SAMD10C | SAMD11C)
+ PIN_PA02B_ADC_AIN0, PIN_INVALID_ADC_AIN,
+ PIN_PA04B_ADC_AIN2, PIN_PA05B_ADC_AIN3,
+ PIN_INVALID_ADC_AIN, PIN_INVALID_ADC_AIN,
+ PIN_PA14B_ADC_AIN6, PIN_PA15B_ADC_AIN7,
+ PIN_INVALID_ADC_AIN, PIN_INVALID_ADC_AIN,
+ PIN_INVALID_ADC_AIN, PIN_INVALID_ADC_AIN,
+ PIN_INVALID_ADC_AIN, PIN_INVALID_ADC_AIN,
+ PIN_INVALID_ADC_AIN, PIN_INVALID_ADC_AIN,
+ PIN_INVALID_ADC_AIN, PIN_INVALID_ADC_AIN,
+ PIN_INVALID_ADC_AIN, PIN_INVALID_ADC_AIN,
+#elif (SAMD10DS | SAMD11DS)
+ PIN_PA02B_ADC_AIN0, PIN_INVALID_ADC_AIN,
+ PIN_PA04B_ADC_AIN2, PIN_PA05B_ADC_AIN3,
+ PIN_PA06B_ADC_AIN4, PIN_PA07B_ADC_AIN5,
+ PIN_PA14B_ADC_AIN6, PIN_PA15B_ADC_AIN7,
+ PIN_INVALID_ADC_AIN, PIN_INVALID_ADC_AIN,
+ PIN_INVALID_ADC_AIN, PIN_INVALID_ADC_AIN,
+ PIN_INVALID_ADC_AIN, PIN_INVALID_ADC_AIN,
+ PIN_INVALID_ADC_AIN, PIN_INVALID_ADC_AIN,
+ PIN_INVALID_ADC_AIN, PIN_INVALID_ADC_AIN,
+ PIN_INVALID_ADC_AIN, PIN_INVALID_ADC_AIN,
+#elif (SAMD10DM | SAMD11DM)
+ PIN_PA02B_ADC_AIN0, PIN_PA03B_ADC_AIN1,
+ PIN_PA04B_ADC_AIN2, PIN_PA05B_ADC_AIN3,
+ PIN_PA06B_ADC_AIN4, PIN_PA07B_ADC_AIN5,
+ PIN_PA14B_ADC_AIN6, PIN_PA15B_ADC_AIN7,
+ PIN_PA10B_ADC_AIN8, PIN_PA11B_ADC_AIN9,
+ PIN_INVALID_ADC_AIN, PIN_INVALID_ADC_AIN,
+ PIN_INVALID_ADC_AIN, PIN_INVALID_ADC_AIN,
+ PIN_INVALID_ADC_AIN, PIN_INVALID_ADC_AIN,
+ PIN_INVALID_ADC_AIN, PIN_INVALID_ADC_AIN,
+ PIN_INVALID_ADC_AIN, PIN_INVALID_ADC_AIN,
+#else
+# error ADC pin mappings are not defined for this device.
+#endif
+ };
+
+ uint32_t pin_map_result = PIN_INVALID_ADC_AIN;
+
+ if (pin <= ADC_EXTCHANNEL_MSB) {
+ pin_map_result = pinmapping[pin >> ADC_INPUTCTRL_MUXPOS_Pos];
+
+ Assert(pin_map_result != PIN_INVALID_ADC_AIN);
+
+ struct system_pinmux_config config;
+ system_pinmux_get_config_defaults(&config);
+
+ /* Analog functions are all on MUX setting B */
+ config.input_pull = SYSTEM_PINMUX_PIN_PULL_NONE;
+ config.mux_position = 1;
+
+ system_pinmux_pin_set_config(pin_map_result, &config);
+ }
+}
+
+void analogin_init(analogin_t *obj, PinName pin)
+{
+ uint32_t pos_input;
+ static uint8_t init_flag = 0;
+
+ pos_input = pinmap_find_peripheral(pin, PinMap_ADC);
+ MBED_ASSERT(pos_input != NC);
+
+ adc_get_config_defaults(&(obj->config_adc));
+ obj->config_adc.positive_input = pos_input;
+ if (init_flag == 0) { // ADC init and enable to be done only once.
+ adc_init(&adc_instance, ADC, &(obj->config_adc));
+ adc_enable(&adc_instance);
+ init_flag = 1;
+ } else { // pin muxing
+ adc_configure_ain_pin(obj->config_adc.positive_input);
+ adc_configure_ain_pin(obj->config_adc.negative_input);
+ }
+}
+
+uint16_t analogin_read_u16(analogin_t *obj)
+{
+ uint16_t result;
+ adc_set_positive_input(&adc_instance, obj->config_adc.positive_input);
+ adc_set_negative_input(&adc_instance, obj->config_adc.negative_input);
+ adc_start_conversion(&adc_instance);
+ do {
+ } while(adc_read(&(adc_instance), &result) == STATUS_BUSY); // 12 bit value
+
+ return (uint16_t)((result * 65535) / 4095); // for normalizing to 16 bit value
+}
+
+float analogin_read(analogin_t *obj)
+{
+ uint16_t value = analogin_read_u16(obj);
+ return (float)value * (1.0f / (float)0xFFFF);
+}
+
--- a/targets/hal/TARGET_Atmel/TARGET_SAM21/drivers/adc/adc.h Wed Jul 15 08:15:08 2015 +0100 +++ b/targets/hal/TARGET_Atmel/TARGET_SAM21/drivers/adc/adc.h Fri Jul 17 09:15:10 2015 +0100 @@ -1,49 +1,3 @@ -/** - * \file - * - * \brief SAM Peripheral Analog-to-Digital Converter Driver - * - * Copyright (C) 2012-2014 Atmel Corporation. All rights reserved. - * - * \asf_license_start - * - * \page License - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are met: - * - * 1. Redistributions of source code must retain the above copyright notice, - * this list of conditions and the following disclaimer. - * - * 2. Redistributions in binary form must reproduce the above copyright notice, - * this list of conditions and the following disclaimer in the documentation - * and/or other materials provided with the distribution. - * - * 3. The name of Atmel may not be used to endorse or promote products derived - * from this software without specific prior written permission. - * - * 4. This software may only be redistributed and used in connection with an - * Atmel microcontroller product. - * - * THIS SOFTWARE IS PROVIDED BY ATMEL "AS IS" AND ANY EXPRESS OR IMPLIED - * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF - * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT ARE - * EXPRESSLY AND SPECIFICALLY DISCLAIMED. IN NO EVENT SHALL ATMEL BE LIABLE FOR - * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL - * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS - * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) - * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, - * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN - * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE - * POSSIBILITY OF SUCH DAMAGE. - * - * \asf_license_stop - * - */ -/** -* Support and FAQ: visit <a href="http://www.atmel.com/design-support/">Atmel Support</a> -*/ - #ifndef ADC_H_INCLUDED #define ADC_H_INCLUDED
--- a/targets/hal/TARGET_Atmel/TARGET_SAM21/drivers/adc/adc_sam_d_r/adc.c Wed Jul 15 08:15:08 2015 +0100 +++ b/targets/hal/TARGET_Atmel/TARGET_SAM21/drivers/adc/adc_sam_d_r/adc.c Fri Jul 17 09:15:10 2015 +0100 @@ -1,49 +1,3 @@ -/** - * \file - * - * \brief SAM Peripheral Analog-to-Digital Converter Driver - * - * Copyright (C) 2012-2014 Atmel Corporation. All rights reserved. - * - * \asf_license_start - * - * \page License - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are met: - * - * 1. Redistributions of source code must retain the above copyright notice, - * this list of conditions and the following disclaimer. - * - * 2. Redistributions in binary form must reproduce the above copyright notice, - * this list of conditions and the following disclaimer in the documentation - * and/or other materials provided with the distribution. - * - * 3. The name of Atmel may not be used to endorse or promote products derived - * from this software without specific prior written permission. - * - * 4. This software may only be redistributed and used in connection with an - * Atmel microcontroller product. - * - * THIS SOFTWARE IS PROVIDED BY ATMEL "AS IS" AND ANY EXPRESS OR IMPLIED - * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF - * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT ARE - * EXPRESSLY AND SPECIFICALLY DISCLAIMED. IN NO EVENT SHALL ATMEL BE LIABLE FOR - * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL - * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS - * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) - * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, - * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN - * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE - * POSSIBILITY OF SUCH DAMAGE. - * - * \asf_license_stop - * - */ -/** -* Support and FAQ: visit <a href="http://www.atmel.com/design-support/">Atmel Support</a> -*/ - #include "adc.h" #if SAMD20
--- a/targets/hal/TARGET_Atmel/TARGET_SAM21/drivers/adc/adc_sam_d_r/adc_feature.h Wed Jul 15 08:15:08 2015 +0100 +++ b/targets/hal/TARGET_Atmel/TARGET_SAM21/drivers/adc/adc_sam_d_r/adc_feature.h Fri Jul 17 09:15:10 2015 +0100 @@ -1,48 +1,3 @@ -/** - * \file - * - * \brief SAM ADC functionality - * - * Copyright (C) 2014 Atmel Corporation. All rights reserved. - * - * \asf_license_start - * - * \page License - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are met: - * - * 1. Redistributions of source code must retain the above copyright notice, - * this list of conditions and the following disclaimer. - * - * 2. Redistributions in binary form must reproduce the above copyright notice, - * this list of conditions and the following disclaimer in the documentation - * and/or other materials provided with the distribution. - * - * 3. The name of Atmel may not be used to endorse or promote products derived - * from this software without specific prior written permission. - * - * 4. This software may only be redistributed and used in connection with an - * Atmel microcontroller product. - * - * THIS SOFTWARE IS PROVIDED BY ATMEL "AS IS" AND ANY EXPRESS OR IMPLIED - * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF - * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT ARE - * EXPRESSLY AND SPECIFICALLY DISCLAIMED. IN NO EVENT SHALL ATMEL BE LIABLE FOR - * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL - * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS - * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) - * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, - * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN - * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE - * POSSIBILITY OF SUCH DAMAGE. - * - * \asf_license_stop - * - */ -/** -* Support and FAQ: visit <a href="http://www.atmel.com/design-support/">Atmel Support</a> -*/ #ifndef ADC_FEATURE_H_INCLUDED #define ADC_FEATURE_H_INCLUDED
--- a/targets/hal/TARGET_Atmel/TARGET_SAM21/drivers/dma/dma.c Wed Jul 15 08:15:08 2015 +0100 +++ b/targets/hal/TARGET_Atmel/TARGET_SAM21/drivers/dma/dma.c Fri Jul 17 09:15:10 2015 +0100 @@ -1,49 +1,3 @@ -/* - * \file - * - * \brief SAM Direct Memory Access Controller Driver - * - * Copyright (C) 2014 Atmel Corporation. All rights reserved. - * - * \asf_license_start - * - * \page License - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are met: - * - * 1. Redistributions of source code must retain the above copyright notice, - * this list of conditions and the following disclaimer. - * - * 2. Redistributions in binary form must reproduce the above copyright notice, - * this list of conditions and the following disclaimer in the documentation - * and/or other materials provided with the distribution. - * - * 3. The name of Atmel may not be used to endorse or promote products derived - * from this software without specific prior written permission. - * - * 4. This software may only be redistributed and used in connection with an - * Atmel microcontroller product. - * - * THIS SOFTWARE IS PROVIDED BY ATMEL "AS IS" AND ANY EXPRESS OR IMPLIED - * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF - * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT ARE - * EXPRESSLY AND SPECIFICALLY DISCLAIMED. IN NO EVENT SHALL ATMEL BE LIABLE FOR - * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL - * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS - * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) - * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, - * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN - * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE - * POSSIBILITY OF SUCH DAMAGE. - * - * \asf_license_stop - * - */ -/** -* Support and FAQ: visit <a href="http://www.atmel.com/design-support/">Atmel Support</a> -*/ - #include <string.h> #include "dma.h" #include "clock.h"
--- a/targets/hal/TARGET_Atmel/TARGET_SAM21/drivers/dma/dma.h Wed Jul 15 08:15:08 2015 +0100 +++ b/targets/hal/TARGET_Atmel/TARGET_SAM21/drivers/dma/dma.h Fri Jul 17 09:15:10 2015 +0100 @@ -1,48 +1,3 @@ -/** - * \file - * - * \brief SAM Direct Memory Access Controller Driver - * - * Copyright (C) 2014 Atmel Corporation. All rights reserved. - * - * \asf_license_start - * - * \page License - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are met: - * - * 1. Redistributions of source code must retain the above copyright notice, - * this list of conditions and the following disclaimer. - * - * 2. Redistributions in binary form must reproduce the above copyright notice, - * this list of conditions and the following disclaimer in the documentation - * and/or other materials provided with the distribution. - * - * 3. The name of Atmel may not be used to endorse or promote products derived - * from this software without specific prior written permission. - * - * 4. This software may only be redistributed and used in connection with an - * Atmel microcontroller product. - * - * THIS SOFTWARE IS PROVIDED BY ATMEL "AS IS" AND ANY EXPRESS OR IMPLIED - * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF - * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT ARE - * EXPRESSLY AND SPECIFICALLY DISCLAIMED. IN NO EVENT SHALL ATMEL BE LIABLE FOR - * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL - * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS - * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) - * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, - * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN - * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE - * POSSIBILITY OF SUCH DAMAGE. - * - * \asf_license_stop - * - */ -/** -* Support and FAQ: visit <a href="http://www.atmel.com/design-support/">Atmel Support</a> -*/ #ifndef DMA_H_INCLUDED #define DMA_H_INCLUDED
--- a/targets/hal/TARGET_Atmel/TARGET_SAM21/drivers/dma/dma_crc.h Wed Jul 15 08:15:08 2015 +0100 +++ b/targets/hal/TARGET_Atmel/TARGET_SAM21/drivers/dma/dma_crc.h Fri Jul 17 09:15:10 2015 +0100 @@ -1,48 +1,3 @@ -/** - * \file - * - * \brief SAM DMA cyclic redundancy check (CRC) Driver - * - * Copyright (C) 2014 Atmel Corporation. All rights reserved. - * - * \asf_license_start - * - * \page License - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are met: - * - * 1. Redistributions of source code must retain the above copyright notice, - * this list of conditions and the following disclaimer. - * - * 2. Redistributions in binary form must reproduce the above copyright notice, - * this list of conditions and the following disclaimer in the documentation - * and/or other materials provided with the distribution. - * - * 3. The name of Atmel may not be used to endorse or promote products derived - * from this software without specific prior written permission. - * - * 4. This software may only be redistributed and used in connection with an - * Atmel microcontroller product. - * - * THIS SOFTWARE IS PROVIDED BY ATMEL "AS IS" AND ANY EXPRESS OR IMPLIED - * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF - * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT ARE - * EXPRESSLY AND SPECIFICALLY DISCLAIMED. IN NO EVENT SHALL ATMEL BE LIABLE FOR - * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL - * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS - * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) - * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, - * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN - * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE - * POSSIBILITY OF SUCH DAMAGE. - * - * \asf_license_stop - * - */ -/** -* Support and FAQ: visit <a href="http://www.atmel.com/design-support/">Atmel Support</a> -*/ #ifndef DMA_CRC_H_INCLUDED #define DMA_CRC_H_INCLUDED
--- a/targets/hal/TARGET_Atmel/TARGET_SAM21/drivers/dma/quick_start/qs_dma_basic.h Wed Jul 15 08:15:08 2015 +0100 +++ b/targets/hal/TARGET_Atmel/TARGET_SAM21/drivers/dma/quick_start/qs_dma_basic.h Fri Jul 17 09:15:10 2015 +0100 @@ -1,46 +1,3 @@ -/** - * \file - * - * \brief SAM Direct Memory Access Controller(DMAC) Driver Quick Start - * - * Copyright (C) 2014 Atmel Corporation. All rights reserved. - * - * \asf_license_start - * - * \page License - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are met: - * - * 1. Redistributions of source code must retain the above copyright notice, - * this list of conditions and the following disclaimer. - * - * 2. Redistributions in binary form must reproduce the above copyright notice, - * this list of conditions and the following disclaimer in the documentation - * and/or other materials provided with the distribution. - * - * 3. The name of Atmel may not be used to endorse or promote products derived - * from this software without specific prior written permission. - * - * 4. This software may only be redistributed and used in connection with an - * Atmel microcontroller product. - * - * THIS SOFTWARE IS PROVIDED BY ATMEL "AS IS" AND ANY EXPRESS OR IMPLIED - * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF - * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT ARE - * EXPRESSLY AND SPECIFICALLY DISCLAIMED. IN NO EVENT SHALL ATMEL BE LIABLE FOR - * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL - * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS - * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) - * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, - * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN - * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE - * POSSIBILITY OF SUCH DAMAGE. - * - * \asf_license_stop - * - */ - /** * \page asfdoc_sam0_dma_basic_use_case Quick Start Guide for Memory to Memory Data Transfer Using DMAC *
--- a/targets/hal/TARGET_Atmel/TARGET_SAM21/drivers/extint/extint.h Wed Jul 15 08:15:08 2015 +0100 +++ b/targets/hal/TARGET_Atmel/TARGET_SAM21/drivers/extint/extint.h Fri Jul 17 09:15:10 2015 +0100 @@ -1,48 +1,3 @@ -/** - * \file - * - * \brief SAM External Interrupt Driver - * - * Copyright (C) 2012-2014 Atmel Corporation. All rights reserved. - * - * \asf_license_start - * - * \page License - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are met: - * - * 1. Redistributions of source code must retain the above copyright notice, - * this list of conditions and the following disclaimer. - * - * 2. Redistributions in binary form must reproduce the above copyright notice, - * this list of conditions and the following disclaimer in the documentation - * and/or other materials provided with the distribution. - * - * 3. The name of Atmel may not be used to endorse or promote products derived - * from this software without specific prior written permission. - * - * 4. This software may only be redistributed and used in connection with an - * Atmel microcontroller product. - * - * THIS SOFTWARE IS PROVIDED BY ATMEL "AS IS" AND ANY EXPRESS OR IMPLIED - * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF - * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT ARE - * EXPRESSLY AND SPECIFICALLY DISCLAIMED. IN NO EVENT SHALL ATMEL BE LIABLE FOR - * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL - * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS - * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) - * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, - * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN - * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE - * POSSIBILITY OF SUCH DAMAGE. - * - * \asf_license_stop - * - */ -/** -* Support and FAQ: visit <a href="http://www.atmel.com/design-support/">Atmel Support</a> -*/ #ifndef EXTINT_H_INCLUDED #define EXTINT_H_INCLUDED
--- a/targets/hal/TARGET_Atmel/TARGET_SAM21/drivers/extint/extint_callback.c Wed Jul 15 08:15:08 2015 +0100 +++ b/targets/hal/TARGET_Atmel/TARGET_SAM21/drivers/extint/extint_callback.c Fri Jul 17 09:15:10 2015 +0100 @@ -1,48 +1,3 @@ -/** - * \file - * - * \brief SAM External Interrupt Driver - * - * Copyright (C) 2012-2014 Atmel Corporation. All rights reserved. - * - * \asf_license_start - * - * \page License - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are met: - * - * 1. Redistributions of source code must retain the above copyright notice, - * this list of conditions and the following disclaimer. - * - * 2. Redistributions in binary form must reproduce the above copyright notice, - * this list of conditions and the following disclaimer in the documentation - * and/or other materials provided with the distribution. - * - * 3. The name of Atmel may not be used to endorse or promote products derived - * from this software without specific prior written permission. - * - * 4. This software may only be redistributed and used in connection with an - * Atmel microcontroller product. - * - * THIS SOFTWARE IS PROVIDED BY ATMEL "AS IS" AND ANY EXPRESS OR IMPLIED - * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF - * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT ARE - * EXPRESSLY AND SPECIFICALLY DISCLAIMED. IN NO EVENT SHALL ATMEL BE LIABLE FOR - * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL - * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS - * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) - * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, - * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN - * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE - * POSSIBILITY OF SUCH DAMAGE. - * - * \asf_license_stop - * - */ -/** -* Support and FAQ: visit <a href="http://www.atmel.com/design-support/">Atmel Support</a> -*/ #include "extint.h" #include "extint_callback.h"
--- a/targets/hal/TARGET_Atmel/TARGET_SAM21/drivers/extint/extint_callback.h Wed Jul 15 08:15:08 2015 +0100 +++ b/targets/hal/TARGET_Atmel/TARGET_SAM21/drivers/extint/extint_callback.h Fri Jul 17 09:15:10 2015 +0100 @@ -1,48 +1,3 @@ -/** - * \file - * - * \brief SAM External Interrupt Driver - * - * Copyright (C) 2012-2014 Atmel Corporation. All rights reserved. - * - * \asf_license_start - * - * \page License - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are met: - * - * 1. Redistributions of source code must retain the above copyright notice, - * this list of conditions and the following disclaimer. - * - * 2. Redistributions in binary form must reproduce the above copyright notice, - * this list of conditions and the following disclaimer in the documentation - * and/or other materials provided with the distribution. - * - * 3. The name of Atmel may not be used to endorse or promote products derived - * from this software without specific prior written permission. - * - * 4. This software may only be redistributed and used in connection with an - * Atmel microcontroller product. - * - * THIS SOFTWARE IS PROVIDED BY ATMEL "AS IS" AND ANY EXPRESS OR IMPLIED - * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF - * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT ARE - * EXPRESSLY AND SPECIFICALLY DISCLAIMED. IN NO EVENT SHALL ATMEL BE LIABLE FOR - * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL - * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS - * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) - * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, - * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN - * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE - * POSSIBILITY OF SUCH DAMAGE. - * - * \asf_license_stop - * - */ -/** -* Support and FAQ: visit <a href="http://www.atmel.com/design-support/">Atmel Support</a> -*/ #ifndef EXTINT_CALLBACK_H_INCLUDED #define EXTINT_CALLBACK_H_INCLUDED
--- a/targets/hal/TARGET_Atmel/TARGET_SAM21/drivers/extint/extint_sam_d_r/extint.c Wed Jul 15 08:15:08 2015 +0100 +++ b/targets/hal/TARGET_Atmel/TARGET_SAM21/drivers/extint/extint_sam_d_r/extint.c Fri Jul 17 09:15:10 2015 +0100 @@ -1,48 +1,3 @@ -/** - * \file - * - * \brief SAM External Interrupt Driver - * - * Copyright (C) 2012-2014 Atmel Corporation. All rights reserved. - * - * \asf_license_start - * - * \page License - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are met: - * - * 1. Redistributions of source code must retain the above copyright notice, - * this list of conditions and the following disclaimer. - * - * 2. Redistributions in binary form must reproduce the above copyright notice, - * this list of conditions and the following disclaimer in the documentation - * and/or other materials provided with the distribution. - * - * 3. The name of Atmel may not be used to endorse or promote products derived - * from this software without specific prior written permission. - * - * 4. This software may only be redistributed and used in connection with an - * Atmel microcontroller product. - * - * THIS SOFTWARE IS PROVIDED BY ATMEL "AS IS" AND ANY EXPRESS OR IMPLIED - * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF - * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT ARE - * EXPRESSLY AND SPECIFICALLY DISCLAIMED. IN NO EVENT SHALL ATMEL BE LIABLE FOR - * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL - * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS - * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) - * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, - * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN - * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE - * POSSIBILITY OF SUCH DAMAGE. - * - * \asf_license_stop - * - */ -/** -* Support and FAQ: visit <a href="http://www.atmel.com/design-support/">Atmel Support</a> -*/ #include <system.h> #include <system_interrupt.h> #include <extint.h>
--- a/targets/hal/TARGET_Atmel/TARGET_SAM21/drivers/port/port.c Wed Jul 15 08:15:08 2015 +0100 +++ b/targets/hal/TARGET_Atmel/TARGET_SAM21/drivers/port/port.c Fri Jul 17 09:15:10 2015 +0100 @@ -1,48 +1,3 @@ -/** - * \file - * - * \brief SAM GPIO Port Driver - * - * Copyright (C) 2012-2014 Atmel Corporation. All rights reserved. - * - * \asf_license_start - * - * \page License - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are met: - * - * 1. Redistributions of source code must retain the above copyright notice, - * this list of conditions and the following disclaimer. - * - * 2. Redistributions in binary form must reproduce the above copyright notice, - * this list of conditions and the following disclaimer in the documentation - * and/or other materials provided with the distribution. - * - * 3. The name of Atmel may not be used to endorse or promote products derived - * from this software without specific prior written permission. - * - * 4. This software may only be redistributed and used in connection with an - * Atmel microcontroller product. - * - * THIS SOFTWARE IS PROVIDED BY ATMEL "AS IS" AND ANY EXPRESS OR IMPLIED - * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF - * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT ARE - * EXPRESSLY AND SPECIFICALLY DISCLAIMED. IN NO EVENT SHALL ATMEL BE LIABLE FOR - * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL - * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS - * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) - * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, - * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN - * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE - * POSSIBILITY OF SUCH DAMAGE. - * - * \asf_license_stop - * - */ -/** -* Support and FAQ: visit <a href="http://www.atmel.com/design-support/">Atmel Support</a> -*/ #include <port.h> /**
--- a/targets/hal/TARGET_Atmel/TARGET_SAM21/drivers/port/port.h Wed Jul 15 08:15:08 2015 +0100 +++ b/targets/hal/TARGET_Atmel/TARGET_SAM21/drivers/port/port.h Fri Jul 17 09:15:10 2015 +0100 @@ -1,48 +1,3 @@ -/** - * \file - * - * \brief SAM GPIO Port Driver - * - * Copyright (C) 2012-2014 Atmel Corporation. All rights reserved. - * - * \asf_license_start - * - * \page License - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are met: - * - * 1. Redistributions of source code must retain the above copyright notice, - * this list of conditions and the following disclaimer. - * - * 2. Redistributions in binary form must reproduce the above copyright notice, - * this list of conditions and the following disclaimer in the documentation - * and/or other materials provided with the distribution. - * - * 3. The name of Atmel may not be used to endorse or promote products derived - * from this software without specific prior written permission. - * - * 4. This software may only be redistributed and used in connection with an - * Atmel microcontroller product. - * - * THIS SOFTWARE IS PROVIDED BY ATMEL "AS IS" AND ANY EXPRESS OR IMPLIED - * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF - * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT ARE - * EXPRESSLY AND SPECIFICALLY DISCLAIMED. IN NO EVENT SHALL ATMEL BE LIABLE FOR - * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL - * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS - * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) - * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, - * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN - * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE - * POSSIBILITY OF SUCH DAMAGE. - * - * \asf_license_stop - * - */ -/** -* Support and FAQ: visit <a href="http://www.atmel.com/design-support/">Atmel Support</a> -*/ #ifndef PORT_H_INCLUDED #define PORT_H_INCLUDED
--- a/targets/hal/TARGET_Atmel/TARGET_SAM21/drivers/port/quick_start/qs_port_basic.h Wed Jul 15 08:15:08 2015 +0100 +++ b/targets/hal/TARGET_Atmel/TARGET_SAM21/drivers/port/quick_start/qs_port_basic.h Fri Jul 17 09:15:10 2015 +0100 @@ -1,46 +1,3 @@ -/** - * \file - * - * \brief SAM GPIO Port Driver Quick Start - * - * Copyright (C) 2012-2014 Atmel Corporation. All rights reserved. - * - * \asf_license_start - * - * \page License - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are met: - * - * 1. Redistributions of source code must retain the above copyright notice, - * this list of conditions and the following disclaimer. - * - * 2. Redistributions in binary form must reproduce the above copyright notice, - * this list of conditions and the following disclaimer in the documentation - * and/or other materials provided with the distribution. - * - * 3. The name of Atmel may not be used to endorse or promote products derived - * from this software without specific prior written permission. - * - * 4. This software may only be redistributed and used in connection with an - * Atmel microcontroller product. - * - * THIS SOFTWARE IS PROVIDED BY ATMEL "AS IS" AND ANY EXPRESS OR IMPLIED - * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF - * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT ARE - * EXPRESSLY AND SPECIFICALLY DISCLAIMED. IN NO EVENT SHALL ATMEL BE LIABLE FOR - * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL - * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS - * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) - * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, - * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN - * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE - * POSSIBILITY OF SUCH DAMAGE. - * - * \asf_license_stop - * - */ - /** * \page asfdoc_sam0_port_basic_use_case Quick Start Guide for PORT - Basic *
--- a/targets/hal/TARGET_Atmel/TARGET_SAM21/drivers/rtc/rtc_calendar.h Wed Jul 15 08:15:08 2015 +0100
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,1254 +0,0 @@
-/**
- * \file
- *
- * \brief SAM RTC Driver (Calendar Mode)
- *
- * Copyright (C) 2012-2014 Atmel Corporation. All rights reserved.
- *
- * \asf_license_start
- *
- * \page License
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- *
- * 1. Redistributions of source code must retain the above copyright notice,
- * this list of conditions and the following disclaimer.
- *
- * 2. Redistributions in binary form must reproduce the above copyright notice,
- * this list of conditions and the following disclaimer in the documentation
- * and/or other materials provided with the distribution.
- *
- * 3. The name of Atmel may not be used to endorse or promote products derived
- * from this software without specific prior written permission.
- *
- * 4. This software may only be redistributed and used in connection with an
- * Atmel microcontroller product.
- *
- * THIS SOFTWARE IS PROVIDED BY ATMEL "AS IS" AND ANY EXPRESS OR IMPLIED
- * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
- * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT ARE
- * EXPRESSLY AND SPECIFICALLY DISCLAIMED. IN NO EVENT SHALL ATMEL BE LIABLE FOR
- * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
- * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
- * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- * POSSIBILITY OF SUCH DAMAGE.
- *
- * \asf_license_stop
- *
- */
-/**
-* Support and FAQ: visit <a href="http://www.atmel.com/design-support/">Atmel Support</a>
-*/
-#ifndef RTC_CALENDAR_H_INCLUDED
-#define RTC_CALENDAR_H_INCLUDED
-
-/**
- * \defgroup asfdoc_sam0_rtc_calendar_group SAM RTC Calendar Driver (RTC CAL)
- *
- * This driver for Atmel庐 | SMART SAM devices provides an interface for the configuration
- * and management of the device's Real Time Clock functionality in Calendar
- * operating mode, for the configuration and retrieval of the current time and
- * date as maintained by the RTC module. The following driver API modes are
- * covered by this manual:
- *
- * - Polled APIs
- * \if RTC_CALENDAR_CALLBACK_MODE
- * - Callback APIs
- * \endif
- *
- * The following peripherals are used by this module:
- * - RTC (Real Time Clock)
- *
- * The following devices can use this module:
- * - Atmel | SMART SAM D20/D21
- * - Atmel | SMART SAM R21
- * - Atmel | SMART SAM D10/D11
- * - Atmel | SMART SAM L21
- *
- * The outline of this documentation is as follows:
- * - \ref asfdoc_sam0_rtc_calendar_prerequisites
- * - \ref asfdoc_sam0_rtc_calendar_module_overview
- * - \ref asfdoc_sam0_rtc_calendar_special_considerations
- * - \ref asfdoc_sam0_rtc_calendar_extra_info
- * - \ref asfdoc_sam0_rtc_calendar_examples
- * - \ref asfdoc_sam0_rtc_calendar_api_overview
- *
- *
- * \section asfdoc_sam0_rtc_calendar_prerequisites Prerequisites
- *
- * There are no prerequisites for this module.
- *
- *
- * \section asfdoc_sam0_rtc_calendar_module_overview Module Overview
- *
- * The RTC module in the SAM devices is a 32-bit counter, with a 10-bit
- * programmable prescaler. Typically, the RTC clock is run continuously,
- * including in the device's low-power sleep modes, to track the current time
- * and date information. The RTC can be used as a source to wake up the system
- * at a scheduled time or periodically using the alarm functions.
- *
- * In this driver, the RTC is operated in Calendar mode. This allows for an
- * easy integration of a real time clock and calendar into a user application
- * to track the passing of time and/or perform scheduled tasks.
- *
- * Whilst operating in Calendar mode, the RTC features:
- * - Time tracking in seconds, minutes, and hours
- * - 12 or 24 hour mode
- * - Date tracking in day, month, and year
- * - Automatic leap year correction
- *
- * \subsection asfdoc_sam0_rtc_calendar_features Driver Feature Macro Definition
- * <table>
- * <tr>
- * <th>Driver Feature Macro</th>
- * <th>Supported devices</th>
- * </tr>
- * <tr>
- * <td>FEATURE_RTC_PERIODIC_INT</td>
- * <td>SAML21</td>
- * </tr>
- * <tr>
- * <td>FEATURE_RTC_PRESCALER_OFF</td>
- * <td>SAML21</td>
- * </tr>
- * <tr>
- * <td>FEATURE_RTC_CLOCK_SELECTION</td>
- * <td>SAML21</td>
- * </tr>
- * <tr>
- * <td>FEATURE_RTC_GENERAL_PURPOSE_REG</td>
- * <td>SAML21</td>
- * </tr>
- * <tr>
- * <td>FEATURE_RTC_CONTINUOUSLY_UPDATED</td>
- * <td>SAMD20, SAMD21, SAMR21, SAMD10, SAMD11</td>
- * </tr>
- * </table>
- * \note The specific features are only available in the driver when the
- * selected device supports those features.
- *
- * \subsection asfdoc_sam0_rtc_calendar_module_overview_alarms Alarms and Overflow
- * The RTC has four independent hardware alarms that can be configured by the user
- * application. These alarms will be will triggered on match with the current
- * clock value, and can be set up to trigger an interrupt, event, or both. The
- * RTC can also be configured to clear the clock value on alarm match, resetting
- * the clock to the original start time.
- *
- * If the RTC is operated in clock-only mode (i.e. with calendar disabled), the
- * RTC counter value will instead be cleared on overflow once the maximum count
- * value has been reached:
- *
- * \f[ COUNT_{MAX} = 2^{32}-1 \f]
- *
- * When the RTC is operated with the calendar enabled and run using a nominal
- * 1Hz input clock frequency, a register overflow will occur after 64 years.
- *
- * \subsection asfdoc_sam0_rtc_calendar_module_overview_periodic Periodic Events
- * The RTC can generate events at periodic intervals, allowing for direct
- * peripheral actions without CPU intervention. The periodic events can be
- * generated on the upper eight bits of the RTC prescaler, and will be generated on
- * the rising edge transition of the specified bit. The resulting periodic
- * frequency can be calculated by the following formula:
- *
- * \f[ f_{PERIODIC}=\frac{f_{ASY}}{2^{n+3}} \f]
- *
- * Where \f$f_{ASY}\f$ refers to the \e asynchronous clock set up in the RTC
- * module configuration. For the RTC to operate correctly in calendar mode, this
- * frequency must be 1KHz, while the RTC's internal prescaler should be set to
- * divide by 1024. The \b n parameter is the event source generator index of the
- * RTC module. If the asynchronous clock is operated at the recommended 1KHz,
- * the formula results in the values shown in
- * \ref asfdoc_sam0_rtc_calendar_module_rtc_hz "the table below".
- *
- * \anchor asfdoc_sam0_rtc_calendar_module_rtc_hz
- * <table>
- * <caption>RTC Event Frequencies for Each Prescaler Bit Using a 1KHz Clock</caption>
- * <tr>
- * <th>n</th> <th>Periodic event</th>
- * </tr>
- * <tr>
- * <td>7</td> <td>1Hz</td>
- * </tr>
- * <tr>
- * <td>6</td> <td>2Hz</td>
- * </tr>
- * <tr>
- * <td>5</td> <td>4Hz</td>
- * </tr>
- * <tr>
- * <td>4</td> <td>8Hz</td>
- * </tr>
- * <tr>
- * <td>3</td> <td>16Hz</td>
- * </tr>
- * <tr>
- * <td>2</td> <td>32Hz</td>
- * </tr>
- * <tr>
- * <td>1</td> <td>64Hz</td>
- * </tr>
- * <tr>
- * <td>0</td> <td>128Hz</td>
- * </tr>
- * </table>
- *
- * \note The connection of events between modules requires the use of the
- * \ref asfdoc_sam0_events_group "SAM Event System Driver (EVENTS)"
- * to route output event of one module to the the input event of another.
- * For more information on event routing, refer to the event driver
- * documentation.
- *
- * \subsection asfdoc_sam0_rtc_calendar_module_overview_correction Digital Frequency Correction
- * The RTC module contains Digital Frequency Correction logic to compensate for
- * inaccurate source clock frequencies which would otherwise result in skewed
- * time measurements. The correction scheme requires that at least two bits
- * in the RTC module prescaler are reserved by the correction logic. As a
- * result of this implementation, frequency correction is only available when
- * the RTC is running from a 1Hz reference clock.
- *
- * The correction procedure is implemented by subtracting or adding a single
- * cycle from the RTC prescaler every 1024 RTC GCLK cycles. The adjustment is
- * applied the specified number of time (maximum 127) over 976 of these periods. The
- * corresponding correction in PPM will be given by:
- *
- * \f[ Correction(PPM) = \frac{VALUE}{999424}10^6 \f]
- *
- * The RTC clock will tick faster if provided with a positive correction value,
- * and slower when given a negative correction value.
- *
- *
- * \section asfdoc_sam0_rtc_calendar_special_considerations Special Considerations
- *
- * \subsection asfdoc_sam0_rtc_calendar_special_considerations_year Year Limit
- * The RTC module has a year range of 63 years from the starting year configured
- * when the module is initialized. Dates outside the start to end year range
- * described below will need software adjustment:
- *
- * \f[ [YEAR_{START}, YEAR_{START}+64) \f]
- *
- * \subsection asfdoc_sam0_rtc_calendar_special_considerations_clock Clock Setup
- * \subsubsection asfdoc_sam0_rtc_calendar_clock_samd_r SAM D20/D21/R21/D10/D11 Clock Setup
- * The RTC is typically clocked by a specialized GCLK generator that has a
- * smaller prescaler than the others. By default the RTC clock is on, selected
- * to use the internal 32KHz RC-oscillator with a prescaler of 32, giving a
- * resulting clock frequency of 1024Hz to the RTC. When the internal RTC
- * prescaler is set to 1024, this yields an end-frequency of 1Hz for correct
- * time keeping operations.
- *
- * The implementer also has the option to set other end-frequencies.
- * \ref asfdoc_sam0_rtc_calendar_rtc_out_freq "The table below" lists the
- * available RTC frequencies for each possible GCLK and RTC input prescaler
- * options.
- *
- * \anchor asfdoc_sam0_rtc_calendar_rtc_out_freq
- * <table>
- * <caption>RTC Output Frequencies from Allowable Input Clocks</caption>
- * <tr>
- * <th>End-frequency</th>
- * <th>GCLK prescaler</th>
- * <th>RTC prescaler</th>
- * </tr>
- * <tr>
- * <td>32KHz</td>
- * <td>1</td>
- * <td>1</td>
- * </tr>
- * <tr>
- * <td>1KHz</td>
- * <td>32</td>
- * <td>1</td>
- * </tr>
- * <tr>
- * <td>1Hz</td>
- * <td>32</td>
- * <td>1024</td>
- * </tr>
- * </table>
- *
- * The overall RTC module clocking scheme is shown in
- * \ref asfdoc_sam0_rtc_calendar_rtc_clock_fig "the figure below".
- *
- * \anchor asfdoc_sam0_rtc_calendar_rtc_clock_fig
- * \dot
- * digraph clocking_scheme {
- * rankdir=LR;
- * GCLK [shape="record", label="<f0> GCLK | <f1> RTC_GCLK",
- * bgcolor="lightgray", style="filled"];
- * RTCPRE [shape="record" label="<f0> RTC | <f1> RTC PRESCALER"];
- * RTC [shape="record", label="<f0> RTC | <f1> RTC CLOCK"];
- *
- * GCLK:f1 -> RTCPRE:f1;
- * RTCPRE:f1 -> RTC:f1;
- * }
- * \enddot
- *
- * \note For the calendar to operate correctly, an asynchronous clock of 1Hz
- * should be used.
- *
- * \subsubsection asfdoc_sam0_rtc_calendar_clock_saml SAM L21 Clock Setup
- * The RTC clock can be selected from OSC32K,XOSC32K or OSCULP32K , and a 32KHz
- * or 1KHz oscillator clock frequency is required. This clock must be
- * configured and enabled in the 32KHz oscillator controller before using the RTC.
- *
- * The table below lists the available RTC clock \ref asfdoc_sam0_rtc_calendar_rtc_clk
- *
- * \anchor asfdoc_sam0_rtc_calendar_rtc_clk
- * <table>
- * <caption>RTC clocks source</caption>
- * <tr>
- * <th>RTC clock frequency</th>
- * <th>Clock source</th>
- * <th>Description</th>
- * </tr>
- * <tr>
- * <td>1.024KHz</td>
- * <td>ULP1K</td>
- * <td>1.024KHz from 32KHz internal ULP oscillator</td>
- * </tr>
- * <tr>
- * <td>32.768KHz</td>
- * <td>ULP32K</td>
- * <td>32.768KHz from 32KHz internal ULP oscillator</td>
- * </tr>
- * <tr>
- * <td>1.024KHz</td>
- * <td>OSC1K</td>
- * <td>1.024KHz from 32KHz internal oscillator</td>
- * </tr>
- * <tr>
- * <td>32.768KHz</td>
- * <td>OSC32K</td>
- * <td>32.768KHz from 32KHz internal oscillator</td>
- * </tr>
- * <tr>
- * <td>1.024KHz</td>
- * <td>XOSC1K</td>
- * <td>1.024KHz from 32KHz internal oscillator</td>
- * </tr>
- * <tr>
- * <td>32.768KHz</td>
- * <td>XOSC32K</td>
- * <td>32.768KHz from 32KHz external crystal oscillator</td>
- * </tr>
- * </table>
- *
- * \note For the calendar to operate correctly, an asynchronous clock of 1Hz
- * should be used.
- *
- * \section asfdoc_sam0_rtc_calendar_extra_info Extra Information
- *
- * For extra information, see \ref asfdoc_sam0_rtc_calendar_extra. This includes:
- * - \ref asfdoc_sam0_rtc_calendar_extra_acronyms
- * - \ref asfdoc_sam0_rtc_calendar_extra_dependencies
- * - \ref asfdoc_sam0_rtc_calendar_extra_errata
- * - \ref asfdoc_sam0_rtc_calendar_extra_history
- *
- *
- * \section asfdoc_sam0_rtc_calendar_examples Examples
- *
- * For a list of examples related to this driver, see
- * \ref asfdoc_sam0_rtc_calendar_exqsg.
- *
- *
- * \section asfdoc_sam0_rtc_calendar_api_overview API Overview
- * @{
- */
-
-#include <conf_clocks.h>
-
-#if RTC_CALENDAR_ASYNC == true
-# include <system_interrupt.h>
-#endif
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-/**
- * Define port features set according to different device family
- * @{
-*/
-#if (SAML21) || defined(__DOXYGEN__)
-/** RTC periodic interval interrupt. */
-# define FEATURE_RTC_PERIODIC_INT
-/** RTC prescaler is off. */
-# define FEATURE_RTC_PRESCALER_OFF
-/** RTC clock selection. */
-# define FEATURE_RTC_CLOCK_SELECTION
-/** General purpose registers. */
-# define FEATURE_RTC_GENERAL_PURPOSE_REG
-#else
-/** RTC continuously updated. */
-# define FEATURE_RTC_CONTINUOUSLY_UPDATED
-#endif
-/*@}*/
-
-#ifdef FEATURE_RTC_CLOCK_SELECTION
-/**
- * \brief Available clock source for RTC.
- * RTC clock source.
- */
-enum rtc_clock_sel {
- /** 1.024KHz from 32KHz internal ULP oscillator. */
- RTC_CLOCK_SELECTION_ULP1K = OSC32KCTRL_RTCCTRL_RTCSEL_ULP1K_Val,
- /** 32.768KHz from 32KHz internal ULP oscillator. */
- RTC_CLOCK_SELECTION_ULP32K = OSC32KCTRL_RTCCTRL_RTCSEL_ULP32K_Val,
- /** 1.024KHz from 32KHz internal oscillator. */
- RTC_CLOCK_SELECTION_OSC1K = OSC32KCTRL_RTCCTRL_RTCSEL_OSC1K_Val,
- /** 32.768KHz from 32KHz internal oscillator. */
- RTC_CLOCK_SELECTION_OSC32K = OSC32KCTRL_RTCCTRL_RTCSEL_OSC32K_Val,
- /** 1.024KHz from 32KHz internal oscillator. */
- RTC_CLOCK_SELECTION_XOSC1K = OSC32KCTRL_RTCCTRL_RTCSEL_XOSC1K_Val,
- /** 32.768KHz from 32.768KHz external crystal oscillator. */
- RTC_CLOCK_SELECTION_XOSC32K = OSC32KCTRL_RTCCTRL_RTCSEL_XOSC32K_Val,
-};
-#endif
-
-#if !defined (RTC_NUM_OF_ALARMS) && defined(RTC_ALARM_NUM)
-#define RTC_NUM_OF_ALARMS RTC_ALARM_NUM
-#endif
-
-/**
- * \brief Available alarm channels.
- *
- * Available alarm channels.
- *
- * \note Not all alarm channels are available on all devices.
- */
-enum rtc_calendar_alarm {
- /** Alarm channel 0. */
- RTC_CALENDAR_ALARM_0 = 0,
-#if (RTC_NUM_OF_ALARMS > 1) || defined(__DOXYGEN__)
- /** Alarm channel 1. */
- RTC_CALENDAR_ALARM_1 = 1,
-#endif
-#if (RTC_NUM_OF_ALARMS > 2) || defined(__DOXYGEN__)
- /** Alarm channel 2. */
- RTC_CALENDAR_ALARM_2 = 2,
-#endif
-#if (RTC_NUM_OF_ALARMS > 3) || defined(__DOXYGEN__)
- /** Alarm channel 3. */
- RTC_CALENDAR_ALARM_3 = 3,
-#endif
-};
-
-#if RTC_CALENDAR_ASYNC == true
-#ifdef FEATURE_RTC_PERIODIC_INT
-/**
- * \brief Callback types.
- *
- * The available callback types for the RTC calendar module.
- */
-enum rtc_calendar_callback {
- /** Callback for Periodic Interval 0 Interrupt. */
- RTC_CALENDAR_CALLBACK_PERIODIC_INTERVAL_0 = 0,
- /** Callback for Periodic Interval 1 Interrupt. */
- RTC_CALENDAR_CALLBACK_PERIODIC_INTERVAL_1,
- /** Callback for Periodic Interval 2 Interrupt. */
- RTC_CALENDAR_CALLBACK_PERIODIC_INTERVAL_2,
- /** Callback for Periodic Interval 3 Interrupt. */
- RTC_CALENDAR_CALLBACK_PERIODIC_INTERVAL_3,
- /** Callback for Periodic Interval 4 Interrupt. */
- RTC_CALENDAR_CALLBACK_PERIODIC_INTERVAL_4,
- /** Callback for Periodic Interval 5 Interrupt. */
- RTC_CALENDAR_CALLBACK_PERIODIC_INTERVAL_5,
- /** Callback for Periodic Interval 6 Interrupt. */
- RTC_CALENDAR_CALLBACK_PERIODIC_INTERVAL_6,
- /** Callback for Periodic Interval 7 Interrupt. */
- RTC_CALENDAR_CALLBACK_PERIODIC_INTERVAL_7,
- /** Callback for alarm 0. */
- RTC_CALENDAR_CALLBACK_ALARM_0,
-# if (RTC_NUM_OF_ALARMS > 1) || defined(__DOXYGEN__)
- /** Callback for alarm 1. */
- RTC_CALENDAR_CALLBACK_ALARM_1,
-# endif
-# if (RTC_NUM_OF_ALARMS > 2) || defined(__DOXYGEN__)
- /** Callback for alarm 2. */
- RTC_CALENDAR_CALLBACK_ALARM_2,
-# endif
-# if (RTC_NUM_OF_ALARMS > 3) || defined(__DOXYGEN__)
- /** Callback for alarm 3. */
- RTC_CALENDAR_CALLBACK_ALARM_3,
-# endif
- /** Callback for overflow. */
- RTC_CALENDAR_CALLBACK_OVERFLOW,
-# if !defined(__DOXYGEN__)
- /** Total number of callbacks. */
- _RTC_CALENDAR_CALLBACK_N
-# endif
-};
-#else
-/**
- * \brief Callback types.
- *
- * The available callback types for the RTC calendar module.
- */
-enum rtc_calendar_callback {
- /** Callback for alarm 0. */
- RTC_CALENDAR_CALLBACK_ALARM_0 = 0,
-# if (RTC_NUM_OF_ALARMS > 1) || defined(__DOXYGEN__)
- /** Callback for alarm 1. */
- RTC_CALENDAR_CALLBACK_ALARM_1,
-# endif
-# if (RTC_NUM_OF_ALARMS > 2) || defined(__DOXYGEN__)
- /** Callback for alarm 2. */
- RTC_CALENDAR_CALLBACK_ALARM_2,
-# endif
-# if (RTC_NUM_OF_ALARMS > 3) || defined(__DOXYGEN__)
- /** Callback for alarm 3. */
- RTC_CALENDAR_CALLBACK_ALARM_3,
-# endif
- /** Callback for overflow. */
- RTC_CALENDAR_CALLBACK_OVERFLOW,
-# if !defined(__DOXYGEN__)
- /** Total number of callbacks. */
- _RTC_CALENDAR_CALLBACK_N
-# endif
-};
-#endif
-
-# if !defined(__DOXYGEN__)
-typedef void (*rtc_calendar_callback_t)(void);
-# endif
-#endif
-
-#ifdef FEATURE_RTC_PRESCALER_OFF
-/**
- * \brief RTC input clock prescaler settings.
- *
- * The available input clock prescaler values for the RTC calendar module.
- */
-enum rtc_calendar_prescaler {
- /** RTC prescaler is off, and the input clock frequency is
- prescaled by a factor of 1. */
- RTC_CALENDAR_PRESCALER_OFF = RTC_MODE2_CTRLA_PRESCALER_OFF,
- /** RTC input clock frequency is prescaled by a factor of 1. */
- RTC_CALENDAR_PRESCALER_DIV_1 = RTC_MODE2_CTRLA_PRESCALER_DIV1,
- /** RTC input clock frequency is prescaled by a factor of 2. */
- RTC_CALENDAR_PRESCALER_DIV_2 = RTC_MODE2_CTRLA_PRESCALER_DIV2,
- /** RTC input clock frequency is prescaled by a factor of 4. */
- RTC_CALENDAR_PRESCALER_DIV_4 = RTC_MODE2_CTRLA_PRESCALER_DIV4,
- /** RTC input clock frequency is prescaled by a factor of 8. */
- RTC_CALENDAR_PRESCALER_DIV_8 = RTC_MODE2_CTRLA_PRESCALER_DIV8,
- /** RTC input clock frequency is prescaled by a factor of 16. */
- RTC_CALENDAR_PRESCALER_DIV_16 = RTC_MODE2_CTRLA_PRESCALER_DIV16,
- /** RTC input clock frequency is prescaled by a factor of 32. */
- RTC_CALENDAR_PRESCALER_DIV_32 = RTC_MODE2_CTRLA_PRESCALER_DIV32,
- /** RTC input clock frequency is prescaled by a factor of 64. */
- RTC_CALENDAR_PRESCALER_DIV_64 = RTC_MODE2_CTRLA_PRESCALER_DIV64,
- /** RTC input clock frequency is prescaled by a factor of 128. */
- RTC_CALENDAR_PRESCALER_DIV_128 = RTC_MODE2_CTRLA_PRESCALER_DIV128,
- /** RTC input clock frequency is prescaled by a factor of 256. */
- RTC_CALENDAR_PRESCALER_DIV_256 = RTC_MODE2_CTRLA_PRESCALER_DIV256,
- /** RTC input clock frequency is prescaled by a factor of 512. */
- RTC_CALENDAR_PRESCALER_DIV_512 = RTC_MODE2_CTRLA_PRESCALER_DIV512,
- /** RTC input clock frequency is prescaled by a factor of 1024. */
- RTC_CALENDAR_PRESCALER_DIV_1024 = RTC_MODE2_CTRLA_PRESCALER_DIV1024,
-};
-
-#else
-/**
- * \brief RTC input clock prescaler settings.
- *
- * The available input clock prescaler values for the RTC calendar module.
- */
-enum rtc_calendar_prescaler {
- /** RTC input clock frequency is prescaled by a factor of 1. */
- RTC_CALENDAR_PRESCALER_DIV_1 = RTC_MODE2_CTRL_PRESCALER_DIV1,
- /** RTC input clock frequency is prescaled by a factor of 2. */
- RTC_CALENDAR_PRESCALER_DIV_2 = RTC_MODE2_CTRL_PRESCALER_DIV2,
- /** RTC input clock frequency is prescaled by a factor of 4. */
- RTC_CALENDAR_PRESCALER_DIV_4 = RTC_MODE2_CTRL_PRESCALER_DIV4,
- /** RTC input clock frequency is prescaled by a factor of 8. */
- RTC_CALENDAR_PRESCALER_DIV_8 = RTC_MODE2_CTRL_PRESCALER_DIV8,
- /** RTC input clock frequency is prescaled by a factor of 16. */
- RTC_CALENDAR_PRESCALER_DIV_16 = RTC_MODE2_CTRL_PRESCALER_DIV16,
- /** RTC input clock frequency is prescaled by a factor of 32. */
- RTC_CALENDAR_PRESCALER_DIV_32 = RTC_MODE2_CTRL_PRESCALER_DIV32,
- /** RTC input clock frequency is prescaled by a factor of 64. */
- RTC_CALENDAR_PRESCALER_DIV_64 = RTC_MODE2_CTRL_PRESCALER_DIV64,
- /** RTC input clock frequency is prescaled by a factor of 128. */
- RTC_CALENDAR_PRESCALER_DIV_128 = RTC_MODE2_CTRL_PRESCALER_DIV128,
- /** RTC input clock frequency is prescaled by a factor of 256. */
- RTC_CALENDAR_PRESCALER_DIV_256 = RTC_MODE2_CTRL_PRESCALER_DIV256,
- /** RTC input clock frequency is prescaled by a factor of 512. */
- RTC_CALENDAR_PRESCALER_DIV_512 = RTC_MODE2_CTRL_PRESCALER_DIV512,
- /** RTC input clock frequency is prescaled by a factor of 1024. */
- RTC_CALENDAR_PRESCALER_DIV_1024 = RTC_MODE2_CTRL_PRESCALER_DIV1024,
-};
-#endif
-
-#if !defined(__DOXYGEN__)
-/**
- * \brief Device structure.
- */
-struct rtc_module {
- /** RTC hardware module. */
- Rtc *hw;
- /** If clock mode 24h. */
- bool clock_24h;
-#ifdef FEATURE_RTC_CONTINUOUSLY_UPDATED
- /** If continuously update clock register. */
- bool continuously_update;
-#endif
- /** Initial year for counter value 0. */
- uint16_t year_init_value;
-# if RTC_CALENDAR_ASYNC == true
- /** Pointers to callback functions. */
- volatile rtc_calendar_callback_t callbacks[_RTC_CALENDAR_CALLBACK_N];
- /** Mask for registered callbacks. */
- volatile uint16_t registered_callback;
- /** Mask for enabled callbacks. */
- volatile uint16_t enabled_callback;
-# endif
-};
-#endif
-
-/**
- * \brief Available mask options for alarms.
- *
- * Available mask options for alarms.
- */
-enum rtc_calendar_alarm_mask {
- /** Alarm disabled. */
- RTC_CALENDAR_ALARM_MASK_DISABLED = RTC_MODE2_MASK_SEL_OFF,
- /** Alarm match on second. */
- RTC_CALENDAR_ALARM_MASK_SEC = RTC_MODE2_MASK_SEL_SS,
- /** Alarm match on second and minute. */
- RTC_CALENDAR_ALARM_MASK_MIN = RTC_MODE2_MASK_SEL_MMSS,
- /** Alarm match on second, minute, and hour. */
- RTC_CALENDAR_ALARM_MASK_HOUR = RTC_MODE2_MASK_SEL_HHMMSS,
- /** Alarm match on second, minute, hour, and day. */
- RTC_CALENDAR_ALARM_MASK_DAY = RTC_MODE2_MASK_SEL_DDHHMMSS,
- /** Alarm match on second, minute, hour, day, and month. */
- RTC_CALENDAR_ALARM_MASK_MONTH = RTC_MODE2_MASK_SEL_MMDDHHMMSS,
- /** Alarm match on second, minute, hour, day, month, and year. */
- RTC_CALENDAR_ALARM_MASK_YEAR = RTC_MODE2_MASK_SEL_YYMMDDHHMMSS,
-};
-
-/**
- * \brief RTC Calendar event enable/disable structure.
- *
- * Event flags for the \ref rtc_calendar_enable_events() and
- * \ref rtc_calendar_disable_events().
- */
-struct rtc_calendar_events {
- /** Generate an output event on each overflow of the RTC count. */
- bool generate_event_on_overflow;
- /** Generate an output event on a alarm channel match against the RTC
- * count. */
- bool generate_event_on_alarm[RTC_NUM_OF_ALARMS];
- /** Generate an output event periodically at a binary division of the RTC
- * counter frequency.
- */
- bool generate_event_on_periodic[8];
-};
-
-/**
- * \brief Time structure.
- *
- * Time structure containing the time given by or set to the RTC calendar.
- * The structure uses seven values to give second, minute, hour, PM/AM, day,
- * month, and year. It should be initialized via the
- * \ref rtc_calendar_get_time_defaults() function before use.
- */
-struct rtc_calendar_time {
- /** Second value. */
- uint8_t second;
- /** Minute value. */
- uint8_t minute;
- /** Hour value. */
- uint8_t hour;
- /** PM/AM value, \c true for PM, or \c false for AM. */
- bool pm;
- /** Day value, where day 1 is the first day of the month. */
- uint8_t day;
- /** Month value, where month 1 is January. */
- uint8_t month;
- /** Year value.*/
- uint16_t year;
-};
-
-/**
- * \brief Alarm structure.
- *
- * Alarm structure containing time of the alarm and a mask to determine when
- * the alarm will trigger.
- */
-struct rtc_calendar_alarm_time {
- /** Alarm time. */
- struct rtc_calendar_time time;
- /** Alarm mask to determine on what precision the alarm will match. */
- enum rtc_calendar_alarm_mask mask;
-};
-
-/**
- * \brief RTC configuration structure.
- *
- * Configuration structure for the RTC instance. This structure should
- * be initialized using the \ref rtc_calendar_get_config_defaults() before any
- * user configurations are set.
- */
-struct rtc_calendar_config {
- /** Input clock prescaler for the RTC module. */
- enum rtc_calendar_prescaler prescaler;
- /** If \c true, clears the clock on alarm match. */
- bool clear_on_match;
-#ifdef FEATURE_RTC_CONTINUOUSLY_UPDATED
- /** If \c true, the digital counter registers will be continuously updated
- * so that internal synchronization is not needed when reading the current
- * count. */
- bool continuously_update;
-#endif
- /** If \c true, time is represented in 24 hour mode. */
- bool clock_24h;
- /** Initial year for counter value 0. */
- uint16_t year_init_value;
- /** Alarm values. */
- struct rtc_calendar_alarm_time alarm[RTC_NUM_OF_ALARMS];
-};
-
-
-/**
- * \name Configuration and Initialization
- * @{
- */
-
-/**
- * \brief Initialize a \c time structure.
- *
- * This will initialize a given time structure to the time 00:00:00 (hh:mm:ss)
- * and date 2000-01-01 (YYYY-MM-DD).
- *
- * \param[out] time Time structure to initialize
- */
-static inline void rtc_calendar_get_time_defaults(
- struct rtc_calendar_time *const time)
-{
- time->second = 0;
- time->minute = 0;
- time->hour = 0;
- time->pm = 0;
- time->day = 1;
- time->month = 1;
- time->year = 2000;
-}
-
-/**
- * \brief Gets the RTC default settings.
- *
- * Initializes the configuration structure to the known default values. This
- * function should be called at the start of any RTC initiation.
- *
- * The default configuration is as follows:
- * - Input clock divided by a factor of 1024
- * - Clear on alarm match off
- * - Continuously sync clock off
- * - 12 hour calendar
- * - Start year 2000 (Year 0 in the counter will be year 2000)
- * - Events off
- * - Alarms set to January 1. 2000, 00:00:00
- * - Alarm will match on second, minute, hour, day, month, and year
- *
- * \param[out] config Configuration structure to be initialized to default
- * values.
- */
-static inline void rtc_calendar_get_config_defaults(
- struct rtc_calendar_config *const config)
-{
- /* Sanity check argument */
- Assert(config);
-
- /* Initialize and set time structure to default. */
- struct rtc_calendar_time time;
- rtc_calendar_get_time_defaults(&time);
-
- /* Set defaults into configuration structure */
- config->prescaler = RTC_CALENDAR_PRESCALER_DIV_1024;
- config->clear_on_match = false;
-#ifdef FEATURE_RTC_CONTINUOUSLY_UPDATED
- config->continuously_update = false;
-#endif
- config->clock_24h = false;
- config->year_init_value = 2000;
- for (uint8_t i = 0; i < RTC_NUM_OF_ALARMS; i++) {
- config->alarm[i].time = time;
- config->alarm[i].mask = RTC_CALENDAR_ALARM_MASK_YEAR;
- }
-}
-
-void rtc_calendar_reset(struct rtc_module *const module);
-void rtc_calendar_enable(struct rtc_module *const module);
-void rtc_calendar_disable(struct rtc_module *const module);
-
-#if (RTC_INST_NUM > 1) && !defined(__DOXYGEN__)
-/**
- * \internal Find the index of given RTC module instance.
- *
- * \param[in] hw RTC module instance pointer
- *
- * \return Index of the given RTC module instance.
- */
-uint8_t _rtc_get_inst_index(
- Rtc *const hw)
-{
- /* List of available RTC modules. */
- static Rtc *const rtc_modules[RTC_INST_NUM] = RTC_INSTS;
-
- /* Find index for RTC instance. */
- for (uint32_t i = 0; i < RTC_INST_NUM; i++) {
- if (hw == rtc_modules[i]) {
- return i;
- }
- }
-
- /* Invalid data given. */
- Assert(false);
- return 0;
-}
-#endif /* (RTC_INST_NUM > 1) && !defined(__DOXYGEN__) */
-
-void rtc_calendar_init(
- struct rtc_module *const module,
- Rtc *const hw,
- const struct rtc_calendar_config *const config);
-
-void rtc_calendar_swap_time_mode(struct rtc_module *const module);
-
-enum status_code rtc_calendar_frequency_correction(
- struct rtc_module *const module,
- const int8_t value);
-
-/** @} */
-
-
-/** \name Time and Alarm Management
- * @{
- */
-
-void rtc_calendar_set_time(
- struct rtc_module *const module,
- const struct rtc_calendar_time *const time);
-
-void rtc_calendar_get_time(
- struct rtc_module *const module,
- struct rtc_calendar_time *const time);
-
-enum status_code rtc_calendar_set_alarm(
- struct rtc_module *const module,
- const struct rtc_calendar_alarm_time *const alarm,
- const enum rtc_calendar_alarm alarm_index);
-
-enum status_code rtc_calendar_get_alarm(
- struct rtc_module *const module,
- struct rtc_calendar_alarm_time *const alarm,
- const enum rtc_calendar_alarm alarm_index);
-
-/** @} */
-
-
-/** \name Status Flag Management
- * @{
- */
-
-/**
- * \brief Check if an RTC overflow has occurred.
- *
- * Checks the overflow flag in the RTC. The flag is set when there
- * is an overflow in the clock.
- *
- * \param[in,out] module Pointer to the software instance struct
- *
- * \return Overflow state of the RTC module.
- *
- * \retval true If the RTC count value has overflowed
- * \retval false If the RTC count value has not overflowed
- */
-static inline bool rtc_calendar_is_overflow(struct rtc_module *const module)
-{
- /* Sanity check arguments */
- Assert(module);
- Assert(module->hw);
-
- Rtc *const rtc_module = module->hw;
-
- /* Return status of flag. */
- return (rtc_module->MODE2.INTFLAG.reg & RTC_MODE2_INTFLAG_OVF);
-}
-
-/**
- * \brief Clears the RTC overflow flag.
- *
- * \param[in,out] module Pointer to the software instance struct
- *
- * Clears the RTC module counter overflow flag, so that new overflow conditions
- * can be detected.
- */
-static inline void rtc_calendar_clear_overflow(struct rtc_module *const module)
-{
- /* Sanity check arguments */
- Assert(module);
- Assert(module->hw);
-
- Rtc *const rtc_module = module->hw;
-
- /* Clear flag. */
- rtc_module->MODE2.INTFLAG.reg = RTC_MODE2_INTFLAG_OVF;
-}
-
-/**
- * \brief Check the RTC alarm flag.
- *
- * Check if the specified alarm flag is set. The flag is set when there
- * is an compare match between the alarm value and the clock.
- *
- * \param[in,out] module Pointer to the software instance struct
- * \param[in] alarm_index Index of the alarm to check
- *
- * \returns Match status of the specified alarm.
- *
- * \retval true If the specified alarm has matched the current time
- * \retval false If the specified alarm has not matched the current time
- */
-static inline bool rtc_calendar_is_alarm_match(
- struct rtc_module *const module,
- const enum rtc_calendar_alarm alarm_index)
-{
- /* Sanity check arguments */
- Assert(module);
- Assert(module->hw);
-
- Rtc *const rtc_module = module->hw;
-
- /* Sanity check. */
- if ((uint32_t)alarm_index > RTC_NUM_OF_ALARMS) {
- Assert(false);
- return false;
- }
-
- /* Return int flag status. */
- return (rtc_module->MODE2.INTFLAG.reg & RTC_MODE2_INTFLAG_ALARM(1 << alarm_index));
-}
-
-/**
- * \brief Clears the RTC alarm match flag.
- *
- * Clear the requested alarm match flag, so that future alarm matches can be
- * determined.
- *
- * \param[in,out] module Pointer to the software instance struct
- * \param[in] alarm_index The index of the alarm match to clear
- *
- * \return Status of the alarm match clear operation.
- *
- * \retval STATUS_OK If flag was cleared correctly
- * \retval STATUS_ERR_INVALID_ARG If invalid argument(s) were provided
- */
-static inline enum status_code rtc_calendar_clear_alarm_match(
- struct rtc_module *const module,
- const enum rtc_calendar_alarm alarm_index)
-{
- /* Sanity check arguments */
- Assert(module);
- Assert(module->hw);
-
- Rtc *const rtc_module = module->hw;
-
- /* Sanity check. */
- if ((uint32_t)alarm_index > RTC_NUM_OF_ALARMS) {
- Assert(false);
- return STATUS_ERR_INVALID_ARG;
- }
-
- /* Clear flag. */
- rtc_module->MODE2.INTFLAG.reg = RTC_MODE2_INTFLAG_ALARM(1 << alarm_index);
-
- return STATUS_OK;
-}
-
-/** @} */
-
-
-/**
- * \name Event Management
- * @{
- */
-
-/**
- * \brief Enables a RTC event output.
- *
- * Enables one or more output events from the RTC module. See
- * \ref rtc_calendar_events for a list of events this module supports.
- *
- * \note Events cannot be altered while the module is enabled.
- *
- * \param[in,out] module Pointer to the software instance struct
- * \param[in] events Struct containing flags of events to enable
- */
-static inline void rtc_calendar_enable_events(
- struct rtc_module *const module,
- struct rtc_calendar_events *const events)
-{
- /* Sanity check arguments */
- Assert(module);
- Assert(module->hw);
-
- Rtc *const rtc_module = module->hw;
-
- uint32_t event_mask = 0;
-
- /* Check if the user has requested an overflow event. */
- if (events->generate_event_on_overflow) {
- event_mask |= RTC_MODE2_EVCTRL_OVFEO;
- }
-
- /* Check if the user has requested any alarm events. */
- for (uint8_t i = 0; i < RTC_NUM_OF_ALARMS; i++) {
- if (events->generate_event_on_alarm[i]) {
- event_mask |= RTC_MODE2_EVCTRL_ALARMEO(1 << i);
- }
- }
-
- /* Check if the user has requested any periodic events. */
- for (uint8_t i = 0; i < 8; i++) {
- if (events->generate_event_on_periodic[i]) {
- event_mask |= RTC_MODE2_EVCTRL_PEREO(1 << i);
- }
- }
-
- /* Enable given event(s). */
- rtc_module->MODE2.EVCTRL.reg |= event_mask;
-}
-
-/**
- * \brief Disables a RTC event output.
- *
- * Disabled one or more output events from the RTC module. See
- * \ref rtc_calendar_events for a list of events this module supports.
- *
- * \note Events cannot be altered while the module is enabled.
- *
- * \param[in,out] module Pointer to the software instance struct
- * \param[in] events Struct containing flags of events to disable
- */
-static inline void rtc_calendar_disable_events(
- struct rtc_module *const module,
- struct rtc_calendar_events *const events)
-{
- /* Sanity check arguments */
- Assert(module);
- Assert(module->hw);
-
- Rtc *const rtc_module = module->hw;
-
- uint32_t event_mask = 0;
-
- /* Check if the user has requested an overflow event. */
- if (events->generate_event_on_overflow) {
- event_mask |= RTC_MODE2_EVCTRL_OVFEO;
- }
-
- /* Check if the user has requested any alarm events. */
- for (uint8_t i = 0; i < RTC_NUM_OF_ALARMS; i++) {
- if (events->generate_event_on_alarm[i]) {
- event_mask |= RTC_MODE2_EVCTRL_ALARMEO(1 << i);
- }
- }
-
- /* Check if the user has requested any periodic events. */
- for (uint8_t i = 0; i < 8; i++) {
- if (events->generate_event_on_periodic[i]) {
- event_mask |= RTC_MODE2_EVCTRL_PEREO(1 << i);
- }
- }
-
- /* Disable given event(s). */
- rtc_module->MODE2.EVCTRL.reg &= ~event_mask;
-}
-
-/** @} */
-
-#ifdef FEATURE_RTC_GENERAL_PURPOSE_REG
-/**
- * \name RTC General Purpose Registers
- * @{
- */
-
-/**
- * \brief Write a value into general purpose register.
- *
- * \param[in] module Pointer to the software instance struct
- * \param[in] n General purpose type
- * \param[in] index General purpose register index (0..3)
- *
- */
-static inline void rtc_write_general_purpose_reg(
- struct rtc_module *const module,
- const uint8_t index,
- uint32_t value)
-{
- /* Sanity check arguments */
- Assert(module);
- Assert(module->hw);
- Assert(index <= 3);
-
- Rtc *const rtc_module = module->hw;
-
- rtc_module->MODE0.GP[index].reg = value;
-}
-
-/**
- * \brief Read the value from general purpose register.
- *
- * \param[in] module Pointer to the software instance struct
- * \param[in] index General purpose register index (0..3)
- *
- * \retval Value of general purpose register
- */
-static inline uint32_t rtc_read_general_purpose_reg(
- struct rtc_module *const module,
- const uint8_t index)
-{
- /* Sanity check arguments */
- Assert(module);
- Assert(module->hw);
- Assert(index <= 3);
-
- Rtc *const rtc_module = module->hw;
-
- return rtc_module->MODE0.GP[index].reg;
-}
-
-/** @} */
-#endif
-
-/** @} */
-
-#ifdef __cplusplus
-}
-#endif
-
-
-/**
- * \page asfdoc_sam0_rtc_calendar_extra Extra Information for RTC (CAL) Driver
- *
- * \section asfdoc_sam0_rtc_calendar_extra_acronyms Acronyms
- * Below is a table listing the acronyms used in this module, along with their
- * intended meanings.
- *
- * <table>
- * <tr>
- * <th>Acronym</td>
- * <th>Description</td>
- * </tr>
- * <tr>
- * <td>RTC</td>
- * <td>Real Time Counter</td>
- * </tr>
- * <tr>
- * <td>PPM</td>
- * <td>Part Per Million</td>
- * </tr>
- * <tr>
- * <td>RC</td>
- * <td>Resistor/Capacitor</td>
- * </tr>
- * </table>
- *
- *
- * \section asfdoc_sam0_rtc_calendar_extra_dependencies Dependencies
- * This driver has the following dependencies:
- *
- * - None
- *
- *
- * \section asfdoc_sam0_rtc_calendar_extra_errata Errata
- * There are no errata related to this driver.
- *
- *
- * \section asfdoc_sam0_rtc_calendar_extra_history Module History
- * An overview of the module history is presented in the table below, with
- * details on the enhancements and fixes made to the module since its first
- * release. The current version of this corresponds to the newest version in
- * the table.
- *
- * <table>
- * <tr>
- * <th>Changelog</th>
- * </tr>
- * <tr>
- * <td>Added support for SAML21.</td>
- * </tr>
- * <tr>
- * <td>
- * Added support for SAMD21 and added driver instance parameter to all
- * API function calls, except get_config_defaults
- * </td>
- * </tr>
- * <tr>
- * <td>Updated initialization function to also enable the digital interface
- * clock to the module if it is disabled</td>
- * </tr>
- * <tr>
- * <td>Initial Release</td>
- * </tr>
- * </table>
- */
-
-/**
- * \page asfdoc_sam0_rtc_calendar_exqsg Examples for RTC CAL Driver
- *
- * This is a list of the available Quick Start guides (QSGs) and example
- * applications for \ref asfdoc_sam0_rtc_calendar_group. QSGs are simple
- * examples with step-by-step instructions to configure and use this driver in a
- * selection of use cases. Note that QSGs can be compiled as a standalone
- * application or be added to the user application.
- *
- * - \subpage asfdoc_sam0_rtc_calendar_basic_use_case
- * \if RTC_CALENDAR_CALLBACK_MODE
- * - \subpage asfdoc_sam0_rtc_calendar_callback_use_case
- * \endif
- *
- * \page asfdoc_sam0_rtc_calendar_document_revision_history Document Revision History
- *
- * <table>
- * <tr>
- * <th>Doc. Rev.</td>
- * <th>Date</td>
- * <th>Comments</td>
- * </tr>
- * <tr>
- * <td>E</td>
- * <td>11/2014</td>
- * <td>Added support for SAML21.</td>
- * </tr>
- * <tr>
- * <td>D</td>
- * <td>12/2014</td>
- * <td>Added support for SAMR21 and SAMD10/D11.</td>
- * </tr>
- * <tr>
- * <td>C</td>
- * <td>01/2014</td>
- * <td>Added support for SAMD21.</td>
- * </tr>
- * <tr>
- * <td>B</td>
- * <td>06/2013</td>
- * <td>Added additional documentation on the event system. Corrected
- * documentation typos.</td>
- * </tr>
- * <tr>
- * <td>A</td>
- * <td>06/2013</td>
- * <td>Initial release</td>
- * </tr>
- * </table>
- */
-
-#endif /* RTC_CALENDAR_H_INCLUDED */
-
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/targets/hal/TARGET_Atmel/TARGET_SAM21/drivers/rtc/rtc_count.h Fri Jul 17 09:15:10 2015 +0100
@@ -0,0 +1,1155 @@
+#ifndef RTC_COUNT_H_INCLUDED
+#define RTC_COUNT_H_INCLUDED
+
+/**
+ * \defgroup asfdoc_sam0_rtc_count_group SAM RTC Count Driver (RTC COUNT)
+ *
+ * This driver for Atmel庐 | SMART SAM devices provides an interface for the configuration
+ * and management of the device's Real Time Clock functionality in Count
+ * operating mode, for the configuration and retrieval of the current RTC
+ * counter value. The following driver API modes are covered by this
+ * manual:
+ *
+ * - Polled APIs
+ * \if RTC_COUNT_CALLBACK_MODE
+ * - Callback APIs
+ * \endif
+ *
+ * The following peripherals are used by this module:
+ * - RTC (Real Time Clock)
+ *
+ * The following devices can use this module:
+ * - Atmel | SMART SAM D20/D21
+ * - Atmel | SMART SAM R21
+ * - Atmel | SMART SAM D10/D11
+ * - Atmel | SMART SAM L21
+ *
+ * The outline of this documentation is as follows:
+ * - \ref asfdoc_sam0_rtc_count_prerequisites
+ * - \ref asfdoc_sam0_rtc_count_module_overview
+ * - \ref asfdoc_sam0_rtc_count_special_considerations
+ * - \ref asfdoc_sam0_rtc_count_extra_info
+ * - \ref asfdoc_sam0_rtc_count_examples
+ * - \ref asfdoc_sam0_rtc_count_api_overview
+ *
+ *
+ * \section asfdoc_sam0_rtc_count_prerequisites Prerequisites
+ *
+ * There are no prerequisites for this module.
+ *
+ *
+ * \section asfdoc_sam0_rtc_count_module_overview Module Overview
+ *
+ * The RTC module in the SAM devices is a 32-bit counter, with a 10-bit
+ * programmable prescaler. Typically, the RTC clock is run continuously,
+ * including in the device's low-power sleep modes, to track the current time
+ * and date information. The RTC can be used as a source to wake up the system
+ * at a scheduled time or periodically using the alarm functions.
+ *
+ * In this driver, the RTC is operated in Count mode. This allows for an
+ * easy integration of an asynchronous counter into a user application, which is
+ * capable of operating while the device is in sleep mode.
+ *
+ * Whilst operating in Count mode, the RTC features:
+ * - 16-bit counter mode
+ * - Selectable counter period
+ * - Up to six configurable compare values
+ * - 32-bit counter mode
+ * - Clear counter value on match
+ * - Up to four configurable compare values
+ *
+ * \subsection asfdoc_sam0_rtc_count_features Driver Feature Macro Definition
+ * <table>
+ * <tr>
+ * <th>Driver Feature Macro</th>
+ * <th>Supported devices</th>
+ * </tr>
+ * <tr>
+ * <td>FEATURE_RTC_PERIODIC_INT</td>
+ * <td>SAML21</td>
+ * </tr>
+ * <tr>
+ * <td>FEATURE_RTC_PRESCALER_OFF</td>
+ * <td>SAML21</td>
+ * </tr>
+ * <tr>
+ * <td>FEATURE_RTC_CLOCK_SELECTION</td>
+ * <td>SAML21</td>
+ * </tr>
+ * <tr>
+ * <td>FEATURE_RTC_GENERAL_PURPOSE_REG</td>
+ * <td>SAML21</td>
+ * </tr>
+ * <tr>
+ * <td>FEATURE_RTC_CONTINUOUSLY_UPDATED</td>
+ * <td>SAMD20,SAMD21,SAMR21,SAMD10,SAMD11</td>
+ * </tr>
+ * </table>
+ * \note The specific features are only available in the driver when the
+ * selected device supports those features.
+ *
+ * \section asfdoc_sam0_rtc_count_module_overview_compares Compare and Overflow
+ * The RTC can be used with up to 4/6 compare values (depending on selected
+ * operation mode). These compare values will trigger on match with the current
+ * RTC counter value, and can be set up to trigger an interrupt, event, or both.
+ * The RTC can also be configured to clear the counter value on compare match
+ * in 32-bit mode, resetting the count value back to zero.
+ *
+ * If the RTC is operated without the Clear on Match option enabled, or in
+ * 16-bit mode, the RTC counter value will instead be cleared on overflow once
+ * the maximum count value has been reached:
+ *
+ * \f[ COUNT_{MAX} = 2^{32}-1 \f] for 32-bit counter mode, and
+ * \f[ COUNT_{MAX} = 2^{16}-1 \f] for 16-bit counter mode.
+ *
+ * When running in 16-bit mode, the overflow value is selectable with a period
+ * value. The counter overflow will then occur when the counter value reaches
+ * the specified period value.
+ *
+ * \subsection asfdoc_sam0_rtc_count_module_overview_periodic Periodic Events
+ * The RTC can generate events at periodic intervals, allowing for direct
+ * peripheral actions without CPU intervention. The periodic events can be
+ * generated on the upper eight bits of the RTC prescaler, and will be generated on
+ * the rising edge transition of the specified bit. The resulting periodic
+ * frequency can be calculated by the following formula:
+ *
+ * \f[ f_{PERIODIC}=\frac{f_{ASY}}{2^{n+3}} \f]
+ *
+ * Where \f$f_{ASY}\f$ refers to the \e asynchronous clock set up in the RTC
+ * module configuration. The \b n parameter is the event source generator index
+ * of the RTC module. If the asynchronous clock is operated at the recommended
+ * frequency of 1KHz, the formula results in the values shown in
+ * \ref asfdoc_sam0_rtc_count_module_rtc_hz "the table below".
+ *
+ * \anchor asfdoc_sam0_rtc_count_module_rtc_hz
+ * <table>
+ * <caption>RTC Event Frequencies for Each Prescaler Bit Using a 1KHz Clock</caption>
+ * <tr>
+ * <th>n</th> <th>Periodic event</th>
+ * </tr>
+ * <tr>
+ * <td>7</td> <td>1Hz</td>
+ * </tr>
+ * <tr>
+ * <td>6</td> <td>2Hz</td>
+ * </tr>
+ * <tr>
+ * <td>5</td> <td>4Hz</td>
+ * </tr>
+ * <tr>
+ * <td>4</td> <td>8Hz</td>
+ * </tr>
+ * <tr>
+ * <td>3</td> <td>16Hz</td>
+ * </tr>
+ * <tr>
+ * <td>2</td> <td>32Hz</td>
+ * </tr>
+ * <tr>
+ * <td>1</td> <td>64Hz</td>
+ * </tr>
+ * <tr>
+ * <td>0</td> <td>128Hz</td>
+ * </tr>
+ * </table>
+ *
+ * \note The connection of events between modules requires the use of the
+ * \ref asfdoc_sam0_events_group "SAM Event System Driver (EVENTS)"
+ * to route output event of one module to the the input event of another.
+ * For more information on event routing, refer to the event driver
+ * documentation.
+ *
+ * \subsection asfdoc_sam0_rtc_count_module_overview_correction Digital Frequency Correction
+ * The RTC module contains Digital Frequency Correction logic to compensate for
+ * inaccurate source clock frequencies which would otherwise result in skewed
+ * time measurements. The correction scheme requires that at least two bits
+ * in the RTC module prescaler are reserved by the correction logic. As a
+ * result of this implementation, frequency correction is only available when
+ * the RTC is running from a 1Hz reference clock.
+ *
+ * The correction procedure is implemented by subtracting or adding a single
+ * cycle from the RTC prescaler every 1024 RTC GCLK cycles. The adjustment is
+ * applied the specified number of time (maximum 127) over 976 of these periods. The
+ * corresponding correction in PPM will be given by:
+ *
+ * \f[ Correction(PPM) = \frac{VALUE}{999424}10^6 \f]
+ *
+ * The RTC clock will tick faster if provided with a positive correction value,
+ * and slower when given a negative correction value.
+ *
+ *
+ * \section asfdoc_sam0_rtc_count_special_considerations Special Considerations
+ *
+ * \subsection asfdoc_sam0_rtc_count_special_considerations_clock Clock Setup
+ * \subsubsection asfdoc_sam0_rtc_count_clock_samd_r SAM D20/D21/R21/D10/D11 Clock Setup
+ * The RTC is typically clocked by a specialized GCLK generator that has a
+ * smaller prescaler than the others. By default the RTC clock is on, selected
+ * to use the internal 32KHz RC-oscillator with a prescaler of 32, giving a
+ * resulting clock frequency of 1KHz to the RTC. When the internal RTC
+ * prescaler is set to 1024, this yields an end-frequency of 1Hz.
+ *
+ * The implementer also has the option to set other end-frequencies.
+ * \ref asfdoc_sam0_rtc_count_rtc_out_freq "The table below" lists the
+ * available RTC frequencies for each possible GCLK and RTC input prescaler
+ * options.
+ *
+ * \anchor asfdoc_sam0_rtc_count_rtc_out_freq
+ * <table>
+ * <caption>RTC Output Frequencies from Allowable Input Clocks</caption>
+ * <tr>
+ * <th>End-frequency</th>
+ * <th>GCLK prescaler</th>
+ * <th>RTC prescaler</th>
+ * </tr>
+ * <tr>
+ * <td>32KHz</td>
+ * <td>1</td>
+ * <td>1</td>
+ * </tr>
+ * <tr>
+ * <td>1KHz</td>
+ * <td>32</td>
+ * <td>1</td>
+ * </tr>
+ * <tr>
+ * <td>1Hz</td>
+ * <td>32</td>
+ * <td>1024</td>
+ * </tr>
+ * </table>
+ *
+ * The overall RTC module clocking scheme is shown in
+ * \ref asfdoc_sam0_rtc_count_rtc_clock_fig "the figure below".
+ *
+ * \anchor asfdoc_sam0_rtc_count_rtc_clock_fig
+ * \dot
+ * digraph clocking_scheme {
+ * rankdir=LR;
+ * GCLK [shape="record", label="<f0> GCLK | <f1> RTC_GCLK",
+ * bgcolor="lightgray", style="filled"];
+ * RTCPRE [shape="record" label="<f0> RTC | <f1> RTC PRESCALER"];
+ * RTC [shape="record", label="<f0> RTC | <f1> RTC CLOCK"];
+ *
+ * GCLK:f1 -> RTCPRE:f1;
+ * RTCPRE:f1 -> RTC:f1;
+ * }
+ * \enddot
+ *
+ * \subsubsection asfdoc_sam0_rtc_count_clock_saml SAM L21 Clock Setup
+ * The RTC clock can be selected from OSC32K,XOSC32K or OSCULP32K , and a 32KHz
+ * or 1KHz oscillator clock frequency is required. This clock must be
+ * configured and enabled in the 32KHz oscillator controller before using the RTC.
+ *
+ * The table below lists the available RTC clock \ref asfdoc_sam0_rtc_count_rtc_clk
+ *
+ * \anchor asfdoc_sam0_rtc_count_rtc_clk
+ * <table>
+ * <caption>RTC clocks source</caption>
+ * <tr>
+ * <th>RTC clock frequency</th>
+ * <th>Clock source</th>
+ * <th>Description</th>
+ * </tr>
+ * <tr>
+ * <td>1.024KHz</td>
+ * <td>ULP1K</td>
+ * <td>1.024KHz from 32KHz internal ULP oscillator</td>
+ * </tr>
+ * <tr>
+ * <td>32.768KHz</td>
+ * <td>ULP32K</td>
+ * <td>32.768KHz from 32KHz internal ULP oscillator</td>
+ * </tr>
+ * <tr>
+ * <td>1.024KHz</td>
+ * <td>OSC1K</td>
+ * <td>1.024KHz from 32KHz internal oscillator</td>
+ * </tr>
+ * <tr>
+ * <td>32.768KHz</td>
+ * <td>OSC32K</td>
+ * <td>32.768KHz from 32KHz internal oscillator</td>
+ * </tr>
+ * <tr>
+ * <td>1.024KHz</td>
+ * <td>XOSC1K</td>
+ * <td>1.024KHz from 32KHz internal oscillator</td>
+ * </tr>
+ * <tr>
+ * <td>32.768KHz</td>
+ * <td>XOSC32K</td>
+ * <td>32.768KHz from 32KHz external crystal oscillator</td>
+ * </tr>
+ * </table>
+ *
+ * \section asfdoc_sam0_rtc_count_extra_info Extra Information
+ *
+ * For extra information, see \ref asfdoc_sam0_rtc_count_extra. This includes:
+ * - \ref asfdoc_sam0_rtc_count_extra_acronyms
+ * - \ref asfdoc_sam0_rtc_count_extra_dependencies
+ * - \ref asfdoc_sam0_rtc_count_extra_errata
+ * - \ref asfdoc_sam0_rtc_count_extra_history
+ *
+ *
+ * \section asfdoc_sam0_rtc_count_examples Examples
+ *
+ * For a list of examples related to this driver, see
+ * \ref asfdoc_sam0_rtc_count_exqsg.
+ *
+ *
+ * \section asfdoc_sam0_rtc_count_api_overview API Overview
+ * @{
+ */
+
+#include <compiler.h>
+#include <conf_clocks.h>
+
+#if RTC_COUNT_ASYNC == true
+# include <system_interrupt.h>
+#endif
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+/**
+ * Define port features set according to different device family
+ * @{
+*/
+#if (SAML21) || defined(__DOXYGEN__)
+/** RTC periodic interval interrupt. */
+# define FEATURE_RTC_PERIODIC_INT
+/** RTC prescaler is off. */
+# define FEATURE_RTC_PRESCALER_OFF
+/** RTC clock selection. */
+# define FEATURE_RTC_CLOCK_SELECTION
+/** General purpose registers. */
+# define FEATURE_RTC_GENERAL_PURPOSE_REG
+#else
+/** RTC continuously updated. */
+# define FEATURE_RTC_CONTINUOUSLY_UPDATED
+#endif
+/*@}*/
+
+#ifdef FEATURE_RTC_CLOCK_SELECTION
+/**
+ * \brief Available clock source for RTC.
+ * RTC clock source.
+ */
+enum rtc_clock_sel {
+ /** 1.024KHz from 32KHz internal ULP oscillator. */
+ RTC_CLOCK_SELECTION_ULP1K = OSC32KCTRL_RTCCTRL_RTCSEL_ULP1K_Val,
+ /** 32.768KHz from 32KHz internal ULP oscillator. */
+ RTC_CLOCK_SELECTION_ULP32K = OSC32KCTRL_RTCCTRL_RTCSEL_ULP32K_Val,
+ /** 1.024KHz from 32KHz internal oscillator. */
+ RTC_CLOCK_SELECTION_OSC1K = OSC32KCTRL_RTCCTRL_RTCSEL_OSC1K_Val,
+ /** 32.768KHz from 32KHz internal oscillator. */
+ RTC_CLOCK_SELECTION_OSC32K = OSC32KCTRL_RTCCTRL_RTCSEL_OSC32K_Val,
+ /** 1.024KHz from 32KHz internal oscillator. */
+ RTC_CLOCK_SELECTION_XOSC1K = OSC32KCTRL_RTCCTRL_RTCSEL_XOSC1K_Val,
+ /** 32.768KHz from 32.768KHz external crystal oscillator. */
+ RTC_CLOCK_SELECTION_XOSC32K = OSC32KCTRL_RTCCTRL_RTCSEL_XOSC32K_Val,
+};
+#endif
+
+/**
+ * \brief Available operation modes for the RTC.
+ *
+ * RTC Count operating modes, to select the counting width and associated module
+ * operation.
+ */
+enum rtc_count_mode {
+ /** RTC Count module operates in 16-bit mode. */
+ RTC_COUNT_MODE_16BIT = 0,
+ /** RTC Count module operates in 32-bit mode. */
+ RTC_COUNT_MODE_32BIT = 1,
+};
+
+#if !defined (RTC_NUM_OF_COMP16) && defined(RTC_COMP16_NUM)
+#define RTC_NUM_OF_COMP16 RTC_COMP16_NUM
+#endif
+
+/**
+ * \brief Available compare channels.
+ *
+ * \note Not all compare channels are available in all devices and modes.
+ */
+enum rtc_count_compare {
+ /** Compare channel 0. */
+ RTC_COUNT_COMPARE_0 = 0,
+#if (RTC_NUM_OF_COMP16 > 1) || defined(__DOXYGEN__)
+ /** Compare channel 1. */
+ RTC_COUNT_COMPARE_1 = 1,
+#endif
+#if (RTC_NUM_OF_COMP16 > 2) || defined(__DOXYGEN__)
+ /** Compare channel 2. */
+ RTC_COUNT_COMPARE_2 = 2,
+#endif
+#if (RTC_NUM_OF_COMP16 > 3) || defined(__DOXYGEN__)
+ /** Compare channel 3. */
+ RTC_COUNT_COMPARE_3 = 3,
+#endif
+#if (RTC_NUM_OF_COMP16 > 4) || defined(__DOXYGEN__)
+ /** Compare channel 4. */
+ RTC_COUNT_COMPARE_4 = 4,
+#endif
+#if (RTC_NUM_OF_COMP16 > 5) || defined(__DOXYGEN__)
+ /** Compare channel 5. */
+ RTC_COUNT_COMPARE_5 = 5,
+#endif
+};
+
+#ifdef FEATURE_RTC_PERIODIC_INT
+/**
+ * \brief Available periodic interval source.
+ */
+enum rtc_count_periodic_interval {
+ /** Periodic interval 0 */
+ RTC_COUNT_PERIODIC_INTERVAL_0 = 0,
+ /** Periodic interval 1 */
+ RTC_COUNT_PERIODIC_INTERVAL_1 = 1,
+ /** Periodic interval 2 */
+ RTC_COUNT_PERIODIC_INTERVAL_2 = 2,
+ /** Periodic interval 3 */
+ RTC_COUNT_PERIODIC_INTERVAL_3 = 3,
+ /** Periodic interval 4 */
+ RTC_COUNT_PERIODIC_INTERVAL_4 = 4,
+ /** Periodic interval 5 */
+ RTC_COUNT_PERIODIC_INTERVAL_5 = 5,
+ /** Periodic interval 6 */
+ RTC_COUNT_PERIODIC_INTERVAL_6 = 6,
+ /** Periodic interval 7 */
+ RTC_COUNT_PERIODIC_INTERVAL_7 = 7,
+};
+#endif
+
+#if RTC_COUNT_ASYNC == true
+#ifdef FEATURE_RTC_PERIODIC_INT
+/**
+ * \brief Callback types.
+ *
+ * The available callback types for the RTC count module.
+ */
+enum rtc_count_callback {
+ /** Callback for Periodic Interval 0 Interrupt. */
+ RTC_COUNT_CALLBACK_PERIODIC_INTERVAL_0 = 0,
+ /** Callback for Periodic Interval 1 Interrupt. */
+ RTC_COUNT_CALLBACK_PERIODIC_INTERVAL_1,
+ /** Callback for Periodic Interval 2 Interrupt. */
+ RTC_COUNT_CALLBACK_PERIODIC_INTERVAL_2,
+ /** Callback for Periodic Interval 3 Interrupt. */
+ RTC_COUNT_CALLBACK_PERIODIC_INTERVAL_3,
+ /** Callback for Periodic Interval 4 Interrupt. */
+ RTC_COUNT_CALLBACK_PERIODIC_INTERVAL_4,
+ /** Callback for Periodic Interval 5 Interrupt. */
+ RTC_COUNT_CALLBACK_PERIODIC_INTERVAL_5,
+ /** Callback for Periodic Interval 6 Interrupt. */
+ RTC_COUNT_CALLBACK_PERIODIC_INTERVAL_6,
+ /** Callback for Periodic Interval 7 Interrupt. */
+ RTC_COUNT_CALLBACK_PERIODIC_INTERVAL_7,
+ /** Callback for compare channel 0. */
+ RTC_COUNT_CALLBACK_COMPARE_0,
+# if (RTC_NUM_OF_COMP16 > 1) || defined(__DOXYGEN__)
+ /** Callback for compare channel 1. */
+ RTC_COUNT_CALLBACK_COMPARE_1,
+# endif
+# if (RTC_NUM_OF_COMP16 > 2) || defined(__DOXYGEN__)
+ /** Callback for compare channel 2. */
+ RTC_COUNT_CALLBACK_COMPARE_2,
+# endif
+# if (RTC_NUM_OF_COMP16 > 3) || defined(__DOXYGEN__)
+ /** Callback for compare channel 3. */
+ RTC_COUNT_CALLBACK_COMPARE_3,
+# endif
+# if (RTC_NUM_OF_COMP16 > 4) || defined(__DOXYGEN__)
+ /** Callback for compare channel 4. */
+ RTC_COUNT_CALLBACK_COMPARE_4,
+# endif
+# if (RTC_NUM_OF_COMP16 > 5) || defined(__DOXYGEN__)
+ /** Callback for compare channel 5. */
+ RTC_COUNT_CALLBACK_COMPARE_5,
+# endif
+
+ /** Callback for overflow. */
+ RTC_COUNT_CALLBACK_OVERFLOW,
+# if !defined(__DOXYGEN__)
+ /** Total number of callbacks. */
+ _RTC_COUNT_CALLBACK_N
+# endif
+};
+#else
+/**
+ * \brief Callback types.
+ *
+ * The available callback types for the RTC count module.
+ */
+enum rtc_count_callback {
+ /** Callback for compare channel 0. */
+ RTC_COUNT_CALLBACK_COMPARE_0 = 0,
+# if (RTC_NUM_OF_COMP16 > 1) || defined(__DOXYGEN__)
+ /** Callback for compare channel 1. */
+ RTC_COUNT_CALLBACK_COMPARE_1,
+# endif
+# if (RTC_NUM_OF_COMP16 > 2) || defined(__DOXYGEN__)
+ /** Callback for compare channel 2. */
+ RTC_COUNT_CALLBACK_COMPARE_2,
+# endif
+# if (RTC_NUM_OF_COMP16 > 3) || defined(__DOXYGEN__)
+ /** Callback for compare channel 3. */
+ RTC_COUNT_CALLBACK_COMPARE_3,
+# endif
+# if (RTC_NUM_OF_COMP16 > 4) || defined(__DOXYGEN__)
+ /** Callback for compare channel 4. */
+ RTC_COUNT_CALLBACK_COMPARE_4,
+# endif
+# if (RTC_NUM_OF_COMP16 > 5) || defined(__DOXYGEN__)
+ /** Callback for compare channel 5. */
+ RTC_COUNT_CALLBACK_COMPARE_5,
+# endif
+ /** Callback for overflow. */
+ RTC_COUNT_CALLBACK_OVERFLOW,
+# if !defined(__DOXYGEN__)
+ /** Total number of callbacks. */
+ _RTC_COUNT_CALLBACK_N
+# endif
+};
+#endif
+
+# if !defined(__DOXYGEN__)
+typedef void (*rtc_count_callback_t)(void);
+# endif
+#endif
+
+#ifdef FEATURE_RTC_PRESCALER_OFF
+/**
+ * \brief RTC input clock prescaler settings.
+ *
+ * The available input clock prescaler values for the RTC count module.
+ */
+enum rtc_count_prescaler {
+ /** RTC prescaler is off, and the input clock frequency is
+ prescaled by a factor of 1. */
+ RTC_COUNT_PRESCALER_OFF = RTC_MODE0_CTRLA_PRESCALER_OFF,
+ /** RTC input clock frequency is prescaled by a factor of 1. */
+ RTC_COUNT_PRESCALER_DIV_1 = RTC_MODE0_CTRLA_PRESCALER_DIV1,
+ /** RTC input clock frequency is prescaled by a factor of 2. */
+ RTC_COUNT_PRESCALER_DIV_2 = RTC_MODE0_CTRLA_PRESCALER_DIV2,
+ /** RTC input clock frequency is prescaled by a factor of 4. */
+ RTC_COUNT_PRESCALER_DIV_4 = RTC_MODE0_CTRLA_PRESCALER_DIV4,
+ /** RTC input clock frequency is prescaled by a factor of 8. */
+ RTC_COUNT_PRESCALER_DIV_8 = RTC_MODE0_CTRLA_PRESCALER_DIV8,
+ /** RTC input clock frequency is prescaled by a factor of 16. */
+ RTC_COUNT_PRESCALER_DIV_16 = RTC_MODE0_CTRLA_PRESCALER_DIV16,
+ /** RTC input clock frequency is prescaled by a factor of 32. */
+ RTC_COUNT_PRESCALER_DIV_32 = RTC_MODE0_CTRLA_PRESCALER_DIV32,
+ /** RTC input clock frequency is prescaled by a factor of 64. */
+ RTC_COUNT_PRESCALER_DIV_64 = RTC_MODE0_CTRLA_PRESCALER_DIV64,
+ /** RTC input clock frequency is prescaled by a factor of 128. */
+ RTC_COUNT_PRESCALER_DIV_128 = RTC_MODE0_CTRLA_PRESCALER_DIV128,
+ /** RTC input clock frequency is prescaled by a factor of 256. */
+ RTC_COUNT_PRESCALER_DIV_256 = RTC_MODE0_CTRLA_PRESCALER_DIV256,
+ /** RTC input clock frequency is prescaled by a factor of 512. */
+ RTC_COUNT_PRESCALER_DIV_512 = RTC_MODE0_CTRLA_PRESCALER_DIV512,
+ /** RTC input clock frequency is prescaled by a factor of 1024. */
+ RTC_COUNT_PRESCALER_DIV_1024 = RTC_MODE0_CTRLA_PRESCALER_DIV1024,
+};
+#else
+/**
+ * \brief RTC input clock prescaler settings.
+ *
+ * The available input clock prescaler values for the RTC count module.
+ */
+enum rtc_count_prescaler {
+ /** RTC input clock frequency is prescaled by a factor of 1. */
+ RTC_COUNT_PRESCALER_DIV_1 = RTC_MODE0_CTRL_PRESCALER_DIV1,
+ /** RTC input clock frequency is prescaled by a factor of 2. */
+ RTC_COUNT_PRESCALER_DIV_2 = RTC_MODE0_CTRL_PRESCALER_DIV2,
+ /** RTC input clock frequency is prescaled by a factor of 4. */
+ RTC_COUNT_PRESCALER_DIV_4 = RTC_MODE0_CTRL_PRESCALER_DIV4,
+ /** RTC input clock frequency is prescaled by a factor of 8. */
+ RTC_COUNT_PRESCALER_DIV_8 = RTC_MODE0_CTRL_PRESCALER_DIV8,
+ /** RTC input clock frequency is prescaled by a factor of 16. */
+ RTC_COUNT_PRESCALER_DIV_16 = RTC_MODE0_CTRL_PRESCALER_DIV16,
+ /** RTC input clock frequency is prescaled by a factor of 32. */
+ RTC_COUNT_PRESCALER_DIV_32 = RTC_MODE0_CTRL_PRESCALER_DIV32,
+ /** RTC input clock frequency is prescaled by a factor of 64. */
+ RTC_COUNT_PRESCALER_DIV_64 = RTC_MODE0_CTRL_PRESCALER_DIV64,
+ /** RTC input clock frequency is prescaled by a factor of 128. */
+ RTC_COUNT_PRESCALER_DIV_128 = RTC_MODE0_CTRL_PRESCALER_DIV128,
+ /** RTC input clock frequency is prescaled by a factor of 256. */
+ RTC_COUNT_PRESCALER_DIV_256 = RTC_MODE0_CTRL_PRESCALER_DIV256,
+ /** RTC input clock frequency is prescaled by a factor of 512. */
+ RTC_COUNT_PRESCALER_DIV_512 = RTC_MODE0_CTRL_PRESCALER_DIV512,
+ /** RTC input clock frequency is prescaled by a factor of 1024. */
+ RTC_COUNT_PRESCALER_DIV_1024 = RTC_MODE0_CTRL_PRESCALER_DIV1024,
+};
+#endif
+
+/**
+ * \brief RTC Count event enable/disable structure.
+ *
+ * Event flags for the \ref rtc_count_enable_events() and
+ * \ref rtc_count_disable_events().
+ */
+struct rtc_count_events {
+ /** Generate an output event on each overflow of the RTC count. */
+ bool generate_event_on_overflow;
+ /** Generate an output event on a compare channel match against the RTC
+ * count. */
+ bool generate_event_on_compare[RTC_NUM_OF_COMP16];
+ /** Generate an output event periodically at a binary division of the RTC
+ * counter frequency. */
+ bool generate_event_on_periodic[8];
+};
+
+#if !defined(__DOXYGEN__)
+/**
+ * \brief Device structure.
+ */
+struct rtc_module {
+ /** RTC hardware module. */
+ Rtc *hw;
+ /** Operation mode of count. */
+ enum rtc_count_mode mode;
+#ifdef FEATURE_RTC_CONTINUOUSLY_UPDATED
+ /** Set if counter value should be continuously updated. */
+ bool continuously_update;
+#endif
+# if RTC_COUNT_ASYNC == true
+ /** Pointers to callback functions. */
+ volatile rtc_count_callback_t callbacks[_RTC_COUNT_CALLBACK_N];
+ /** Mask for registered callbacks. */
+ volatile uint16_t registered_callback;
+ /** Mask for enabled callbacks. */
+ volatile uint16_t enabled_callback;
+# endif
+};
+#endif
+
+/**
+ * \brief RTC Count configuration structure.
+ *
+ * Configuration structure for the RTC instance. This structure should
+ * be initialized using the \ref rtc_count_get_config_defaults() before any
+ * user configurations are set.
+ */
+struct rtc_count_config {
+ /** Input clock prescaler for the RTC module. */
+ enum rtc_count_prescaler prescaler;
+ /** Select the operation mode of the RTC.*/
+ enum rtc_count_mode mode;
+ /** If true, clears the counter value on compare match. Only available
+ * whilst running in 32-bit mode. */
+ bool clear_on_match;
+#ifdef FEATURE_RTC_CONTINUOUSLY_UPDATED
+ /** Continuously update the counter value so no synchronization is
+ * needed for reading. */
+ bool continuously_update;
+#endif
+ /** Array of Compare values. Not all Compare values are available in 32-bit
+ * mode. */
+ uint32_t compare_values[RTC_NUM_OF_COMP16];
+};
+
+
+/**
+ * \name Configuration and Initialization
+ * @{
+ */
+
+/**
+ * \brief Gets the RTC default configurations.
+ *
+ * Initializes the configuration structure to default values. This
+ * function should be called at the start of any RTC initialization.
+ *
+ * The default configuration is as follows:
+ * - Input clock divided by a factor of 1024
+ * - RTC in 32-bit mode
+ * - Clear on compare match off
+ * - Continuously sync count register off
+ * - No event source on
+ * - All compare values equal 0
+ *
+ * \param[out] config Configuration structure to be initialized to default
+ * values.
+ */
+static inline void rtc_count_get_config_defaults(
+ struct rtc_count_config *const config)
+{
+ /* Sanity check argument */
+ Assert(config);
+
+ /* Set default into configuration structure */
+ config->prescaler = RTC_COUNT_PRESCALER_DIV_1024;
+ config->mode = RTC_COUNT_MODE_32BIT;
+ config->clear_on_match = false;
+
+#ifdef FEATURE_RTC_CONTINUOUSLY_UPDATED
+ config->continuously_update = false;
+#endif
+
+ for (uint8_t i = 0; i < RTC_NUM_OF_COMP16; i++) {
+ config->compare_values[i] = 0;
+ }
+}
+
+void rtc_count_reset(struct rtc_module *const module);
+void rtc_count_enable(struct rtc_module *const module);
+void rtc_count_disable(struct rtc_module *const module);
+
+#if (RTC_INST_NUM > 1) && !defined(__DOXYGEN__)
+/**
+ * \internal Find the index of given RTC module instance.
+ *
+ * \param[in] RTC module instance pointer
+ *
+ * \return Index of the given AC module instance.
+ */
+uint8_t _rtc_get_inst_index(
+ Rtc *const hw)
+{
+ /* List of available RTC modules. */
+ static Rtc *const rtc_modules[RTC_INST_NUM] = RTC_INSTS;
+
+ /* Find index for RTC instance. */
+ for (uint32_t i = 0; i < RTC_INST_NUM; i++) {
+ if (hw == rtc_modules[i]) {
+ return i;
+ }
+ }
+
+ /* Invalid data given. */
+ Assert(false);
+ return 0;
+}
+#endif /* (RTC_INST_NUM > 1) && !defined(__DOXYGEN__) */
+
+enum status_code rtc_count_init(
+ struct rtc_module *const module,
+ Rtc *const hw,
+ const struct rtc_count_config *const config);
+
+enum status_code rtc_count_frequency_correction(
+ struct rtc_module *const module,
+ const int8_t value);
+
+/** @} */
+
+/** \name Count and Compare Value Management
+ * @{
+ */
+enum status_code rtc_count_set_count(
+ struct rtc_module *const module,
+ const uint32_t count_value);
+
+uint32_t rtc_count_get_count(struct rtc_module *const module);
+
+enum status_code rtc_count_set_compare(
+ struct rtc_module *const module,
+ const uint32_t comp_value,
+ const enum rtc_count_compare comp_index);
+
+enum status_code rtc_count_get_compare(
+ struct rtc_module *const module,
+ uint32_t *const comp_value,
+ const enum rtc_count_compare comp_index);
+
+enum status_code rtc_count_set_period(
+ struct rtc_module *const module,
+ uint16_t period_value);
+
+enum status_code rtc_count_get_period(
+ struct rtc_module *const module,
+ uint16_t *const period_value);
+
+/** @} */
+
+
+/** \name Status Management
+ * @{
+ */
+
+/**
+ * \brief Check if an RTC overflow has occurred.
+ *
+ * Checks the overflow flag in the RTC. The flag is set when there
+ * is an overflow in the clock.
+ *
+ * \param[in,out] module RTC hardware module
+ *
+ * \return Overflow state of the RTC module.
+ *
+ * \retval true If the RTC count value has overflowed
+ * \retval false If the RTC count value has not overflowed
+ */
+
+static inline bool rtc_count_is_overflow(struct rtc_module *const module)
+{
+ /* Sanity check arguments */
+ Assert(module);
+ Assert(module->hw);
+
+ Rtc *const rtc_module = module->hw;
+
+ /* Return status of flag */
+ return (rtc_module->MODE0.INTFLAG.reg & RTC_MODE0_INTFLAG_OVF);
+}
+
+/**
+ * \brief Clears the RTC overflow flag.
+ *
+ * Clears the RTC module counter overflow flag, so that new overflow conditions
+ * can be detected.
+ *
+ * \param[in,out] module RTC hardware module
+ */
+static inline void rtc_count_clear_overflow(struct rtc_module *const module)
+{
+ /* Sanity check arguments */
+ Assert(module);
+ Assert(module->hw);
+
+ Rtc *const rtc_module = module->hw;
+
+ /* Clear OVF flag */
+ rtc_module->MODE0.INTFLAG.reg = RTC_MODE0_INTFLAG_OVF;
+}
+
+#ifdef FEATURE_RTC_PERIODIC_INT
+/**
+ * \brief Check if an RTC periodic interval interrupt has occurred.
+ *
+ * Checks the periodic interval flag in the RTC.
+ *
+ * \param[in,out] module RTC hardware module
+ * \param[in] n RTC periodic interval interrupt
+ *
+ * \return periodic interval interrupt state of the RTC module.
+ *
+ * \retval true RTC periodic interval interrupt occurs
+ * \retval false RTC periodic interval interrupt dosen't occurs
+ */
+static inline bool rtc_count_is_periodic_interval(struct rtc_module *const module,
+ enum rtc_count_periodic_interval n)
+{
+ /* Sanity check arguments */
+ Assert(module);
+ Assert(module->hw);
+
+ Rtc *const rtc_module = module->hw;
+
+ /* Return status of flag */
+ return (rtc_module->MODE0.INTFLAG.reg & RTC_MODE0_INTFLAG_PER(1 << n));
+}
+
+/**
+ * \brief Clears the RTC periodic interval flag.
+ *
+ * Clears the RTC module counter periodic interval flag, so that new periodic
+ * interval conditions can be detected.
+ *
+ * \param[in,out] module RTC hardware module
+ * \param[in] n RTC periodic interval interrupt
+ */
+static inline void rtc_count_clear_periodic_interval(struct rtc_module *const module,
+ enum rtc_count_periodic_interval n)
+{
+ /* Sanity check arguments */
+ Assert(module);
+ Assert(module->hw);
+
+ Rtc *const rtc_module = module->hw;
+
+ /* Clear periodic interval flag */
+ rtc_module->MODE0.INTFLAG.reg = RTC_MODE0_INTFLAG_PER(1 << n);
+}
+#endif
+bool rtc_count_is_compare_match(
+ struct rtc_module *const module,
+ const enum rtc_count_compare comp_index);
+
+enum status_code rtc_count_clear_compare_match(
+ struct rtc_module *const module,
+ const enum rtc_count_compare comp_index);
+
+/** @} */
+
+
+/**
+ * \name Event Management
+ * @{
+ */
+
+/**
+ * \brief Enables a RTC event output.
+ *
+ * Enables one or more output events from the RTC module. See
+ * \ref rtc_count_events for a list of events this module supports.
+ *
+ * \note Events cannot be altered while the module is enabled.
+ *
+ * \param[in,out] module RTC hardware module
+ * \param[in] events Struct containing flags of events to enable
+ */
+static inline void rtc_count_enable_events(
+ struct rtc_module *const module,
+ struct rtc_count_events *const events)
+{
+ /* Sanity check arguments */
+ Assert(module);
+ Assert(module->hw);
+
+ Rtc *const rtc_module = module->hw;
+
+ uint32_t event_mask = 0;
+
+ /* Check if the user has requested an overflow event. */
+ if (events->generate_event_on_overflow) {
+ event_mask |= RTC_MODE0_EVCTRL_OVFEO;
+ }
+
+ /* Check if the user has requested any compare events. */
+ for (uint8_t i = 0; i < RTC_NUM_OF_COMP16; i++) {
+ if (events->generate_event_on_compare[i]) {
+ event_mask |= RTC_MODE0_EVCTRL_CMPEO(1 << i);
+ }
+ }
+
+ /* Check if the user has requested any periodic events. */
+ for (uint8_t i = 0; i < 8; i++) {
+ if (events->generate_event_on_periodic[i]) {
+ event_mask |= RTC_MODE0_EVCTRL_PEREO(1 << i);
+ }
+ }
+
+ /* Enable given event(s). */
+ rtc_module->MODE0.EVCTRL.reg |= event_mask;
+}
+
+/**
+ * \brief Disables a RTC event output.
+ *
+ * Disabled one or more output events from the RTC module. See
+ * \ref rtc_count_events for a list of events this module supports.
+ *
+ * \note Events cannot be altered while the module is enabled.
+ *
+ * \param[in,out] module RTC hardware module
+ * \param[in] events Struct containing flags of events to disable
+ */
+static inline void rtc_count_disable_events(
+ struct rtc_module *const module,
+ struct rtc_count_events *const events)
+{
+ /* Sanity check arguments */
+ Assert(module);
+ Assert(module->hw);
+
+ Rtc *const rtc_module = module->hw;
+
+ uint32_t event_mask = 0;
+
+ /* Check if the user has requested an overflow event. */
+ if (events->generate_event_on_overflow) {
+ event_mask |= RTC_MODE0_EVCTRL_OVFEO;
+ }
+
+ /* Check if the user has requested any compare events. */
+ for (uint8_t i = 0; i < RTC_NUM_OF_COMP16; i++) {
+ if (events->generate_event_on_compare[i]) {
+ event_mask |= RTC_MODE0_EVCTRL_CMPEO(1 << i);
+ }
+ }
+
+ /* Check if the user has requested any periodic events. */
+ for (uint8_t i = 0; i < 8; i++) {
+ if (events->generate_event_on_periodic[i]) {
+ event_mask |= RTC_MODE0_EVCTRL_PEREO(1 << i);
+ }
+ }
+
+ /* Disable given event(s). */
+ rtc_module->MODE0.EVCTRL.reg &= ~event_mask;
+}
+
+/** @} */
+
+#ifdef FEATURE_RTC_GENERAL_PURPOSE_REG
+/**
+ * \name RTC General Purpose Registers
+ * @{
+ */
+
+/**
+ * \brief Write a value into general purpose register.
+ *
+ * \param[in] module Pointer to the software instance struct
+ * \param[in] n General purpose type
+ * \param[in] index General purpose register index (0..3)
+ *
+ */
+static inline void rtc_write_general_purpose_reg(
+ struct rtc_module *const module,
+ const uint8_t index,
+ uint32_t value)
+{
+ /* Sanity check arguments */
+ Assert(module);
+ Assert(module->hw);
+ Assert(index <= 3);
+
+ Rtc *const rtc_module = module->hw;
+
+ rtc_module->MODE0.GP[index].reg = value;
+}
+
+/**
+ * \brief Read the value from general purpose register.
+ *
+ * \param[in] module Pointer to the software instance struct
+ * \param[in] index General purpose register index (0..3)
+ *
+ * \retval Value of general purpose register
+ */
+static inline uint32_t rtc_read_general_purpose_reg(
+ struct rtc_module *const module,
+ const uint8_t index)
+{
+ /* Sanity check arguments */
+ Assert(module);
+ Assert(module->hw);
+ Assert(index <= 3);
+
+ Rtc *const rtc_module = module->hw;
+
+ return rtc_module->MODE0.GP[index].reg;
+}
+
+/** @} */
+#endif
+
+/** @} */
+
+#ifdef __cplusplus
+}
+#endif
+
+/**
+ * \page asfdoc_sam0_rtc_count_extra Extra Information for RTC COUNT Driver
+ *
+ * \section asfdoc_sam0_rtc_count_extra_acronyms Acronyms
+ * Below is a table listing the acronyms used in this module, along with their
+ * intended meanings.
+ *
+ * <table>
+ * <tr>
+ * <th>Acronym</td>
+ * <th>Description</td>
+ * </tr>
+ * <tr>
+ * <td>RTC</td>
+ * <td>Real Time Counter</td>
+ * </tr>
+ * <tr>
+ * <td>PPM</td>
+ * <td>Part Per Million</td>
+ * </tr>
+ * <tr>
+ * <td>RC</td>
+ * <td>Resistor/Capacitor</td>
+ * </tr>
+ * </table>
+ *
+ *
+ * \section asfdoc_sam0_rtc_count_extra_dependencies Dependencies
+ * This driver has the following dependencies:
+ *
+ * - None
+ *
+ *
+ * \section asfdoc_sam0_rtc_count_extra_errata Errata
+ * There are no errata related to this driver.
+ *
+ *
+ * \section asfdoc_sam0_rtc_count_extra_history Module History
+ * An overview of the module history is presented in the table below, with
+ * details on the enhancements and fixes made to the module since its first
+ * release. The current version of this corresponds to the newest version in
+ * the table.
+ *
+ * <table>
+ * <tr>
+ * <th>Changelog</th>
+ * </tr>
+ * <tr>
+ * <td>Added support for SAML21</td>
+ * </tr>
+ * <tr>
+ * <td>
+ * Added support for SAMD21 and added driver instance parameter to all
+ * API function calls, except get_config_defaults
+ * </td>
+ * </tr>
+ * <tr>
+ * <td>Updated initialization function to also enable the digital interface
+ * clock to the module if it is disabled</td>
+ * </tr>
+ * <tr>
+ * <td>Initial Release</td>
+ * </tr>
+ * </table>
+ */
+
+/**
+ * \page asfdoc_sam0_rtc_count_exqsg Examples for RTC (COUNT) Driver
+ *
+ * This is a list of the available Quick Start guides (QSGs) and example
+ * applications for \ref asfdoc_sam0_rtc_count_group. QSGs are simple
+ * examples with step-by-step instructions to configure and use this driver in a
+ * selection of use cases. Note that QSGs can be compiled as a standalone
+ * application or be added to the user application.
+ *
+ * - \subpage asfdoc_sam0_rtc_count_basic_use_case
+ * \if RTC_COUNT_CALLBACK_MODE
+ * - \subpage asfdoc_sam0_rtc_count_callback_use_case
+ * \endif
+ *
+ * \page asfdoc_sam0_rtc_count_document_revision_history Document Revision History
+ *
+ * <table>
+ * <tr>
+ * <th>Doc. Rev.</td>
+ * <th>Date</td>
+ * <th>Comments</td>
+ * </tr>
+ * <tr>
+ * <td>E</td>
+ * <td>11/2014</td>
+ * <td>Added support for SAML21.</td>
+ * </tr>
+ * <tr>
+ * <td>D</td>
+ * <td>12/2014</td>
+ * <td>Added support for SAMR21 and SAMD10/D11.</td>
+ * </tr>
+ * <tr>
+ * <td>C</td>
+ * <td>01/2014</td>
+ * <td>Added support for SAMD21.</td>
+ * </tr>
+ * <tr>
+ * <td>B</td>
+ * <td>06/2013</td>
+ * <td>Added additional documentation on the event system. Corrected
+ * documentation typos.</td>
+ * </tr>
+ * <tr>
+ * <td>A</td>
+ * <td>06/2013</td>
+ * <td>Initial release</td>
+ * </tr>
+ * </table>
+ */
+
+#endif /* RTC_COUNT_H_INCLUDED */
--- a/targets/hal/TARGET_Atmel/TARGET_SAM21/drivers/rtc/rtc_sam_d_r/rtc_calendar.c Wed Jul 15 08:15:08 2015 +0100
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,653 +0,0 @@
-/**
- * \file
- *
- * \brief SAM RTC Driver (Calendar Mode)
- *
- * Copyright (C) 2012-2014 Atmel Corporation. All rights reserved.
- *
- * \asf_license_start
- *
- * \page License
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- *
- * 1. Redistributions of source code must retain the above copyright notice,
- * this list of conditions and the following disclaimer.
- *
- * 2. Redistributions in binary form must reproduce the above copyright notice,
- * this list of conditions and the following disclaimer in the documentation
- * and/or other materials provided with the distribution.
- *
- * 3. The name of Atmel may not be used to endorse or promote products derived
- * from this software without specific prior written permission.
- *
- * 4. This software may only be redistributed and used in connection with an
- * Atmel microcontroller product.
- *
- * THIS SOFTWARE IS PROVIDED BY ATMEL "AS IS" AND ANY EXPRESS OR IMPLIED
- * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
- * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT ARE
- * EXPRESSLY AND SPECIFICALLY DISCLAIMED. IN NO EVENT SHALL ATMEL BE LIABLE FOR
- * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
- * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
- * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- * POSSIBILITY OF SUCH DAMAGE.
- *
- * \asf_license_stop
- *
- */
-/**
-* Support and FAQ: visit <a href="http://www.atmel.com/design-support/">Atmel Support</a>
-*/
-#include "rtc_calendar.h"
-#include <gclk.h>
-
-#if !defined(__DOXYGEN__)
-struct rtc_module *_rtc_instance[RTC_INST_NUM];
-#endif
-
-/**
- * \brief Determines if the hardware module(s) are currently synchronizing to the bus.
- *
- * Checks to see if the underlying hardware peripheral module(s) are currently
- * synchronizing across multiple clock domains to the hardware bus, This
- * function can be used to delay further operations on a module until such time
- * that it is ready, to prevent blocking delays for synchronization in the
- * user application.
- *
- * \param[in] module RTC hardware module
- *
- * \return Synchronization status of the underlying hardware module(s).
- *
- * \retval true if the module has completed synchronization
- * \retval false if the module synchronization is ongoing
- */
-static inline bool rtc_calendar_is_syncing(struct rtc_module *const module)
-{
- /* Sanity check arguments */
- Assert(module);
- Assert(module->hw);
-
- Rtc *const rtc_module = module->hw;
-
- if (rtc_module->MODE2.STATUS.reg & RTC_STATUS_SYNCBUSY) {
- return true;
- }
-
- return false;
-}
-
-/**
- * \brief Enables the RTC module.
- *
- * Enables the RTC module once it has been configured, ready for use. Most
- * module configuration parameters cannot be altered while the module is enabled.
- *
- * \param[in,out] module Pointer to the software instance struct
- */
-void rtc_calendar_enable(struct rtc_module *const module)
-{
- /* Sanity check arguments */
- Assert(module);
- Assert(module->hw);
-
- Rtc *const rtc_module = module->hw;
-
-#if RTC_CALENDAR_ASYNC == true
- system_interrupt_enable(SYSTEM_INTERRUPT_MODULE_RTC);
-#endif
-
- while (rtc_calendar_is_syncing(module)) {
- /* Wait for synchronization */
- }
-
- /* Enable RTC module. */
- rtc_module->MODE2.CTRL.reg |= RTC_MODE2_CTRL_ENABLE;
-}
-
-/**
- * \brief Disables the RTC module.
- *
- * Disables the RTC module.
- *
- * \param[in,out] module Pointer to the software instance struct
- */
-void rtc_calendar_disable(struct rtc_module *const module)
-{
- /* Sanity check arguments */
- Assert(module);
- Assert(module->hw);
-
- Rtc *const rtc_module = module->hw;
-
-#if RTC_CALENDAR_ASYNC == true
- system_interrupt_disable(SYSTEM_INTERRUPT_MODULE_RTC);
-#endif
-
- while (rtc_calendar_is_syncing(module)) {
- /* Wait for synchronization */
- }
-
- /* Disable RTC module. */
- rtc_module->MODE2.CTRL.reg &= ~RTC_MODE2_CTRL_ENABLE;
-}
-
-/**
- * \brief Resets the RTC module
- * Resets the RTC module to hardware defaults.
- *
- * \param[in,out] module Pointer to the software instance struct
- */
-void rtc_calendar_reset(struct rtc_module *const module)
-{
- /* Sanity check arguments */
- Assert(module);
- Assert(module->hw);
-
- Rtc *const rtc_module = module->hw;
-
- /* Disable module before reset. */
- rtc_calendar_disable(module);
-
-#if RTC_CALENDAR_ASYNC == true
- module->registered_callback = 0;
- module->enabled_callback = 0;
-#endif
-
- while (rtc_calendar_is_syncing(module)) {
- /* Wait for synchronization */
- }
-
- /* Initiate software reset. */
- rtc_module->MODE2.CTRL.reg |= RTC_MODE2_CTRL_SWRST;
-}
-
-/**
- * \internal Convert time structure to register_value.
- */
-static uint32_t _rtc_calendar_time_to_register_value(
- struct rtc_module *const module,
- const struct rtc_calendar_time *const time)
-{
- /* Initialize return value. */
- uint32_t register_value;
-
- /* Set year value into register_value minus initial year. */
- register_value = (time->year - module->year_init_value) <<
- RTC_MODE2_CLOCK_YEAR_Pos;
-
- /* Set month value into register_value. */
- register_value |= (time->month << RTC_MODE2_CLOCK_MONTH_Pos);
-
- /* Set day value into register_value. */
- register_value |= (time->day << RTC_MODE2_CLOCK_DAY_Pos);
-
- /* Set 24 hour value into register_value. */
- register_value |= (time->hour << RTC_MODE2_CLOCK_HOUR_Pos);
-
- /* Check if 24 h clock and set pm flag. */
- if (!(module->clock_24h) && (time->pm)) {
- /* Set pm flag. */
- register_value |= RTC_MODE2_CLOCK_HOUR_PM;
- }
-
- /* Set minute value into register_value. */
- register_value |= (time->minute << RTC_MODE2_CLOCK_MINUTE_Pos);
-
- /* Set second value into register_value. */
- register_value |= (time->second << RTC_MODE2_CLOCK_SECOND_Pos);
-
- return register_value;
-}
-
-/**
- * \internal Convert register_value to time structure.
- */
-static void _rtc_calendar_register_value_to_time(
- struct rtc_module *const module,
- const uint32_t register_value,
- struct rtc_calendar_time *const time)
-{
- /* Set year plus value of initial year. */
- time->year = ((register_value & RTC_MODE2_CLOCK_YEAR_Msk) >>
- RTC_MODE2_CLOCK_YEAR_Pos) + module->year_init_value;
-
- /* Set month value into time struct. */
- time->month = ((register_value & RTC_MODE2_CLOCK_MONTH_Msk) >>
- RTC_MODE2_CLOCK_MONTH_Pos);
-
- /* Set day value into time struct. */
- time->day = ((register_value & RTC_MODE2_CLOCK_DAY_Msk) >>
- RTC_MODE2_CLOCK_DAY_Pos);
-
- if (module->clock_24h) {
- /* Set hour in 24h mode. */
- time->hour = ((register_value & RTC_MODE2_CLOCK_HOUR_Msk) >>
- RTC_MODE2_CLOCK_HOUR_Pos);
- } else {
- /* Set hour in 12h mode. */
- time->hour = ((register_value &
- (RTC_MODE2_CLOCK_HOUR_Msk & ~RTC_MODE2_CLOCK_HOUR_PM)) >>
- RTC_MODE2_CLOCK_HOUR_Pos);
-
- /* Set pm flag */
- time->pm = ((register_value & RTC_MODE2_CLOCK_HOUR_PM) != 0);
- }
-
- /* Set minute value into time struct. */
- time->minute = ((register_value & RTC_MODE2_CLOCK_MINUTE_Msk) >>
- RTC_MODE2_CLOCK_MINUTE_Pos);
-
- /* Set second value into time struct. */
- time->second = ((register_value & RTC_MODE2_CLOCK_SECOND_Msk) >>
- RTC_MODE2_CLOCK_SECOND_Pos);
-}
-
-/**
- * \internal Applies the given configuration.
- *
- * Set the configurations given from the configuration structure to the
- * hardware module.
- *
- * \param[in,out] module Pointer to the software instance struct
- * \param[in] config Pointer to the configuration structure.
- */
-static void _rtc_calendar_set_config(
- struct rtc_module *const module,
- const struct rtc_calendar_config *const config)
-{
- /* Sanity check arguments */
- Assert(module);
- Assert(module->hw);
-
- Rtc *const rtc_module = module->hw;
-
- /* Set up temporary register value. */
- uint16_t tmp_reg;
-
- /* Set to calendar mode and set the prescaler. */
- tmp_reg = RTC_MODE2_CTRL_MODE(2) | config->prescaler;
-
- /* Check clock mode. */
- if (!(config->clock_24h)) {
- /* Set clock mode 12h. */
- tmp_reg |= RTC_MODE2_CTRL_CLKREP;
- }
-
- /* Check for clear on compare match. */
- if (config->clear_on_match) {
- /* Set clear on compare match. */
- tmp_reg |= RTC_MODE2_CTRL_MATCHCLR;
- }
-
- /* Set temporary value to register. */
- rtc_module->MODE2.CTRL.reg = tmp_reg;
-
- /* Check to set continuously clock read update mode. */
- if (config->continuously_update) {
- /* Set continuously mode. */
- rtc_module->MODE2.READREQ.reg |= RTC_READREQ_RCONT;
- }
-
- /* Set alarm time registers. */
- for (uint8_t i = 0; i < RTC_NUM_OF_ALARMS; i++) {
- rtc_calendar_set_alarm(module, &(config->alarm[i]), (enum rtc_calendar_alarm)i);
- }
-}
-
-/**
- * \brief Initializes the RTC module with given configurations.
- *
- * Initializes the module, setting up all given configurations to provide
- * the desired functionality of the RTC.
- *
- * \param[out] module Pointer to the software instance struct
- * \param[in] hw Pointer to hardware instance
- * \param[in] config Pointer to the configuration structure.
- */
-void rtc_calendar_init(
- struct rtc_module *const module,
- Rtc *const hw,
- const struct rtc_calendar_config *const config)
-{
- /* Sanity check arguments */
- Assert(module);
- Assert(hw);
- Assert(config);
-
- /* Initialize device instance */
- module->hw = hw;
-
- /* Turn on the digital interface clock */
- system_apb_clock_set_mask(SYSTEM_CLOCK_APB_APBA, PM_APBAMASK_RTC);
-
- /* Set up GCLK */
- struct system_gclk_chan_config gclk_chan_conf;
- system_gclk_chan_get_config_defaults(&gclk_chan_conf);
- gclk_chan_conf.source_generator = GCLK_GENERATOR_2;
- system_gclk_chan_set_config(RTC_GCLK_ID, &gclk_chan_conf);
- system_gclk_chan_enable(RTC_GCLK_ID);
-
- /* Reset module to hardware defaults. */
- rtc_calendar_reset(module);
-
- /* Save conf_struct internally for continued use. */
- module->clock_24h = config->clock_24h;
- module->continuously_update = config->continuously_update;
- module->year_init_value = config->year_init_value;
-
-#if (RTC_INST_NUM == 1)
- _rtc_instance[0] = module;
-#else
- /* Register this instance for callbacks*/
- _rtc_instance[_rtc_get_inst_index(hw)] = module;
-#endif
-
- /* Set config. */
- _rtc_calendar_set_config(module, config);
-}
-
-/**
- * \brief Swaps between 12h and 24h clock mode.
- *
- * Swaps the current RTC time mode:
- * - If currently in 12h mode, it will swap to 24h
- * - If currently in 24h mode, it will swap to 12h
- *
- * \note This will not change setting in user's configuration structure.
- *
- * \param[in, out] module Pointer to the software instance struct
- */
-void rtc_calendar_swap_time_mode(struct rtc_module *const module)
-{
- /* Sanity check arguments */
- Assert(module);
- Assert(module->hw);
-
- Rtc *const rtc_module = module->hw;
-
- /* Initialize time structure. */
- struct rtc_calendar_time time;
- struct rtc_calendar_alarm_time alarm;
-
- /* Get current time. */
- rtc_calendar_get_time(module, &time);
-
- /* Check current mode. */
- if (module->clock_24h) {
- /* Set pm flag. */
- time.pm = (uint8_t)(time.hour / 12);
-
- /* Set 12h clock hour value. */
- time.hour = time.hour % 12;
- if (time.hour == 0) {
- time.hour = 12;
- }
-
- /* Update alarms */
- for (uint8_t i = 0; i < RTC_NUM_OF_ALARMS; i++) {
- rtc_calendar_get_alarm(module, &alarm, (enum rtc_calendar_alarm)i);
- alarm.time.pm = (uint8_t)(alarm.time.hour / 12);
- alarm.time.hour = alarm.time.hour % 12;
- if (alarm.time.hour == 0) {
- alarm.time.hour = 12;
- }
- module->clock_24h = false;
- rtc_calendar_set_alarm(module, &alarm, (enum rtc_calendar_alarm)i);
- module->clock_24h = true;
- }
-
- /* Change value in configuration structure. */
- module->clock_24h = false;
- } else {
- /* Set hour value based on pm flag. */
- if (time.pm == 1) {
- time.hour = time.hour + 12;
-
- time.pm = 0;
- } else if (time.hour == 12) {
- time.hour = 0;
- }
-
- /* Update alarms */
- for (uint8_t i = 0; i < RTC_NUM_OF_ALARMS; i++) {
- rtc_calendar_get_alarm(module, &alarm, (enum rtc_calendar_alarm)i);
- if (alarm.time.pm == 1) {
- alarm.time.hour = alarm.time.hour + 12;
- alarm.time.pm = 0;
- module->clock_24h = true;
- rtc_calendar_set_alarm(module, &alarm, (enum rtc_calendar_alarm)i);
- module->clock_24h = false;
- } else if (alarm.time.hour == 12) {
- alarm.time.hour = 0;
- }
- }
-
- /* Change value in configuration structure. */
- module->clock_24h = true;
- }
-
- /* Disable RTC so new configuration can be set. */
- rtc_calendar_disable(module);
-
- /* Toggle mode. */
- rtc_module->MODE2.CTRL.reg ^= RTC_MODE2_CTRL_CLKREP;
-
- /* Enable RTC. */
- rtc_calendar_enable(module);
-
- /* Set new time format in CLOCK register. */
- rtc_calendar_set_time(module, &time);
-}
-
-/**
- * \brief Set the current calendar time to desired time.
- *
- * Sets the time provided to the calendar.
- *
- * \param[in, out] module Pointer to the software instance struct
- * \param[in] time The time to set in the calendar.
- */
-void rtc_calendar_set_time(
- struct rtc_module *const module,
- const struct rtc_calendar_time *const time)
-{
- /* Sanity check arguments */
- Assert(module);
- Assert(module->hw);
-
- Rtc *const rtc_module = module->hw;
-
- uint32_t register_value = _rtc_calendar_time_to_register_value(module, time);
-
- while (rtc_calendar_is_syncing(module)) {
- /* Wait for synchronization */
- }
-
- /* Write value to register. */
- rtc_module->MODE2.CLOCK.reg = register_value;
-}
-
-/**
- * \brief Get the current calendar value.
- *
- * Retrieves the current time of the calendar.
- *
- * \param[in, out] module Pointer to the software instance struct
- * \param[out] time Pointer to value that will be filled with current time.
- */
-void rtc_calendar_get_time(
- struct rtc_module *const module,
- struct rtc_calendar_time *const time)
-{
- /* Sanity check arguments */
- Assert(module);
- Assert(module->hw);
-
- Rtc *const rtc_module = module->hw;
-
- /* Change of read method based on value of continuously_update value in
- * the configuration structure. */
- if (!(module->continuously_update)) {
- /* Request read on CLOCK register. */
- rtc_module->MODE2.READREQ.reg = RTC_READREQ_RREQ;
-
- while (rtc_calendar_is_syncing(module)) {
- /* Wait for synchronization */
- }
- }
-
- /* Read value. */
- uint32_t register_value = rtc_module->MODE2.CLOCK.reg;
-
- /* Convert value to time structure. */
- _rtc_calendar_register_value_to_time(module, register_value, time);
-}
-
-/**
- * \brief Set the alarm time for the specified alarm.
- *
- * Sets the time and mask specified to the requested alarm.
- *
- * \param[in, out] module Pointer to the software instance struct
- * \param[in] alarm The alarm struct to set the alarm with.
- * \param[in] alarm_index The index of the alarm to set.
- *
- * \return Status of setting alarm.
- * \retval STATUS_OK If alarm was set correctly.
- * \retval STATUS_ERR_INVALID_ARG If invalid argument(s) were provided.
- */
-enum status_code rtc_calendar_set_alarm(
- struct rtc_module *const module,
- const struct rtc_calendar_alarm_time *const alarm,
- const enum rtc_calendar_alarm alarm_index)
-{
- /* Sanity check arguments */
- Assert(module);
- Assert(module->hw);
-
- Rtc *const rtc_module = module->hw;
-
- /* Sanity check. */
- if ((uint32_t)alarm_index > RTC_NUM_OF_ALARMS) {
- return STATUS_ERR_INVALID_ARG;
- }
-
- /* Get register_value from time. */
- uint32_t register_value = _rtc_calendar_time_to_register_value(module, &(alarm->time));
-
- while (rtc_calendar_is_syncing(module)) {
- /* Wait for synchronization */
- }
-
- /* Set alarm value. */
- rtc_module->MODE2.Mode2Alarm[alarm_index].ALARM.reg = register_value;
-
- /* Set alarm mask */
- rtc_module->MODE2.Mode2Alarm[alarm_index].MASK.reg = alarm->mask;
-
- return STATUS_OK;
-}
-
-/**
- * \brief Get the current alarm time of specified alarm.
- *
- * Retrieves the current alarm time for the alarm specified.
- *
- * \param[in, out] module Pointer to the software instance struct
- * \param[out] alarm Pointer to the struct that will be filled with alarm
- * time and mask of the specified alarm.
- * \param[in] alarm_index Index of alarm to get alarm time from.
- *
- * \return Status of getting alarm.
- * \retval STATUS_OK If alarm was read correctly.
- * \retval STATUS_ERR_INVALID_ARG If invalid argument(s) were provided.
- */
-enum status_code rtc_calendar_get_alarm(
- struct rtc_module *const module,
- struct rtc_calendar_alarm_time *const alarm,
- const enum rtc_calendar_alarm alarm_index)
-{
- /* Sanity check arguments */
- Assert(module);
- Assert(module->hw);
-
- Rtc *const rtc_module = module->hw;
-
- /* Sanity check. */
- if ((uint32_t)alarm_index > RTC_NUM_OF_ALARMS) {
- return STATUS_ERR_INVALID_ARG;
- }
-
- /* Read alarm value. */
- uint32_t register_value =
- rtc_module->MODE2.Mode2Alarm[alarm_index].ALARM.reg;
-
- /* Convert to time structure. */
- _rtc_calendar_register_value_to_time(module, register_value, &(alarm->time));
-
- /* Read alarm mask */
- alarm->mask = (enum rtc_calendar_alarm_mask)rtc_module->MODE2.Mode2Alarm[alarm_index].MASK.reg;
-
- return STATUS_OK;
-}
-
-/**
- * \brief Calibrate for too-slow or too-fast oscillator.
- *
- * When used, the RTC will compensate for an inaccurate oscillator. The
- * RTC module will add or subtract cycles from the RTC prescaler to adjust the
- * frequency in approximately 1 PPM steps. The provided correction value should
- * be between -127 and 127, allowing for a maximum 127 PPM correction in either
- * direction.
- *
- * If no correction is needed, set value to zero.
- *
- * \note Can only be used when the RTC is operated at 1Hz.
- *
- * \param[in, out] module Pointer to the software instance struct
- * \param[in] value Between -127 and 127 used for the correction.
- *
- * \return Status of the calibration procedure.
- * \retval STATUS_OK If calibration was done correctly.
- * \retval STATUS_ERR_INVALID_ARG If invalid argument(s) were provided.
- */
-enum status_code rtc_calendar_frequency_correction(
- struct rtc_module *const module,
- const int8_t value)
-{
- /* Sanity check arguments */
- Assert(module);
- Assert(module->hw);
-
- Rtc *const rtc_module = module->hw;
-
- /* Check if valid argument. */
- if (abs(value) > 0x7F) {
- /* Value bigger than allowed, return invalid argument. */
- return STATUS_ERR_INVALID_ARG;
- }
-
- uint32_t new_correction_value;
-
- /* Load the new correction value as a positive value, sign added later */
- new_correction_value = abs(value);
-
- /* Convert to positive value and adjust register sign bit. */
- if (value < 0) {
- new_correction_value |= RTC_FREQCORR_SIGN;
- }
-
- while (rtc_calendar_is_syncing(module)) {
- /* Wait for synchronization */
- }
-
- /* Set value. */
- rtc_module->MODE2.FREQCORR.reg = new_correction_value;
-
- return STATUS_OK;
-}
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/targets/hal/TARGET_Atmel/TARGET_SAM21/drivers/rtc/rtc_sam_d_r/rtc_count.c Fri Jul 17 09:15:10 2015 +0100
@@ -0,0 +1,728 @@
+#include "rtc_count.h"
+#include <gclk.h>
+
+#if !defined(__DOXYGEN__)
+struct rtc_module *_rtc_instance[RTC_INST_NUM];
+#endif
+
+/**
+ * \brief Determines if the hardware module(s) are currently synchronizing to the bus.
+ *
+ * Checks to see if the underlying hardware peripheral module(s) are currently
+ * synchronizing across multiple clock domains to the hardware bus, This
+ * function can be used to delay further operations on a module until such time
+ * that it is ready, to prevent blocking delays for synchronization in the
+ * user application.
+ *
+ * \param[in] module RTC hardware module
+ *
+ * \return Synchronization status of the underlying hardware module(s).
+ *
+ * \retval true if the module synchronization is ongoing
+ * \retval false if the module has completed synchronization
+ */
+static bool rtc_count_is_syncing(struct rtc_module *const module)
+{
+ /* Sanity check arguments */
+ Assert(module);
+ Assert(module->hw);
+
+ Rtc *const rtc_module = module->hw;
+
+ if (rtc_module->MODE0.STATUS.reg & RTC_STATUS_SYNCBUSY) {
+ return true;
+ }
+
+ return false;
+}
+
+/**
+ * \brief Enables the RTC module.
+ *
+ * Enables the RTC module once it has been configured, ready for use. Most
+ * module configuration parameters cannot be altered while the module is enabled.
+ *
+ * \param[in,out] module RTC hardware module
+ */
+void rtc_count_enable(struct rtc_module *const module)
+{
+ /* Sanity check arguments */
+ Assert(module);
+ Assert(module->hw);
+
+ Rtc *const rtc_module = module->hw;
+
+#if RTC_COUNT_ASYNC == true
+ system_interrupt_enable(SYSTEM_INTERRUPT_MODULE_RTC);
+#endif
+
+ while (rtc_count_is_syncing(module)) {
+ /* Wait for synchronization */
+ }
+
+ /* Enable RTC module. */
+ rtc_module->MODE0.CTRL.reg |= RTC_MODE0_CTRL_ENABLE;
+}
+
+/**
+ * \brief Disables the RTC module.
+ *
+ * Disables the RTC module.
+ *
+ * \param[in,out] module RTC hardware module
+ */
+void rtc_count_disable(struct rtc_module *const module)
+{
+ /* Sanity check arguments */
+ Assert(module);
+ Assert(module->hw);
+
+ Rtc *const rtc_module = module->hw;
+
+#if RTC_COUNT_ASYNC == true
+ system_interrupt_disable(SYSTEM_INTERRUPT_MODULE_RTC);
+#endif
+
+ while (rtc_count_is_syncing(module)) {
+ /* Wait for synchronization */
+ }
+
+ /* Disable RTC module. */
+ rtc_module->MODE0.CTRL.reg &= ~RTC_MODE0_CTRL_ENABLE;
+}
+
+/**
+ * \brief Resets the RTC module.
+ * Resets the RTC to hardware defaults.
+ *
+ * \param[in,out] module Pointer to the software instance struct
+ */
+void rtc_count_reset(struct rtc_module *const module)
+{
+ /* Sanity check arguments */
+ Assert(module);
+ Assert(module->hw);
+
+ Rtc *const rtc_module = module->hw;
+
+ /* Disable module before reset. */
+ rtc_count_disable(module);
+
+#if RTC_COUNT_ASYNC == true
+ module->registered_callback = 0;
+ module->enabled_callback = 0;
+#endif
+
+ while (rtc_count_is_syncing(module)) {
+ /* Wait for synchronization */
+ }
+
+ /* Initiate software reset. */
+ rtc_module->MODE0.CTRL.reg |= RTC_MODE0_CTRL_SWRST;
+}
+
+/**
+ * \internal Applies the given configuration.
+ *
+ * Sets the configurations given from the configuration structure to the
+ * hardware module.
+ *
+ * \param[in,out] module Pointer to the software instance struct
+ * \param[in] config Pointer to the configuration structure.
+ *
+ * \return Status of the configuration procedure.
+ * \retval STATUS_OK RTC configurations was set successfully.
+ * \retval STATUS_ERR_INVALID_ARG If invalid argument(s) were given.
+ */
+static enum status_code _rtc_count_set_config(
+ struct rtc_module *const module,
+ const struct rtc_count_config *const config)
+{
+ /* Sanity check arguments */
+ Assert(module);
+ Assert(module->hw);
+
+ Rtc *const rtc_module = module->hw;
+
+ rtc_module->MODE0.CTRL.reg = RTC_MODE0_CTRL_MODE(0) | config->prescaler;
+
+ /* Set mode and clear on match if applicable. */
+ switch (config->mode) {
+ case RTC_COUNT_MODE_32BIT:
+ /* Set 32bit mode and clear on match if applicable. */
+ rtc_module->MODE0.CTRL.reg |= RTC_MODE0_CTRL_MODE(0);
+
+ /* Check if clear on compare match should be set. */
+ if (config->clear_on_match) {
+ /* Set clear on match. */
+ rtc_module->MODE0.CTRL.reg |= RTC_MODE0_CTRL_MATCHCLR;
+ }
+ /* Set compare values. */
+ for (uint8_t i = 0; i < RTC_NUM_OF_COMP32; i++) {
+ while (rtc_count_is_syncing(module)) {
+ /* Wait for synchronization */
+ }
+
+ rtc_count_set_compare(module, config->compare_values[i],
+ (enum rtc_count_compare)i);
+ }
+ break;
+
+ case RTC_COUNT_MODE_16BIT:
+ /* Set 16bit mode. */
+ rtc_module->MODE1.CTRL.reg |= RTC_MODE1_CTRL_MODE(1);
+
+ /* Check if match on clear is set, and return invalid
+ * argument if set. */
+ if (config->clear_on_match) {
+ Assert(false);
+ return STATUS_ERR_INVALID_ARG;
+ }
+ /* Set compare values. */
+ for (uint8_t i = 0; i < RTC_NUM_OF_COMP16; i++) {
+ while (rtc_count_is_syncing(module)) {
+ /* Wait for synchronization */
+ }
+
+ rtc_count_set_compare(module, config->compare_values[i],
+ (enum rtc_count_compare)i);
+ }
+ break;
+ default:
+ Assert(false);
+ return STATUS_ERR_INVALID_ARG;
+ }
+
+ /* Check to set continuously clock read update mode. */
+ if (config->continuously_update) {
+ /* Set continuously mode. */
+ rtc_module->MODE0.READREQ.reg |= RTC_READREQ_RCONT;
+ }
+
+ /* Return status OK if everything was configured. */
+ return STATUS_OK;
+}
+
+/**
+ * \brief Initializes the RTC module with given configurations.
+ *
+ * Initializes the module, setting up all given configurations to provide
+ * the desired functionality of the RTC.
+ *
+ * \param[out] module Pointer to the software instance struct
+ * \param[in] hw Pointer to hardware instance
+ * \param[in] config Pointer to the configuration structure.
+ *
+ * \return Status of the initialization procedure.
+ * \retval STATUS_OK If the initialization was run stressfully.
+ * \retval STATUS_ERR_INVALID_ARG If invalid argument(s) were given.
+ */
+enum status_code rtc_count_init(
+ struct rtc_module *const module,
+ Rtc *const hw,
+ const struct rtc_count_config *const config)
+{
+ /* Sanity check arguments */
+ Assert(module);
+ Assert(hw);
+ Assert(config);
+
+ /* Initialize device instance */
+ module->hw = hw;
+
+ /* Turn on the digital interface clock */
+ system_apb_clock_set_mask(SYSTEM_CLOCK_APB_APBA, PM_APBAMASK_RTC);
+
+ /* Set up GCLK */
+ struct system_gclk_chan_config gclk_chan_conf;
+ system_gclk_chan_get_config_defaults(&gclk_chan_conf);
+ gclk_chan_conf.source_generator = GCLK_GENERATOR_2;
+ system_gclk_chan_set_config(RTC_GCLK_ID, &gclk_chan_conf);
+ system_gclk_chan_enable(RTC_GCLK_ID);
+
+ /* Reset module to hardware defaults. */
+ rtc_count_reset(module);
+
+ /* Save conf_struct internally for continued use. */
+ module->mode = config->mode;
+ module->continuously_update = config->continuously_update;
+
+# if (RTC_INST_NUM == 1)
+ _rtc_instance[0] = module;
+# else
+ /* Register this instance for callbacks*/
+ _rtc_instance[_rtc_get_inst_index(hw)] = module;
+# endif
+
+ /* Set config and return status. */
+ return _rtc_count_set_config(module, config);
+}
+
+/**
+ * \brief Set the current count value to desired value.
+ *
+ * Sets the value of the counter to the specified value.
+ *
+ * \param[in,out] module Pointer to the software instance struct
+ * \param[in] count_value The value to be set in count register.
+ *
+ * \return Status of setting the register.
+ * \retval STATUS_OK If everything was executed correctly.
+ * \retval STATUS_ERR_INVALID_ARG If invalid argument(s) were provided.
+ */
+enum status_code rtc_count_set_count(
+ struct rtc_module *const module,
+ const uint32_t count_value)
+{
+ /* Sanity check arguments */
+ Assert(module);
+ Assert(module->hw);
+
+ Rtc *const rtc_module = module->hw;
+
+ while (rtc_count_is_syncing(module)) {
+ /* Wait for synchronization */
+ }
+
+ /* Set count according to mode */
+ switch(module->mode) {
+ case RTC_COUNT_MODE_32BIT:
+ /* Write value to register. */
+ rtc_module->MODE0.COUNT.reg = count_value;
+
+ break;
+
+ case RTC_COUNT_MODE_16BIT:
+ /* Check if 16-bit value is provided. */
+ if(count_value > 0xffff) {
+ return STATUS_ERR_INVALID_ARG;
+ }
+
+ /* Write value to register. */
+ rtc_module->MODE1.COUNT.reg = (uint32_t)count_value;
+
+ break;
+
+ default:
+ Assert(false);
+ return STATUS_ERR_INVALID_ARG;
+ }
+ return STATUS_OK;
+}
+
+/**
+ * \brief Get the current count value.
+ *
+ * \param[in,out] module Pointer to the software instance struct
+ *
+ * Returns the current count value.
+ *
+ * \return The current counter value as a 32-bit unsigned integer.
+ */
+uint32_t rtc_count_get_count(struct rtc_module *const module)
+{
+ /* Sanity check arguments */
+ Assert(module);
+ Assert(module->hw);
+
+ Rtc *const rtc_module = module->hw;
+
+ /* Initialize return value. */
+ uint32_t ret_val;
+
+ /* Change of read method based on value of continuously_update value in
+ * the configuration structure. */
+ if(!(module->continuously_update)) {
+ /* Request read on count register. */
+ rtc_module->MODE0.READREQ.reg = RTC_READREQ_RREQ;
+
+ while (rtc_count_is_syncing(module)) {
+ /* Wait for synchronization */
+ }
+ }
+
+ /* Read value based on mode. */
+ switch (module->mode) {
+ case RTC_COUNT_MODE_32BIT:
+ /* Return count value in 32-bit mode. */
+ ret_val = rtc_module->MODE0.COUNT.reg;
+
+ break;
+
+ case RTC_COUNT_MODE_16BIT:
+ /* Return count value in 16-bit mode. */
+ ret_val = (uint32_t)rtc_module->MODE1.COUNT.reg;
+
+ break;
+
+ default:
+ Assert(false);
+ /* Counter not initialized. Assume counter value 0.*/
+ ret_val = 0;
+ break;
+ }
+
+ return ret_val;
+}
+
+/**
+ * \brief Set the compare value for the specified compare.
+ *
+ * Sets the value specified by the implementer to the requested compare.
+ *
+ * \note Compare 4 and 5 are only available in 16-bit mode.
+ *
+ * \param[in,out] module Pointer to the software instance struct
+ * \param[in] comp_value The value to be written to the compare.
+ * \param[in] comp_index Index of the compare to set.
+ *
+ * \return Status indicating if compare was successfully set.
+ * \retval STATUS_OK If compare was successfully set.
+ * \retval STATUS_ERR_INVALID_ARG If invalid argument(s) were provided.
+ * \retval STATUS_ERR_BAD_FORMAT If the module was not initialized in a mode.
+ */
+enum status_code rtc_count_set_compare(
+ struct rtc_module *const module,
+ const uint32_t comp_value,
+ const enum rtc_count_compare comp_index)
+{
+ /* Sanity check arguments */
+ Assert(module);
+ Assert(module->hw);
+
+ Rtc *const rtc_module = module->hw;
+
+ while (rtc_count_is_syncing(module)) {
+ /* Wait for synchronization */
+ }
+
+ /* Set compare values based on operation mode. */
+ switch (module->mode) {
+ case RTC_COUNT_MODE_32BIT:
+ /* Check sanity of comp_index. */
+ if ((uint32_t)comp_index > RTC_NUM_OF_COMP32) {
+ return STATUS_ERR_INVALID_ARG;
+ }
+
+ /* Set compare value for COMP. */
+ rtc_module->MODE0.COMP[comp_index].reg = comp_value;
+
+ break;
+
+ case RTC_COUNT_MODE_16BIT:
+ /* Check sanity of comp_index. */
+ if ((uint32_t)comp_index > RTC_NUM_OF_COMP16) {
+ return STATUS_ERR_INVALID_ARG;
+ }
+
+ /* Check that 16-bit value is provided. */
+ if (comp_value > 0xffff) {
+ Assert(false);
+ return STATUS_ERR_INVALID_ARG;
+ }
+
+ /* Set compare value for COMP. */
+ rtc_module->MODE1.COMP[comp_index].reg = comp_value & 0xffff;
+
+ break;
+
+ default:
+ Assert(false);
+ return STATUS_ERR_BAD_FORMAT;
+ }
+
+ /* Return status if everything is OK. */
+ return STATUS_OK;
+}
+
+/**
+ * \brief Get the current compare value of specified compare.
+ *
+ * Retrieves the current value of the specified compare.
+ *
+ * \note Compare 4 and 5 are only available in 16-bit mode.
+ *
+ * \param[in,out] module Pointer to the software instance struct
+ * \param[out] comp_value Pointer to 32-bit integer that will be populated with
+ * the current compare value.
+ * \param[in] comp_index Index of compare to check.
+ *
+ * \return Status of the reading procedure.
+ * \retval STATUS_OK If the value was read correctly.
+ * \retval STATUS_ERR_INVALID_ARG If invalid argument(s) were provided.
+ * \retval STATUS_ERR_BAD_FORMAT If the module was not initialized in a mode.
+ */
+enum status_code rtc_count_get_compare(
+ struct rtc_module *const module,
+ uint32_t *const comp_value,
+ const enum rtc_count_compare comp_index)
+{
+ /* Sanity check arguments */
+ Assert(module);
+ Assert(module->hw);
+
+ Rtc *const rtc_module = module->hw;
+
+ switch (module->mode) {
+ case RTC_COUNT_MODE_32BIT:
+ /* Check sanity of comp_index. */
+ if ((uint32_t)comp_index > RTC_NUM_OF_COMP32) {
+ return STATUS_ERR_INVALID_ARG;
+ }
+
+ /* Get compare value for COMP. */
+ *comp_value = rtc_module->MODE0.COMP[comp_index].reg;
+
+ break;
+
+ case RTC_COUNT_MODE_16BIT:
+ /* Check sanity of comp_index. */
+ if ((uint32_t)comp_index > RTC_NUM_OF_COMP16) {
+ return STATUS_ERR_INVALID_ARG;
+ }
+
+ /* Get compare value for COMP. */
+ *comp_value = (uint32_t)rtc_module->MODE1.COMP[comp_index].reg;
+
+ break;
+
+ default:
+ Assert(false);
+ return STATUS_ERR_BAD_FORMAT;
+ }
+ /* Return status showing everything is OK. */
+ return STATUS_OK;
+}
+
+/**
+ * \brief Retrieves the value of period.
+ *
+ * Retrieves the value of the period for the 16-bit mode counter.
+ *
+ * \note Only available in 16-bit mode.
+ *
+ * \param[in,out] module Pointer to the software instance struct
+ * \param[out] period_value Pointer to value for return argument.
+ *
+ * \return Status of getting the period value.
+ * \retval STATUS_OK If the period value was read correctly.
+ * \retval STATUS_ERR_UNSUPPORTED_DEV If incorrect mode was set.
+ */
+enum status_code rtc_count_get_period(
+ struct rtc_module *const module,
+ uint16_t *const period_value)
+{
+ /* Sanity check arguments */
+ Assert(module);
+ Assert(module->hw);
+
+ Rtc *const rtc_module = module->hw;
+
+ /* Check that correct mode is set. */
+ if (module->mode != RTC_COUNT_MODE_16BIT) {
+ return STATUS_ERR_UNSUPPORTED_DEV;
+ }
+
+ /* Returns the value. */
+ *period_value = rtc_module->MODE1.PER.reg;
+
+ return STATUS_OK;
+}
+
+/**
+ * \brief Set the given value to the period.
+ *
+ * Sets the given value to the period.
+ *
+ * \note Only available in 16-bit mode.
+ *
+ * \param[in,out] module Pointer to the software instance struct
+ * \param[in] period_value The value to set to the period.
+ *
+ * \return Status of setting the period value.
+ * \retval STATUS_OK If the period was set correctly.
+ * \retval STATUS_ERR_UNSUPPORTED_DEV If module is not operated in 16-bit mode.
+ */
+enum status_code rtc_count_set_period(
+ struct rtc_module *const module,
+ const uint16_t period_value)
+{
+ /* Sanity check arguments */
+ Assert(module);
+ Assert(module->hw);
+
+ Rtc *const rtc_module = module->hw;
+
+ /* Check that correct mode is set. */
+ if (module->mode != RTC_COUNT_MODE_16BIT) {
+ return STATUS_ERR_UNSUPPORTED_DEV;
+ }
+
+ while (rtc_count_is_syncing(module)) {
+ /* Wait for synchronization */
+ }
+
+ /* Write value to register. */
+ rtc_module->MODE1.PER.reg = period_value;
+
+ return STATUS_OK;
+}
+
+/**
+ * \brief Check if RTC compare match has occurred.
+ *
+ * Checks the compare flag to see if a match has occurred. The compare flag is
+ * set when there is a compare match between counter and the compare.
+ *
+ * \note Compare 4 and 5 are only available in 16-bit mode.
+ *
+ * \param[in,out] module Pointer to the software instance struct
+ * \param[in] comp_index Index of compare to check current flag.
+ */
+bool rtc_count_is_compare_match(
+ struct rtc_module *const module,
+ const enum rtc_count_compare comp_index)
+{
+ /* Sanity check arguments */
+ Assert(module);
+ Assert(module->hw);
+
+ Rtc *const rtc_module = module->hw;
+
+ /* Check sanity. */
+ switch (module->mode) {
+ case RTC_COUNT_MODE_32BIT:
+ /* Check sanity for 32-bit mode. */
+ if (comp_index > RTC_NUM_OF_COMP32) {
+ return false;
+ }
+
+ break;
+
+ case RTC_COUNT_MODE_16BIT:
+ /* Check sanity for 16-bit mode. */
+ if (comp_index > RTC_NUM_OF_COMP16) {
+ return false;
+ }
+
+ break;
+
+ default:
+ Assert(false);
+ return false;
+ }
+
+ /* Set status of INTFLAG as return argument. */
+ return (rtc_module->MODE0.INTFLAG.reg & (1 << comp_index));
+}
+
+/**
+ * \brief Clears RTC compare match flag.
+ *
+ * Clears the compare flag. The compare flag is set when there is a compare
+ * match between the counter and the compare.
+ *
+ * \note Compare 4 and 5 are only available in 16-bit mode.
+ *
+ * \param[in,out] module Pointer to the software instance struct
+ * \param[in] comp_index Index of compare to check current flag.
+ *
+ * \return Status indicating if flag was successfully cleared.
+ * \retval STATUS_OK If flag was successfully cleared.
+ * \retval STATUS_ERR_INVALID_ARG If invalid argument(s) were provided.
+ * \retval STATUS_ERR_BAD_FORMAT If the module was not initialized in a mode.
+ */
+enum status_code rtc_count_clear_compare_match(
+ struct rtc_module *const module,
+ const enum rtc_count_compare comp_index)
+{
+ /* Sanity check arguments */
+ Assert(module);
+ Assert(module->hw);
+
+ Rtc *const rtc_module = module->hw;
+
+ /* Check sanity. */
+ switch (module->mode) {
+ case RTC_COUNT_MODE_32BIT:
+ /* Check sanity for 32-bit mode. */
+ if (comp_index > RTC_NUM_OF_COMP32) {
+ return STATUS_ERR_INVALID_ARG;
+ }
+
+ break;
+
+ case RTC_COUNT_MODE_16BIT:
+ /* Check sanity for 16-bit mode. */
+ if (comp_index > RTC_NUM_OF_COMP16) {
+ return STATUS_ERR_INVALID_ARG;
+ }
+
+ break;
+
+ default:
+ Assert(false);
+ return STATUS_ERR_BAD_FORMAT;
+ }
+
+ /* Clear INTFLAG. */
+ rtc_module->MODE0.INTFLAG.reg = RTC_MODE1_INTFLAG_CMP(1 << comp_index);
+
+ return STATUS_OK;
+}
+
+/**
+ * \brief Calibrate for too-slow or too-fast oscillator.
+ *
+ * When used, the RTC will compensate for an inaccurate oscillator. The
+ * RTC module will add or subtract cycles from the RTC prescaler to adjust the
+ * frequency in approximately 1 PPM steps. The provided correction value should
+ * be between 0 and 127, allowing for a maximum 127 PPM correction.
+ *
+ * If no correction is needed, set value to zero.
+ *
+ * \note Can only be used when the RTC is operated in 1Hz.
+ *
+ * \param[in,out] module Pointer to the software instance struct
+ * \param[in] value Ranging from -127 to 127 used for the correction.
+ *
+ * \return Status of the calibration procedure.
+ * \retval STATUS_OK If calibration was executed correctly.
+ * \retval STATUS_ERR_INVALID_ARG If invalid argument(s) were provided.
+ */
+enum status_code rtc_count_frequency_correction(
+ struct rtc_module *const module,
+ const int8_t value)
+{
+ /* Sanity check arguments */
+ Assert(module);
+ Assert(module->hw);
+
+ Rtc *const rtc_module = module->hw;
+
+ /* Check if valid argument. */
+ if (abs(value) > 0x7F) {
+ /* Value bigger than allowed, return invalid argument. */
+ return STATUS_ERR_INVALID_ARG;
+ }
+
+ uint32_t new_correction_value;
+
+ /* Load the new correction value as a positive value, sign added later */
+ new_correction_value = abs(value);
+
+ /* Convert to positive value and adjust register sign bit. */
+ if (value < 0) {
+ new_correction_value |= RTC_FREQCORR_SIGN;
+ }
+
+ while (rtc_count_is_syncing(module)) {
+ /* Wait for synchronization */
+ }
+
+ /* Set value. */
+ rtc_module->MODE0.FREQCORR.reg = new_correction_value;
+
+ return STATUS_OK;
+}
+
--- a/targets/hal/TARGET_Atmel/TARGET_SAM21/drivers/sercom/i2c/i2c_common.h Wed Jul 15 08:15:08 2015 +0100 +++ b/targets/hal/TARGET_Atmel/TARGET_SAM21/drivers/sercom/i2c/i2c_common.h Fri Jul 17 09:15:10 2015 +0100 @@ -1,48 +1,3 @@ -/** - * \file - * - * \brief SAM SERCOM I2C Common Driver - * - * Copyright (C) 2012-2014 Atmel Corporation. All rights reserved. - * - * \asf_license_start - * - * \page License - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are met: - * - * 1. Redistributions of source code must retain the above copyright notice, - * this list of conditions and the following disclaimer. - * - * 2. Redistributions in binary form must reproduce the above copyright notice, - * this list of conditions and the following disclaimer in the documentation - * and/or other materials provided with the distribution. - * - * 3. The name of Atmel may not be used to endorse or promote products derived - * from this software without specific prior written permission. - * - * 4. This software may only be redistributed and used in connection with an - * Atmel microcontroller product. - * - * THIS SOFTWARE IS PROVIDED BY ATMEL "AS IS" AND ANY EXPRESS OR IMPLIED - * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF - * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT ARE - * EXPRESSLY AND SPECIFICALLY DISCLAIMED. IN NO EVENT SHALL ATMEL BE LIABLE FOR - * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL - * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS - * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) - * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, - * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN - * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE - * POSSIBILITY OF SUCH DAMAGE. - * - * \asf_license_stop - * - */ -/** -* Support and FAQ: visit <a href="http://www.atmel.com/design-support/">Atmel Support</a> -*/ #ifndef I2C_COMMON_H_INCLUDED #define I2C_COMMON_H_INCLUDED
--- a/targets/hal/TARGET_Atmel/TARGET_SAM21/drivers/sercom/i2c/i2c_master.h Wed Jul 15 08:15:08 2015 +0100 +++ b/targets/hal/TARGET_Atmel/TARGET_SAM21/drivers/sercom/i2c/i2c_master.h Fri Jul 17 09:15:10 2015 +0100 @@ -1,49 +1,3 @@ -/** - * \file - * - * \brief SAM SERCOM I2C Master Driver - * - * Copyright (C) 2012-2014 Atmel Corporation. All rights reserved. - * - * \asf_license_start - * - * \page License - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are met: - * - * 1. Redistributions of source code must retain the above copyright notice, - * this list of conditions and the following disclaimer. - * - * 2. Redistributions in binary form must reproduce the above copyright notice, - * this list of conditions and the following disclaimer in the documentation - * and/or other materials provided with the distribution. - * - * 3. The name of Atmel may not be used to endorse or promote products derived - * from this software without specific prior written permission. - * - * 4. This software may only be redistributed and used in connection with an - * Atmel microcontroller product. - * - * THIS SOFTWARE IS PROVIDED BY ATMEL "AS IS" AND ANY EXPRESS OR IMPLIED - * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF - * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT ARE - * EXPRESSLY AND SPECIFICALLY DISCLAIMED. IN NO EVENT SHALL ATMEL BE LIABLE FOR - * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL - * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS - * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) - * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, - * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN - * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE - * POSSIBILITY OF SUCH DAMAGE. - * - * \asf_license_stop - * - */ -/** -* Support and FAQ: visit <a href="http://www.atmel.com/design-support/">Atmel Support</a> -*/ - #ifndef I2C_MASTER_H_INCLUDED #define I2C_MASTER_H_INCLUDED
--- a/targets/hal/TARGET_Atmel/TARGET_SAM21/drivers/sercom/i2c/i2c_samd21_r21_d10_d11_l21/i2c_master.c Wed Jul 15 08:15:08 2015 +0100 +++ b/targets/hal/TARGET_Atmel/TARGET_SAM21/drivers/sercom/i2c/i2c_samd21_r21_d10_d11_l21/i2c_master.c Fri Jul 17 09:15:10 2015 +0100 @@ -1,49 +1,3 @@ -/** - * \file - * - * \brief SAM I2C Master Driver - * - * Copyright (C) 2012-2014 Atmel Corporation. All rights reserved. - * - * \asf_license_start - * - * \page License - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are met: - * - * 1. Redistributions of source code must retain the above copyright notice, - * this list of conditions and the following disclaimer. - * - * 2. Redistributions in binary form must reproduce the above copyright notice, - * this list of conditions and the following disclaimer in the documentation - * and/or other materials provided with the distribution. - * - * 3. The name of Atmel may not be used to endorse or promote products derived - * from this software without specific prior written permission. - * - * 4. This software may only be redistributed and used in connection with an - * Atmel microcontroller product. - * - * THIS SOFTWARE IS PROVIDED BY ATMEL "AS IS" AND ANY EXPRESS OR IMPLIED - * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF - * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT ARE - * EXPRESSLY AND SPECIFICALLY DISCLAIMED. IN NO EVENT SHALL ATMEL BE LIABLE FOR - * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL - * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS - * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) - * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, - * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN - * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE - * POSSIBILITY OF SUCH DAMAGE. - * - * \asf_license_stop - * - */ -/** -* Support and FAQ: visit <a href="http://www.atmel.com/design-support/">Atmel Support</a> -*/ - #include "i2c_master.h" #if I2C_MASTER_CALLBACK_MODE == true
--- a/targets/hal/TARGET_Atmel/TARGET_SAM21/drivers/sercom/i2c/i2c_samd21_r21_d10_d11_l21/i2c_slave.c Wed Jul 15 08:15:08 2015 +0100 +++ b/targets/hal/TARGET_Atmel/TARGET_SAM21/drivers/sercom/i2c/i2c_samd21_r21_d10_d11_l21/i2c_slave.c Fri Jul 17 09:15:10 2015 +0100 @@ -1,49 +1,3 @@ -/** - * \file - * - * \brief SAM I<SUP>2</SUP>C Slave Driver - * - * Copyright (C) 2013-2014 Atmel Corporation. All rights reserved. - * - * \asf_license_start - * - * \page License - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are met: - * - * 1. Redistributions of source code must retain the above copyright notice, - * this list of conditions and the following disclaimer. - * - * 2. Redistributions in binary form must reproduce the above copyright notice, - * this list of conditions and the following disclaimer in the documentation - * and/or other materials provided with the distribution. - * - * 3. The name of Atmel may not be used to endorse or promote products derived - * from this software without specific prior written permission. - * - * 4. This software may only be redistributed and used in connection with an - * Atmel microcontroller product. - * - * THIS SOFTWARE IS PROVIDED BY ATMEL "AS IS" AND ANY EXPRESS OR IMPLIED - * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF - * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT ARE - * EXPRESSLY AND SPECIFICALLY DISCLAIMED. IN NO EVENT SHALL ATMEL BE LIABLE FOR - * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL - * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS - * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) - * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, - * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN - * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE - * POSSIBILITY OF SUCH DAMAGE. - * - * \asf_license_stop - * - */ -/** -* Support and FAQ: visit <a href="http://www.atmel.com/design-support/">Atmel Support</a> -*/ - #include "i2c_slave.h" #if I2C_SLAVE_CALLBACK_MODE == true # include "i2c_slave_interrupt.h"
--- a/targets/hal/TARGET_Atmel/TARGET_SAM21/drivers/sercom/i2c/i2c_slave.h Wed Jul 15 08:15:08 2015 +0100 +++ b/targets/hal/TARGET_Atmel/TARGET_SAM21/drivers/sercom/i2c/i2c_slave.h Fri Jul 17 09:15:10 2015 +0100 @@ -1,49 +1,3 @@ -/** - * \file - * - * \brief SAM SERCOM I2C Slave Driver - * - * Copyright (C) 2013-2014 Atmel Corporation. All rights reserved. - * - * \asf_license_start - * - * \page License - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are met: - * - * 1. Redistributions of source code must retain the above copyright notice, - * this list of conditions and the following disclaimer. - * - * 2. Redistributions in binary form must reproduce the above copyright notice, - * this list of conditions and the following disclaimer in the documentation - * and/or other materials provided with the distribution. - * - * 3. The name of Atmel may not be used to endorse or promote products derived - * from this software without specific prior written permission. - * - * 4. This software may only be redistributed and used in connection with an - * Atmel microcontroller product. - * - * THIS SOFTWARE IS PROVIDED BY ATMEL "AS IS" AND ANY EXPRESS OR IMPLIED - * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF - * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT ARE - * EXPRESSLY AND SPECIFICALLY DISCLAIMED. IN NO EVENT SHALL ATMEL BE LIABLE FOR - * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL - * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS - * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) - * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, - * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN - * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE - * POSSIBILITY OF SUCH DAMAGE. - * - * \asf_license_stop - * - */ -/** -* Support and FAQ: visit <a href="http://www.atmel.com/design-support/">Atmel Support</a> -*/ - #ifndef I2C_SLAVE_H_INCLUDED #define I2C_SLAVE_H_INCLUDED
--- a/targets/hal/TARGET_Atmel/TARGET_SAM21/drivers/sercom/i2c/quick_start_master/qs_i2c_master_basic_use.h Wed Jul 15 08:15:08 2015 +0100 +++ b/targets/hal/TARGET_Atmel/TARGET_SAM21/drivers/sercom/i2c/quick_start_master/qs_i2c_master_basic_use.h Fri Jul 17 09:15:10 2015 +0100 @@ -1,46 +1,3 @@ -/** - * \file - * - * \brief SAM SERCOM I2C Master Quick Start Guide - * - * Copyright (C) 2012-2014 Atmel Corporation. All rights reserved. - * - * \asf_license_start - * - * \page License - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are met: - * - * 1. Redistributions of source code must retain the above copyright notice, - * this list of conditions and the following disclaimer. - * - * 2. Redistributions in binary form must reproduce the above copyright notice, - * this list of conditions and the following disclaimer in the documentation - * and/or other materials provided with the distribution. - * - * 3. The name of Atmel may not be used to endorse or promote products derived - * from this software without specific prior written permission. - * - * 4. This software may only be redistributed and used in connection with an - * Atmel microcontroller product. - * - * THIS SOFTWARE IS PROVIDED BY ATMEL "AS IS" AND ANY EXPRESS OR IMPLIED - * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF - * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT ARE - * EXPRESSLY AND SPECIFICALLY DISCLAIMED. IN NO EVENT SHALL ATMEL BE LIABLE FOR - * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL - * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS - * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) - * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, - * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN - * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE - * POSSIBILITY OF SUCH DAMAGE. - * - * \asf_license_stop - * - */ - /** * \page asfdoc_sam0_sercom_i2c_master_basic_use_case Quick Start Guide for SERCOM I2C Master - Basic *
--- a/targets/hal/TARGET_Atmel/TARGET_SAM21/drivers/sercom/i2c/quick_start_master_dma/qs_i2c_master_dma.h Wed Jul 15 08:15:08 2015 +0100 +++ b/targets/hal/TARGET_Atmel/TARGET_SAM21/drivers/sercom/i2c/quick_start_master_dma/qs_i2c_master_dma.h Fri Jul 17 09:15:10 2015 +0100 @@ -1,46 +1,3 @@ -/** - * \file - * - * \brief SAM SERCOM I2C Master Driver with DMA Quick Start Guide - * - * Copyright (C) 2014 Atmel Corporation. All rights reserved. - * - * \asf_license_start - * - * \page License - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are met: - * - * 1. Redistributions of source code must retain the above copyright notice, - * this list of conditions and the following disclaimer. - * - * 2. Redistributions in binary form must reproduce the above copyright notice, - * this list of conditions and the following disclaimer in the documentation - * and/or other materials provided with the distribution. - * - * 3. The name of Atmel may not be used to endorse or promote products derived - * from this software without specific prior written permission. - * - * 4. This software may only be redistributed and used in connection with an - * Atmel microcontroller product. - * - * THIS SOFTWARE IS PROVIDED BY ATMEL "AS IS" AND ANY EXPRESS OR IMPLIED - * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF - * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT ARE - * EXPRESSLY AND SPECIFICALLY DISCLAIMED. IN NO EVENT SHALL ATMEL BE LIABLE FOR - * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL - * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS - * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) - * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, - * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN - * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE - * POSSIBILITY OF SUCH DAMAGE. - * - * \asf_license_stop - * - */ - /** * \page asfdoc_sam0_sercom_i2c_master_dma_use_case Quick Start Guide for Using DMA with SERCOM I2C Master *
--- a/targets/hal/TARGET_Atmel/TARGET_SAM21/drivers/sercom/i2c/quick_start_slave/qs_i2c_slave_basic_use.h Wed Jul 15 08:15:08 2015 +0100 +++ b/targets/hal/TARGET_Atmel/TARGET_SAM21/drivers/sercom/i2c/quick_start_slave/qs_i2c_slave_basic_use.h Fri Jul 17 09:15:10 2015 +0100 @@ -1,46 +1,3 @@ -/** - * \file - * - * \brief SAM SERCOM I2C Slave Quick Start Guide with Callbacks - * - * Copyright (C) 2013-2014 Atmel Corporation. All rights reserved. - * - * \asf_license_start - * - * \page License - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are met: - * - * 1. Redistributions of source code must retain the above copyright notice, - * this list of conditions and the following disclaimer. - * - * 2. Redistributions in binary form must reproduce the above copyright notice, - * this list of conditions and the following disclaimer in the documentation - * and/or other materials provided with the distribution. - * - * 3. The name of Atmel may not be used to endorse or promote products derived - * from this software without specific prior written permission. - * - * 4. This software may only be redistributed and used in connection with an - * Atmel microcontroller product. - * - * THIS SOFTWARE IS PROVIDED BY ATMEL "AS IS" AND ANY EXPRESS OR IMPLIED - * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF - * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT ARE - * EXPRESSLY AND SPECIFICALLY DISCLAIMED. IN NO EVENT SHALL ATMEL BE LIABLE FOR - * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL - * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS - * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) - * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, - * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN - * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE - * POSSIBILITY OF SUCH DAMAGE. - * - * \asf_license_stop - * - */ - /** * \page asfdoc_sam0_sercom_i2c_slave_basic_use_case Quick Start Guide for SERCOM I2C Slave - Basic *
--- a/targets/hal/TARGET_Atmel/TARGET_SAM21/drivers/sercom/i2c/quick_start_slave_dma/qs_i2c_slave_dma.h Wed Jul 15 08:15:08 2015 +0100 +++ b/targets/hal/TARGET_Atmel/TARGET_SAM21/drivers/sercom/i2c/quick_start_slave_dma/qs_i2c_slave_dma.h Fri Jul 17 09:15:10 2015 +0100 @@ -1,46 +1,3 @@ -/** - * \file - * - * \brief SAM SERCOM I2C Slave with DMA Quick Start Guide - * - * Copyright (C) 2014 Atmel Corporation. All rights reserved. - * - * \asf_license_start - * - * \page License - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are met: - * - * 1. Redistributions of source code must retain the above copyright notice, - * this list of conditions and the following disclaimer. - * - * 2. Redistributions in binary form must reproduce the above copyright notice, - * this list of conditions and the following disclaimer in the documentation - * and/or other materials provided with the distribution. - * - * 3. The name of Atmel may not be used to endorse or promote products derived - * from this software without specific prior written permission. - * - * 4. This software may only be redistributed and used in connection with an - * Atmel microcontroller product. - * - * THIS SOFTWARE IS PROVIDED BY ATMEL "AS IS" AND ANY EXPRESS OR IMPLIED - * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF - * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT ARE - * EXPRESSLY AND SPECIFICALLY DISCLAIMED. IN NO EVENT SHALL ATMEL BE LIABLE FOR - * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL - * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS - * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) - * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, - * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN - * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE - * POSSIBILITY OF SUCH DAMAGE. - * - * \asf_license_stop - * - */ - /** * \page asfdoc_sam0_sercom_i2c_slave_dma_use_case Quick Start Guide for Using DMA with SERCOM I2C Slave *
--- a/targets/hal/TARGET_Atmel/TARGET_SAM21/drivers/sercom/sercom.c Wed Jul 15 08:15:08 2015 +0100 +++ b/targets/hal/TARGET_Atmel/TARGET_SAM21/drivers/sercom/sercom.c Fri Jul 17 09:15:10 2015 +0100 @@ -1,48 +1,3 @@ -/** - * \file - * - * \brief SAM Serial Peripheral Interface Driver - * - * Copyright (C) 2012-2014 Atmel Corporation. All rights reserved. - * - * \asf_license_start - * - * \page License - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are met: - * - * 1. Redistributions of source code must retain the above copyright notice, - * this list of conditions and the following disclaimer. - * - * 2. Redistributions in binary form must reproduce the above copyright notice, - * this list of conditions and the following disclaimer in the documentation - * and/or other materials provided with the distribution. - * - * 3. The name of Atmel may not be used to endorse or promote products derived - * from this software without specific prior written permission. - * - * 4. This software may only be redistributed and used in connection with an - * Atmel microcontroller product. - * - * THIS SOFTWARE IS PROVIDED BY ATMEL "AS IS" AND ANY EXPRESS OR IMPLIED - * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF - * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT ARE - * EXPRESSLY AND SPECIFICALLY DISCLAIMED. IN NO EVENT SHALL ATMEL BE LIABLE FOR - * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL - * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS - * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) - * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, - * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN - * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE - * POSSIBILITY OF SUCH DAMAGE. - * - * \asf_license_stop - * - */ -/** -* Support and FAQ: visit <a href="http://www.atmel.com/design-support/">Atmel Support</a> -*/ #include "sercom.h" #define SHIFT 32
--- a/targets/hal/TARGET_Atmel/TARGET_SAM21/drivers/sercom/sercom.h Wed Jul 15 08:15:08 2015 +0100 +++ b/targets/hal/TARGET_Atmel/TARGET_SAM21/drivers/sercom/sercom.h Fri Jul 17 09:15:10 2015 +0100 @@ -1,49 +1,3 @@ -/** - * \file - * - * \brief SAM Serial Peripheral Interface Driver - * - * Copyright (C) 2012-2014 Atmel Corporation. All rights reserved. - * - * \asf_license_start - * - * \page License - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are met: - * - * 1. Redistributions of source code must retain the above copyright notice, - * this list of conditions and the following disclaimer. - * - * 2. Redistributions in binary form must reproduce the above copyright notice, - * this list of conditions and the following disclaimer in the documentation - * and/or other materials provided with the distribution. - * - * 3. The name of Atmel may not be used to endorse or promote products derived - * from this software without specific prior written permission. - * - * 4. This software may only be redistributed and used in connection with an - * Atmel microcontroller product. - * - * THIS SOFTWARE IS PROVIDED BY ATMEL "AS IS" AND ANY EXPRESS OR IMPLIED - * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF - * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT ARE - * EXPRESSLY AND SPECIFICALLY DISCLAIMED. IN NO EVENT SHALL ATMEL BE LIABLE FOR - * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL - * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS - * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) - * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, - * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN - * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE - * POSSIBILITY OF SUCH DAMAGE. - * - * \asf_license_stop - * - */ -/** -* Support and FAQ: visit <a href="http://www.atmel.com/design-support/">Atmel Support</a> -*/ - #ifndef SERCOM_H_INCLUDED #define SERCOM_H_INCLUDED
--- a/targets/hal/TARGET_Atmel/TARGET_SAM21/drivers/sercom/sercom_interrupt.c Wed Jul 15 08:15:08 2015 +0100 +++ b/targets/hal/TARGET_Atmel/TARGET_SAM21/drivers/sercom/sercom_interrupt.c Fri Jul 17 09:15:10 2015 +0100 @@ -1,48 +1,3 @@ -/** - * \file - * - * \brief SAM Serial Peripheral Interface Driver - * - * Copyright (C) 2012-2014 Atmel Corporation. All rights reserved. - * - * \asf_license_start - * - * \page License - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are met: - * - * 1. Redistributions of source code must retain the above copyright notice, - * this list of conditions and the following disclaimer. - * - * 2. Redistributions in binary form must reproduce the above copyright notice, - * this list of conditions and the following disclaimer in the documentation - * and/or other materials provided with the distribution. - * - * 3. The name of Atmel may not be used to endorse or promote products derived - * from this software without specific prior written permission. - * - * 4. This software may only be redistributed and used in connection with an - * Atmel microcontroller product. - * - * THIS SOFTWARE IS PROVIDED BY ATMEL "AS IS" AND ANY EXPRESS OR IMPLIED - * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF - * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT ARE - * EXPRESSLY AND SPECIFICALLY DISCLAIMED. IN NO EVENT SHALL ATMEL BE LIABLE FOR - * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL - * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS - * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) - * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, - * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN - * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE - * POSSIBILITY OF SUCH DAMAGE. - * - * \asf_license_stop - * - */ -/** -* Support and FAQ: visit <a href="http://www.atmel.com/design-support/">Atmel Support</a> -*/ #include "sercom_interrupt.h" void *_sercom_instances[SERCOM_INST_NUM];
--- a/targets/hal/TARGET_Atmel/TARGET_SAM21/drivers/sercom/sercom_interrupt.h Wed Jul 15 08:15:08 2015 +0100 +++ b/targets/hal/TARGET_Atmel/TARGET_SAM21/drivers/sercom/sercom_interrupt.h Fri Jul 17 09:15:10 2015 +0100 @@ -1,48 +1,3 @@ -/** - * \file - * - * \brief SAM Serial Peripheral Interface Driver - * - * Copyright (C) 2012-2014 Atmel Corporation. All rights reserved. - * - * \asf_license_start - * - * \page License - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are met: - * - * 1. Redistributions of source code must retain the above copyright notice, - * this list of conditions and the following disclaimer. - * - * 2. Redistributions in binary form must reproduce the above copyright notice, - * this list of conditions and the following disclaimer in the documentation - * and/or other materials provided with the distribution. - * - * 3. The name of Atmel may not be used to endorse or promote products derived - * from this software without specific prior written permission. - * - * 4. This software may only be redistributed and used in connection with an - * Atmel microcontroller product. - * - * THIS SOFTWARE IS PROVIDED BY ATMEL "AS IS" AND ANY EXPRESS OR IMPLIED - * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF - * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT ARE - * EXPRESSLY AND SPECIFICALLY DISCLAIMED. IN NO EVENT SHALL ATMEL BE LIABLE FOR - * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL - * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS - * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) - * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, - * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN - * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE - * POSSIBILITY OF SUCH DAMAGE. - * - * \asf_license_stop - * - */ -/** -* Support and FAQ: visit <a href="http://www.atmel.com/design-support/">Atmel Support</a> -*/ #ifndef SERCOM_INTERRUPT_H_INCLUDED #define SERCOM_INTERRUPT_H_INCLUDED
--- a/targets/hal/TARGET_Atmel/TARGET_SAM21/drivers/sercom/sercom_pinout.h Wed Jul 15 08:15:08 2015 +0100 +++ b/targets/hal/TARGET_Atmel/TARGET_SAM21/drivers/sercom/sercom_pinout.h Fri Jul 17 09:15:10 2015 +0100 @@ -1,48 +1,3 @@ -/** - * \file - * - * \brief SAM SERCOM Module Pinout Definitions - * - * Copyright (C) 2012-2014 Atmel Corporation. All rights reserved. - * - * \asf_license_start - * - * \page License - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are met: - * - * 1. Redistributions of source code must retain the above copyright notice, - * this list of conditions and the following disclaimer. - * - * 2. Redistributions in binary form must reproduce the above copyright notice, - * this list of conditions and the following disclaimer in the documentation - * and/or other materials provided with the distribution. - * - * 3. The name of Atmel may not be used to endorse or promote products derived - * from this software without specific prior written permission. - * - * 4. This software may only be redistributed and used in connection with an - * Atmel microcontroller product. - * - * THIS SOFTWARE IS PROVIDED BY ATMEL "AS IS" AND ANY EXPRESS OR IMPLIED - * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF - * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT ARE - * EXPRESSLY AND SPECIFICALLY DISCLAIMED. IN NO EVENT SHALL ATMEL BE LIABLE FOR - * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL - * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS - * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) - * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, - * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN - * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE - * POSSIBILITY OF SUCH DAMAGE. - * - * \asf_license_stop - * - */ -/** -* Support and FAQ: visit <a href="http://www.atmel.com/design-support/">Atmel Support</a> -*/ #ifndef SERCOM_PINOUT_H_INCLUDED #define SERCOM_PINOUT_H_INCLUDED
--- a/targets/hal/TARGET_Atmel/TARGET_SAM21/drivers/sercom/usart/usart.c Wed Jul 15 08:15:08 2015 +0100 +++ b/targets/hal/TARGET_Atmel/TARGET_SAM21/drivers/sercom/usart/usart.c Fri Jul 17 09:15:10 2015 +0100 @@ -1,48 +1,3 @@ -/** - * \file - * - * \brief SAM SERCOM USART Driver - * - * Copyright (C) 2012-2014 Atmel Corporation. All rights reserved. - * - * \asf_license_start - * - * \page License - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are met: - * - * 1. Redistributions of source code must retain the above copyright notice, - * this list of conditions and the following disclaimer. - * - * 2. Redistributions in binary form must reproduce the above copyright notice, - * this list of conditions and the following disclaimer in the documentation - * and/or other materials provided with the distribution. - * - * 3. The name of Atmel may not be used to endorse or promote products derived - * from this software without specific prior written permission. - * - * 4. This software may only be redistributed and used in connection with an - * Atmel microcontroller product. - * - * THIS SOFTWARE IS PROVIDED BY ATMEL "AS IS" AND ANY EXPRESS OR IMPLIED - * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF - * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT ARE - * EXPRESSLY AND SPECIFICALLY DISCLAIMED. IN NO EVENT SHALL ATMEL BE LIABLE FOR - * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL - * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS - * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) - * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, - * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN - * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE - * POSSIBILITY OF SUCH DAMAGE. - * - * \asf_license_stop - * - */ -/** -* Support and FAQ: visit <a href="http://www.atmel.com/design-support/">Atmel Support</a> -*/ #include "usart.h" #include <pinmux.h> #if USART_CALLBACK_MODE == true
--- a/targets/hal/TARGET_Atmel/TARGET_SAM21/drivers/sercom/usart/usart.h Wed Jul 15 08:15:08 2015 +0100 +++ b/targets/hal/TARGET_Atmel/TARGET_SAM21/drivers/sercom/usart/usart.h Fri Jul 17 09:15:10 2015 +0100 @@ -1,49 +1,3 @@ -/** - * - * \file - * - * \brief SAM SERCOM USART Driver - * - * Copyright (C) 2012-2014 Atmel Corporation. All rights reserved. - * - * \asf_license_start - * - * \page License - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are met: - * - * 1. Redistributions of source code must retain the above copyright notice, - * this list of conditions and the following disclaimer. - * - * 2. Redistributions in binary form must reproduce the above copyright notice, - * this list of conditions and the following disclaimer in the documentation - * and/or other materials provided with the distribution. - * - * 3. The name of Atmel may not be used to endorse or promote products derived - * from this software without specific prior written permission. - * - * 4. This software may only be redistributed and used in connection with an - * Atmel microcontroller product. - * - * THIS SOFTWARE IS PROVIDED BY ATMEL "AS IS" AND ANY EXPRESS OR IMPLIED - * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF - * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT ARE - * EXPRESSLY AND SPECIFICALLY DISCLAIMED. IN NO EVENT SHALL ATMEL BE LIABLE FOR - * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL - * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS - * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) - * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, - * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN - * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE - * POSSIBILITY OF SUCH DAMAGE. - * - * \asf_license_stop - * - */ -/** -* Support and FAQ: visit <a href="http://www.atmel.com/design-support/">Atmel Support</a> -*/ #ifndef USART_H_INCLUDED #define USART_H_INCLUDED
--- a/targets/hal/TARGET_Atmel/TARGET_SAM21/drivers/sercom/usart/usart_interrupt.c Wed Jul 15 08:15:08 2015 +0100 +++ b/targets/hal/TARGET_Atmel/TARGET_SAM21/drivers/sercom/usart/usart_interrupt.c Fri Jul 17 09:15:10 2015 +0100 @@ -1,49 +1,3 @@ -/** - * \file - * - * \brief SAM SERCOM USART Asynchronous Driver - * - * Copyright (C) 2012-2014 Atmel Corporation. All rights reserved. - * - * \asf_license_start - * - * \page License - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are met: - * - * 1. Redistributions of source code must retain the above copyright notice, - * this list of conditions and the following disclaimer. - * - * 2. Redistributions in binary form must reproduce the above copyright notice, - * this list of conditions and the following disclaimer in the documentation - * and/or other materials provided with the distribution. - * - * 3. The name of Atmel may not be used to endorse or promote products derived - * from this software without specific prior written permission. - * - * 4. This software may only be redistributed and used in connection with an - * Atmel microcontroller product. - * - * THIS SOFTWARE IS PROVIDED BY ATMEL "AS IS" AND ANY EXPRESS OR IMPLIED - * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF - * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT ARE - * EXPRESSLY AND SPECIFICALLY DISCLAIMED. IN NO EVENT SHALL ATMEL BE LIABLE FOR - * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL - * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS - * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) - * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, - * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN - * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE - * POSSIBILITY OF SUCH DAMAGE. - * - * \asf_license_stop - * - */ -/** -* Support and FAQ: visit <a href="http://www.atmel.com/design-support/">Atmel Support</a> -*/ - #include "usart_interrupt.h" /**
--- a/targets/hal/TARGET_Atmel/TARGET_SAM21/drivers/sercom/usart/usart_interrupt.h Wed Jul 15 08:15:08 2015 +0100 +++ b/targets/hal/TARGET_Atmel/TARGET_SAM21/drivers/sercom/usart/usart_interrupt.h Fri Jul 17 09:15:10 2015 +0100 @@ -1,48 +1,3 @@ -/** - * \file - * - * \brief SAM SERCOM USART Asynchronous Driver - * - * Copyright (C) 2012-2014 Atmel Corporation. All rights reserved. - * - * \asf_license_start - * - * \page License - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are met: - * - * 1. Redistributions of source code must retain the above copyright notice, - * this list of conditions and the following disclaimer. - * - * 2. Redistributions in binary form must reproduce the above copyright notice, - * this list of conditions and the following disclaimer in the documentation - * and/or other materials provided with the distribution. - * - * 3. The name of Atmel may not be used to endorse or promote products derived - * from this software without specific prior written permission. - * - * 4. This software may only be redistributed and used in connection with an - * Atmel microcontroller product. - * - * THIS SOFTWARE IS PROVIDED BY ATMEL "AS IS" AND ANY EXPRESS OR IMPLIED - * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF - * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT ARE - * EXPRESSLY AND SPECIFICALLY DISCLAIMED. IN NO EVENT SHALL ATMEL BE LIABLE FOR - * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL - * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS - * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) - * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, - * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN - * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE - * POSSIBILITY OF SUCH DAMAGE. - * - * \asf_license_stop - * - */ -/** -* Support and FAQ: visit <a href="http://www.atmel.com/design-support/">Atmel Support</a> -*/ #ifndef USART_INTERRUPT_H_INCLUDED #define USART_INTERRUPT_H_INCLUDED
--- a/targets/hal/TARGET_Atmel/TARGET_SAM21/drivers/system/clock/clock.h Wed Jul 15 08:15:08 2015 +0100 +++ b/targets/hal/TARGET_Atmel/TARGET_SAM21/drivers/system/clock/clock.h Fri Jul 17 09:15:10 2015 +0100 @@ -1,48 +1,3 @@ -/** - * \file - * - * \brief SAM Clock Driver - * - * Copyright (C) 2012-2014 Atmel Corporation. All rights reserved. - * - * \asf_license_start - * - * \page License - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are met: - * - * 1. Redistributions of source code must retain the above copyright notice, - * this list of conditions and the following disclaimer. - * - * 2. Redistributions in binary form must reproduce the above copyright notice, - * this list of conditions and the following disclaimer in the documentation - * and/or other materials provided with the distribution. - * - * 3. The name of Atmel may not be used to endorse or promote products derived - * from this software without specific prior written permission. - * - * 4. This software may only be redistributed and used in connection with an - * Atmel microcontroller product. - * - * THIS SOFTWARE IS PROVIDED BY ATMEL "AS IS" AND ANY EXPRESS OR IMPLIED - * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF - * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT ARE - * EXPRESSLY AND SPECIFICALLY DISCLAIMED. IN NO EVENT SHALL ATMEL BE LIABLE FOR - * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL - * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS - * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) - * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, - * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN - * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE - * POSSIBILITY OF SUCH DAMAGE. - * - * \asf_license_stop - * - */ -/** -* Support and FAQ: visit <a href="http://www.atmel.com/design-support/">Atmel Support</a> -*/ #ifndef SYSTEM_CLOCK_H_INCLUDED #define SYSTEM_CLOCK_H_INCLUDED
--- a/targets/hal/TARGET_Atmel/TARGET_SAM21/drivers/system/clock/clock_samd21_r21/clock.c Wed Jul 15 08:15:08 2015 +0100 +++ b/targets/hal/TARGET_Atmel/TARGET_SAM21/drivers/system/clock/clock_samd21_r21/clock.c Fri Jul 17 09:15:10 2015 +0100 @@ -1,48 +1,3 @@ -/** - * \file - * - * \brief SAM D21/R21 Clock Driver - * - * Copyright (C) 2013-2014 Atmel Corporation. All rights reserved. - * - * \asf_license_start - * - * \page License - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are met: - * - * 1. Redistributions of source code must retain the above copyright notice, - * this list of conditions and the following disclaimer. - * - * 2. Redistributions in binary form must reproduce the above copyright notice, - * this list of conditions and the following disclaimer in the documentation - * and/or other materials provided with the distribution. - * - * 3. The name of Atmel may not be used to endorse or promote products derived - * from this software without specific prior written permission. - * - * 4. This software may only be redistributed and used in connection with an - * Atmel microcontroller product. - * - * THIS SOFTWARE IS PROVIDED BY ATMEL "AS IS" AND ANY EXPRESS OR IMPLIED - * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF - * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT ARE - * EXPRESSLY AND SPECIFICALLY DISCLAIMED. IN NO EVENT SHALL ATMEL BE LIABLE FOR - * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL - * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS - * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) - * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, - * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN - * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE - * POSSIBILITY OF SUCH DAMAGE. - * - * \asf_license_stop - * - */ -/** -* Support and FAQ: visit <a href="http://www.atmel.com/design-support/">Atmel Support</a> -*/ #include <compiler.h> #include <clock.h> #include <conf_clocks.h>
--- a/targets/hal/TARGET_Atmel/TARGET_SAM21/drivers/system/clock/clock_samd21_r21/clock_config_check.h Wed Jul 15 08:15:08 2015 +0100 +++ b/targets/hal/TARGET_Atmel/TARGET_SAM21/drivers/system/clock/clock_samd21_r21/clock_config_check.h Fri Jul 17 09:15:10 2015 +0100 @@ -1,49 +1,3 @@ -/** - * \file - * - * \brief SAM D21/R21 Clock Driver - * - * Copyright (C) 2012-2014 Atmel Corporation. All rights reserved. - * - * \asf_license_start - * - * \page License - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are met: - * - * 1. Redistributions of source code must retain the above copyright notice, - * this list of conditions and the following disclaimer. - * - * 2. Redistributions in binary form must reproduce the above copyright notice, - * this list of conditions and the following disclaimer in the documentation - * and/or other materials provided with the distribution. - * - * 3. The name of Atmel may not be used to endorse or promote products derived - * from this software without specific prior written permission. - * - * 4. This software may only be redistributed and used in connection with an - * Atmel microcontroller product. - * - * THIS SOFTWARE IS PROVIDED BY ATMEL "AS IS" AND ANY EXPRESS OR IMPLIED - * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF - * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT ARE - * EXPRESSLY AND SPECIFICALLY DISCLAIMED. IN NO EVENT SHALL ATMEL BE LIABLE FOR - * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL - * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS - * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) - * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, - * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN - * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE - * POSSIBILITY OF SUCH DAMAGE. - * - * \asf_license_stop - * - */ -/** -* Support and FAQ: visit <a href="http://www.atmel.com/design-support/">Atmel Support</a> -*/ - #ifndef CLOCK_CONFIG_CHECK_H # define CLOCK_CONFIG_CHECK_H
--- a/targets/hal/TARGET_Atmel/TARGET_SAM21/drivers/system/clock/clock_samd21_r21/clock_feature.h Wed Jul 15 08:15:08 2015 +0100 +++ b/targets/hal/TARGET_Atmel/TARGET_SAM21/drivers/system/clock/clock_samd21_r21/clock_feature.h Fri Jul 17 09:15:10 2015 +0100 @@ -1,48 +1,3 @@ -/** - * \file - * - * \brief SAM Clock Driver - * - * Copyright (C) 2012-2014 Atmel Corporation. All rights reserved. - * - * \asf_license_start - * - * \page License - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are met: - * - * 1. Redistributions of source code must retain the above copyright notice, - * this list of conditions and the following disclaimer. - * - * 2. Redistributions in binary form must reproduce the above copyright notice, - * this list of conditions and the following disclaimer in the documentation - * and/or other materials provided with the distribution. - * - * 3. The name of Atmel may not be used to endorse or promote products derived - * from this software without specific prior written permission. - * - * 4. This software may only be redistributed and used in connection with an - * Atmel microcontroller product. - * - * THIS SOFTWARE IS PROVIDED BY ATMEL "AS IS" AND ANY EXPRESS OR IMPLIED - * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF - * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT ARE - * EXPRESSLY AND SPECIFICALLY DISCLAIMED. IN NO EVENT SHALL ATMEL BE LIABLE FOR - * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL - * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS - * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) - * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, - * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN - * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE - * POSSIBILITY OF SUCH DAMAGE. - * - * \asf_license_stop - * - */ -/** -* Support and FAQ: visit <a href="http://www.atmel.com/design-support/">Atmel Support</a> -*/ #ifndef SYSTEM_CLOCK_FEATURE_H_INCLUDED #define SYSTEM_CLOCK_FEATURE_H_INCLUDED
--- a/targets/hal/TARGET_Atmel/TARGET_SAM21/drivers/system/clock/clock_samd21_r21/gclk.c Wed Jul 15 08:15:08 2015 +0100 +++ b/targets/hal/TARGET_Atmel/TARGET_SAM21/drivers/system/clock/clock_samd21_r21/gclk.c Fri Jul 17 09:15:10 2015 +0100 @@ -1,49 +1,3 @@ -/** - * \file - * - * \brief SAM D21/R21 Generic Clock Driver - * - * Copyright (C) 2013-2014 Atmel Corporation. All rights reserved. - * - * \asf_license_start - * - * \page License - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are met: - * - * 1. Redistributions of source code must retain the above copyright notice, - * this list of conditions and the following disclaimer. - * - * 2. Redistributions in binary form must reproduce the above copyright notice, - * this list of conditions and the following disclaimer in the documentation - * and/or other materials provided with the distribution. - * - * 3. The name of Atmel may not be used to endorse or promote products derived - * from this software without specific prior written permission. - * - * 4. This software may only be redistributed and used in connection with an - * Atmel microcontroller product. - * - * THIS SOFTWARE IS PROVIDED BY ATMEL "AS IS" AND ANY EXPRESS OR IMPLIED - * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF - * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT ARE - * EXPRESSLY AND SPECIFICALLY DISCLAIMED. IN NO EVENT SHALL ATMEL BE LIABLE FOR - * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL - * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS - * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) - * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, - * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN - * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE - * POSSIBILITY OF SUCH DAMAGE. - * - * \asf_license_stop - * - */ -/** -* Support and FAQ: visit <a href="http://www.atmel.com/design-support/">Atmel Support</a> -*/ - #include <gclk.h> #include <clock.h> #include <system_interrupt.h>
--- a/targets/hal/TARGET_Atmel/TARGET_SAM21/drivers/system/clock/gclk.h Wed Jul 15 08:15:08 2015 +0100 +++ b/targets/hal/TARGET_Atmel/TARGET_SAM21/drivers/system/clock/gclk.h Fri Jul 17 09:15:10 2015 +0100 @@ -1,48 +1,3 @@ -/** - * \file - * - * \brief SAM Generic Clock Driver - * - * Copyright (C) 2012-2014 Atmel Corporation. All rights reserved. - * - * \asf_license_start - * - * \page License - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are met: - * - * 1. Redistributions of source code must retain the above copyright notice, - * this list of conditions and the following disclaimer. - * - * 2. Redistributions in binary form must reproduce the above copyright notice, - * this list of conditions and the following disclaimer in the documentation - * and/or other materials provided with the distribution. - * - * 3. The name of Atmel may not be used to endorse or promote products derived - * from this software without specific prior written permission. - * - * 4. This software may only be redistributed and used in connection with an - * Atmel microcontroller product. - * - * THIS SOFTWARE IS PROVIDED BY ATMEL "AS IS" AND ANY EXPRESS OR IMPLIED - * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF - * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT ARE - * EXPRESSLY AND SPECIFICALLY DISCLAIMED. IN NO EVENT SHALL ATMEL BE LIABLE FOR - * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL - * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS - * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) - * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, - * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN - * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE - * POSSIBILITY OF SUCH DAMAGE. - * - * \asf_license_stop - * - */ -/** -* Support and FAQ: visit <a href="http://www.atmel.com/design-support/">Atmel Support</a> -*/ #ifndef SYSTEM_CLOCK_GCLK_H_INCLUDED #define SYSTEM_CLOCK_GCLK_H_INCLUDED
--- a/targets/hal/TARGET_Atmel/TARGET_SAM21/drivers/system/interrupt/system_interrupt.c Wed Jul 15 08:15:08 2015 +0100 +++ b/targets/hal/TARGET_Atmel/TARGET_SAM21/drivers/system/interrupt/system_interrupt.c Fri Jul 17 09:15:10 2015 +0100 @@ -1,48 +1,3 @@ -/** - * \file - * - * \brief SAM System Interrupt Driver - * - * Copyright (C) 2012-2014 Atmel Corporation. All rights reserved. - * - * \asf_license_start - * - * \page License - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are met: - * - * 1. Redistributions of source code must retain the above copyright notice, - * this list of conditions and the following disclaimer. - * - * 2. Redistributions in binary form must reproduce the above copyright notice, - * this list of conditions and the following disclaimer in the documentation - * and/or other materials provided with the distribution. - * - * 3. The name of Atmel may not be used to endorse or promote products derived - * from this software without specific prior written permission. - * - * 4. This software may only be redistributed and used in connection with an - * Atmel microcontroller product. - * - * THIS SOFTWARE IS PROVIDED BY ATMEL "AS IS" AND ANY EXPRESS OR IMPLIED - * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF - * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT ARE - * EXPRESSLY AND SPECIFICALLY DISCLAIMED. IN NO EVENT SHALL ATMEL BE LIABLE FOR - * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL - * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS - * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) - * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, - * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN - * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE - * POSSIBILITY OF SUCH DAMAGE. - * - * \asf_license_stop - * - */ -/** -* Support and FAQ: visit <a href="http://www.atmel.com/design-support/">Atmel Support</a> -*/ #include "system_interrupt.h" /**
--- a/targets/hal/TARGET_Atmel/TARGET_SAM21/drivers/system/interrupt/system_interrupt.h Wed Jul 15 08:15:08 2015 +0100 +++ b/targets/hal/TARGET_Atmel/TARGET_SAM21/drivers/system/interrupt/system_interrupt.h Fri Jul 17 09:15:10 2015 +0100 @@ -1,48 +1,3 @@ -/** - * \file - * - * \brief SAM System Interrupt Driver - * - * Copyright (C) 2012-2014 Atmel Corporation. All rights reserved. - * - * \asf_license_start - * - * \page License - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are met: - * - * 1. Redistributions of source code must retain the above copyright notice, - * this list of conditions and the following disclaimer. - * - * 2. Redistributions in binary form must reproduce the above copyright notice, - * this list of conditions and the following disclaimer in the documentation - * and/or other materials provided with the distribution. - * - * 3. The name of Atmel may not be used to endorse or promote products derived - * from this software without specific prior written permission. - * - * 4. This software may only be redistributed and used in connection with an - * Atmel microcontroller product. - * - * THIS SOFTWARE IS PROVIDED BY ATMEL "AS IS" AND ANY EXPRESS OR IMPLIED - * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF - * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT ARE - * EXPRESSLY AND SPECIFICALLY DISCLAIMED. IN NO EVENT SHALL ATMEL BE LIABLE FOR - * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL - * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS - * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) - * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, - * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN - * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE - * POSSIBILITY OF SUCH DAMAGE. - * - * \asf_license_stop - * - */ -/** -* Support and FAQ: visit <a href="http://www.atmel.com/design-support/">Atmel Support</a> -*/ #ifndef SYSTEM_INTERRUPT_H_INCLUDED #define SYSTEM_INTERRUPT_H_INCLUDED
--- a/targets/hal/TARGET_Atmel/TARGET_SAM21/drivers/system/interrupt/system_interrupt_samd21/system_interrupt_features.h Wed Jul 15 08:15:08 2015 +0100 +++ b/targets/hal/TARGET_Atmel/TARGET_SAM21/drivers/system/interrupt/system_interrupt_samd21/system_interrupt_features.h Fri Jul 17 09:15:10 2015 +0100 @@ -1,49 +1,3 @@ -/** - * \file - * - * \brief SAM D21 System Interrupt Driver - * - * Copyright (C) 2013-2014 Atmel Corporation. All rights reserved. - * - * \asf_license_start - * - * \page License - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are met: - * - * 1. Redistributions of source code must retain the above copyright notice, - * this list of conditions and the following disclaimer. - * - * 2. Redistributions in binary form must reproduce the above copyright notice, - * this list of conditions and the following disclaimer in the documentation - * and/or other materials provided with the distribution. - * - * 3. The name of Atmel may not be used to endorse or promote products derived - * from this software without specific prior written permission. - * - * 4. This software may only be redistributed and used in connection with an - * Atmel microcontroller product. - * - * THIS SOFTWARE IS PROVIDED BY ATMEL "AS IS" AND ANY EXPRESS OR IMPLIED - * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF - * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT ARE - * EXPRESSLY AND SPECIFICALLY DISCLAIMED. IN NO EVENT SHALL ATMEL BE LIABLE FOR - * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL - * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS - * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) - * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, - * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN - * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE - * POSSIBILITY OF SUCH DAMAGE. - * - * \asf_license_stop - * - */ -/** -* Support and FAQ: visit <a href="http://www.atmel.com/design-support/">Atmel Support</a> -*/ - #ifndef SYSTEM_INTERRUPT_FEATURES_H_INCLUDED #define SYSTEM_INTERRUPT_FEATURES_H_INCLUDED
--- a/targets/hal/TARGET_Atmel/TARGET_SAM21/drivers/system/pinmux/pinmux.c Wed Jul 15 08:15:08 2015 +0100 +++ b/targets/hal/TARGET_Atmel/TARGET_SAM21/drivers/system/pinmux/pinmux.c Fri Jul 17 09:15:10 2015 +0100 @@ -1,48 +1,3 @@ -/** - * \file - * - * \brief SAM Pin Multiplexer Driver - * - * Copyright (C) 2012-2014 Atmel Corporation. All rights reserved. - * - * \asf_license_start - * - * \page License - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are met: - * - * 1. Redistributions of source code must retain the above copyright notice, - * this list of conditions and the following disclaimer. - * - * 2. Redistributions in binary form must reproduce the above copyright notice, - * this list of conditions and the following disclaimer in the documentation - * and/or other materials provided with the distribution. - * - * 3. The name of Atmel may not be used to endorse or promote products derived - * from this software without specific prior written permission. - * - * 4. This software may only be redistributed and used in connection with an - * Atmel microcontroller product. - * - * THIS SOFTWARE IS PROVIDED BY ATMEL "AS IS" AND ANY EXPRESS OR IMPLIED - * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF - * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT ARE - * EXPRESSLY AND SPECIFICALLY DISCLAIMED. IN NO EVENT SHALL ATMEL BE LIABLE FOR - * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL - * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS - * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) - * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, - * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN - * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE - * POSSIBILITY OF SUCH DAMAGE. - * - * \asf_license_stop - * - */ -/** -* Support and FAQ: visit <a href="http://www.atmel.com/design-support/">Atmel Support</a> -*/ #include <pinmux.h> /**
--- a/targets/hal/TARGET_Atmel/TARGET_SAM21/drivers/system/pinmux/pinmux.h Wed Jul 15 08:15:08 2015 +0100 +++ b/targets/hal/TARGET_Atmel/TARGET_SAM21/drivers/system/pinmux/pinmux.h Fri Jul 17 09:15:10 2015 +0100 @@ -1,48 +1,3 @@ -/** - * \file - * - * \brief SAM Pin Multiplexer Driver - * - * Copyright (C) 2012-2014 Atmel Corporation. All rights reserved. - * - * \asf_license_start - * - * \page License - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are met: - * - * 1. Redistributions of source code must retain the above copyright notice, - * this list of conditions and the following disclaimer. - * - * 2. Redistributions in binary form must reproduce the above copyright notice, - * this list of conditions and the following disclaimer in the documentation - * and/or other materials provided with the distribution. - * - * 3. The name of Atmel may not be used to endorse or promote products derived - * from this software without specific prior written permission. - * - * 4. This software may only be redistributed and used in connection with an - * Atmel microcontroller product. - * - * THIS SOFTWARE IS PROVIDED BY ATMEL "AS IS" AND ANY EXPRESS OR IMPLIED - * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF - * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT ARE - * EXPRESSLY AND SPECIFICALLY DISCLAIMED. IN NO EVENT SHALL ATMEL BE LIABLE FOR - * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL - * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS - * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) - * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, - * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN - * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE - * POSSIBILITY OF SUCH DAMAGE. - * - * \asf_license_stop - * - */ -/** -* Support and FAQ: visit <a href="http://www.atmel.com/design-support/">Atmel Support</a> -*/ #ifndef PINMUX_H_INCLUDED #define PINMUX_H_INCLUDED
--- a/targets/hal/TARGET_Atmel/TARGET_SAM21/drivers/system/pinmux/quick_start/qs_pinmux_basic.h Wed Jul 15 08:15:08 2015 +0100 +++ b/targets/hal/TARGET_Atmel/TARGET_SAM21/drivers/system/pinmux/quick_start/qs_pinmux_basic.h Fri Jul 17 09:15:10 2015 +0100 @@ -1,46 +1,3 @@ -/** - * \file - * - * \brief SAM PINMUX Driver Quick Start - * - * Copyright (C) 2012-2014 Atmel Corporation. All rights reserved. - * - * \asf_license_start - * - * \page License - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are met: - * - * 1. Redistributions of source code must retain the above copyright notice, - * this list of conditions and the following disclaimer. - * - * 2. Redistributions in binary form must reproduce the above copyright notice, - * this list of conditions and the following disclaimer in the documentation - * and/or other materials provided with the distribution. - * - * 3. The name of Atmel may not be used to endorse or promote products derived - * from this software without specific prior written permission. - * - * 4. This software may only be redistributed and used in connection with an - * Atmel microcontroller product. - * - * THIS SOFTWARE IS PROVIDED BY ATMEL "AS IS" AND ANY EXPRESS OR IMPLIED - * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF - * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT ARE - * EXPRESSLY AND SPECIFICALLY DISCLAIMED. IN NO EVENT SHALL ATMEL BE LIABLE FOR - * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL - * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS - * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) - * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, - * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN - * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE - * POSSIBILITY OF SUCH DAMAGE. - * - * \asf_license_stop - * - */ - /** * \page asfdoc_sam0_system_pinmux_basic_use_case Quick Start Guide for SYSTEM PINMUX - Basic *
--- a/targets/hal/TARGET_Atmel/TARGET_SAM21/drivers/system/power/power_sam_d_r/power.h Wed Jul 15 08:15:08 2015 +0100 +++ b/targets/hal/TARGET_Atmel/TARGET_SAM21/drivers/system/power/power_sam_d_r/power.h Fri Jul 17 09:15:10 2015 +0100 @@ -1,48 +1,3 @@ -/** - * \file - * - * \brief SAM Power related functionality - * - * Copyright (C) 2014 Atmel Corporation. All rights reserved. - * - * \asf_license_start - * - * \page License - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are met: - * - * 1. Redistributions of source code must retain the above copyright notice, - * this list of conditions and the following disclaimer. - * - * 2. Redistributions in binary form must reproduce the above copyright notice, - * this list of conditions and the following disclaimer in the documentation - * and/or other materials provided with the distribution. - * - * 3. The name of Atmel may not be used to endorse or promote products derived - * from this software without specific prior written permission. - * - * 4. This software may only be redistributed and used in connection with an - * Atmel microcontroller product. - * - * THIS SOFTWARE IS PROVIDED BY ATMEL "AS IS" AND ANY EXPRESS OR IMPLIED - * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF - * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT ARE - * EXPRESSLY AND SPECIFICALLY DISCLAIMED. IN NO EVENT SHALL ATMEL BE LIABLE FOR - * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL - * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS - * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) - * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, - * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN - * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE - * POSSIBILITY OF SUCH DAMAGE. - * - * \asf_license_stop - * - */ -/** -* Support and FAQ: visit <a href="http://www.atmel.com/design-support/">Atmel Support</a> -*/ #ifndef POWER_H_INCLUDED #define POWER_H_INCLUDED
--- a/targets/hal/TARGET_Atmel/TARGET_SAM21/drivers/system/reset/reset_sam_d_r/reset.h Wed Jul 15 08:15:08 2015 +0100 +++ b/targets/hal/TARGET_Atmel/TARGET_SAM21/drivers/system/reset/reset_sam_d_r/reset.h Fri Jul 17 09:15:10 2015 +0100 @@ -1,48 +1,3 @@ -/** - * \file - * - * \brief SAM Reset related functionality - * - * Copyright (C) 2014 Atmel Corporation. All rights reserved. - * - * \asf_license_start - * - * \page License - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are met: - * - * 1. Redistributions of source code must retain the above copyright notice, - * this list of conditions and the following disclaimer. - * - * 2. Redistributions in binary form must reproduce the above copyright notice, - * this list of conditions and the following disclaimer in the documentation - * and/or other materials provided with the distribution. - * - * 3. The name of Atmel may not be used to endorse or promote products derived - * from this software without specific prior written permission. - * - * 4. This software may only be redistributed and used in connection with an - * Atmel microcontroller product. - * - * THIS SOFTWARE IS PROVIDED BY ATMEL "AS IS" AND ANY EXPRESS OR IMPLIED - * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF - * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT ARE - * EXPRESSLY AND SPECIFICALLY DISCLAIMED. IN NO EVENT SHALL ATMEL BE LIABLE FOR - * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL - * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS - * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) - * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, - * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN - * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE - * POSSIBILITY OF SUCH DAMAGE. - * - * \asf_license_stop - * - */ -/** -* Support and FAQ: visit <a href="http://www.atmel.com/design-support/">Atmel Support</a> -*/ #ifndef RESET_H_INCLUDED #define RESET_H_INCLUDED
--- a/targets/hal/TARGET_Atmel/TARGET_SAM21/drivers/system/system.c Wed Jul 15 08:15:08 2015 +0100 +++ b/targets/hal/TARGET_Atmel/TARGET_SAM21/drivers/system/system.c Fri Jul 17 09:15:10 2015 +0100 @@ -1,49 +1,3 @@ -/** - * \file - * - * \brief SAM System related functionality - * - * Copyright (C) 2012-2014 Atmel Corporation. All rights reserved. - * - * \asf_license_start - * - * \page License - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are met: - * - * 1. Redistributions of source code must retain the above copyright notice, - * this list of conditions and the following disclaimer. - * - * 2. Redistributions in binary form must reproduce the above copyright notice, - * this list of conditions and the following disclaimer in the documentation - * and/or other materials provided with the distribution. - * - * 3. The name of Atmel may not be used to endorse or promote products derived - * from this software without specific prior written permission. - * - * 4. This software may only be redistributed and used in connection with an - * Atmel microcontroller product. - * - * THIS SOFTWARE IS PROVIDED BY ATMEL "AS IS" AND ANY EXPRESS OR IMPLIED - * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF - * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT ARE - * EXPRESSLY AND SPECIFICALLY DISCLAIMED. IN NO EVENT SHALL ATMEL BE LIABLE FOR - * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL - * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS - * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) - * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, - * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN - * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE - * POSSIBILITY OF SUCH DAMAGE. - * - * \asf_license_stop - * - */ -/** -* Support and FAQ: visit <a href="http://www.atmel.com/design-support/">Atmel Support</a> -*/ - #include <system.h> /**
--- a/targets/hal/TARGET_Atmel/TARGET_SAM21/drivers/system/system.h Wed Jul 15 08:15:08 2015 +0100 +++ b/targets/hal/TARGET_Atmel/TARGET_SAM21/drivers/system/system.h Fri Jul 17 09:15:10 2015 +0100 @@ -1,48 +1,3 @@ -/** - * \file - * - * \brief SAM System related functionality - * - * Copyright (C) 2012-2014 Atmel Corporation. All rights reserved. - * - * \asf_license_start - * - * \page License - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are met: - * - * 1. Redistributions of source code must retain the above copyright notice, - * this list of conditions and the following disclaimer. - * - * 2. Redistributions in binary form must reproduce the above copyright notice, - * this list of conditions and the following disclaimer in the documentation - * and/or other materials provided with the distribution. - * - * 3. The name of Atmel may not be used to endorse or promote products derived - * from this software without specific prior written permission. - * - * 4. This software may only be redistributed and used in connection with an - * Atmel microcontroller product. - * - * THIS SOFTWARE IS PROVIDED BY ATMEL "AS IS" AND ANY EXPRESS OR IMPLIED - * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF - * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT ARE - * EXPRESSLY AND SPECIFICALLY DISCLAIMED. IN NO EVENT SHALL ATMEL BE LIABLE FOR - * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL - * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS - * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) - * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, - * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN - * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE - * POSSIBILITY OF SUCH DAMAGE. - * - * \asf_license_stop - * - */ -/** -* Support and FAQ: visit <a href="http://www.atmel.com/design-support/">Atmel Support</a> -*/ #ifndef SYSTEM_H_INCLUDED #define SYSTEM_H_INCLUDED
--- a/targets/hal/TARGET_Atmel/TARGET_SAM21/drivers/tc/tc.h Wed Jul 15 08:15:08 2015 +0100 +++ b/targets/hal/TARGET_Atmel/TARGET_SAM21/drivers/tc/tc.h Fri Jul 17 09:15:10 2015 +0100 @@ -1,49 +1,3 @@ -/** - * \file - * - * \brief SAM TC - Timer Counter Driver - * - * Copyright (C) 2013-2014 Atmel Corporation. All rights reserved. - * - * \asf_license_start - * - * \page License - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are met: - * - * 1. Redistributions of source code must retain the above copyright notice, - * this list of conditions and the following disclaimer. - * - * 2. Redistributions in binary form must reproduce the above copyright notice, - * this list of conditions and the following disclaimer in the documentation - * and/or other materials provided with the distribution. - * - * 3. The name of Atmel may not be used to endorse or promote products derived - * from this software without specific prior written permission. - * - * 4. This software may only be redistributed and used in connection with an - * Atmel microcontroller product. - * - * THIS SOFTWARE IS PROVIDED BY ATMEL "AS IS" AND ANY EXPRESS OR IMPLIED - * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF - * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT ARE - * EXPRESSLY AND SPECIFICALLY DISCLAIMED. IN NO EVENT SHALL ATMEL BE LIABLE FOR - * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL - * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS - * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) - * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, - * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN - * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE - * POSSIBILITY OF SUCH DAMAGE. - * - * \asf_license_stop - * - */ -/** -* Support and FAQ: visit <a href="http://www.atmel.com/design-support/">Atmel Support</a> -*/ - #ifndef TC_H_INCLUDED #define TC_H_INCLUDED
--- a/targets/hal/TARGET_Atmel/TARGET_SAM21/drivers/tc/tc_interrupt.c Wed Jul 15 08:15:08 2015 +0100 +++ b/targets/hal/TARGET_Atmel/TARGET_SAM21/drivers/tc/tc_interrupt.c Fri Jul 17 09:15:10 2015 +0100 @@ -1,49 +1,3 @@ -/** - * \file - * - * \brief SAM TC - Timer Counter Callback Driver - * - * Copyright (C) 2013-2014 Atmel Corporation. All rights reserved. - * - * \asf_license_start - * - * \page License - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are met: - * - * 1. Redistributions of source code must retain the above copyright notice, - * this list of conditions and the following disclaimer. - * - * 2. Redistributions in binary form must reproduce the above copyright notice, - * this list of conditions and the following disclaimer in the documentation - * and/or other materials provided with the distribution. - * - * 3. The name of Atmel may not be used to endorse or promote products derived - * from this software without specific prior written permission. - * - * 4. This software may only be redistributed and used in connection with an - * Atmel microcontroller product. - * - * THIS SOFTWARE IS PROVIDED BY ATMEL "AS IS" AND ANY EXPRESS OR IMPLIED - * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF - * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT ARE - * EXPRESSLY AND SPECIFICALLY DISCLAIMED. IN NO EVENT SHALL ATMEL BE LIABLE FOR - * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL - * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS - * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) - * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, - * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN - * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE - * POSSIBILITY OF SUCH DAMAGE. - * - * \asf_license_stop - * - */ -/** -* Support and FAQ: visit <a href="http://www.atmel.com/design-support/">Atmel Support</a> -*/ - #include "tc_interrupt.h" void *_tc_instances[TC_INST_NUM];
--- a/targets/hal/TARGET_Atmel/TARGET_SAM21/drivers/tc/tc_interrupt.h Wed Jul 15 08:15:08 2015 +0100 +++ b/targets/hal/TARGET_Atmel/TARGET_SAM21/drivers/tc/tc_interrupt.h Fri Jul 17 09:15:10 2015 +0100 @@ -1,49 +1,3 @@ -/** - * \file - * - * \brief SAM TC - Timer Counter Callback Driver - * - * Copyright (C) 2013-2014 Atmel Corporation. All rights reserved. - * - * \asf_license_start - * - * \page License - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are met: - * - * 1. Redistributions of source code must retain the above copyright notice, - * this list of conditions and the following disclaimer. - * - * 2. Redistributions in binary form must reproduce the above copyright notice, - * this list of conditions and the following disclaimer in the documentation - * and/or other materials provided with the distribution. - * - * 3. The name of Atmel may not be used to endorse or promote products derived - * from this software without specific prior written permission. - * - * 4. This software may only be redistributed and used in connection with an - * Atmel microcontroller product. - * - * THIS SOFTWARE IS PROVIDED BY ATMEL "AS IS" AND ANY EXPRESS OR IMPLIED - * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF - * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT ARE - * EXPRESSLY AND SPECIFICALLY DISCLAIMED. IN NO EVENT SHALL ATMEL BE LIABLE FOR - * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL - * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS - * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) - * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, - * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN - * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE - * POSSIBILITY OF SUCH DAMAGE. - * - * \asf_license_stop - * - */ -/** -* Support and FAQ: visit <a href="http://www.atmel.com/design-support/">Atmel Support</a> -*/ - #ifndef TC_INTERRUPT_H_INCLUDED #define TC_INTERRUPT_H_INCLUDED
--- a/targets/hal/TARGET_Atmel/TARGET_SAM21/drivers/tc/tc_sam_d_r/tc.c Wed Jul 15 08:15:08 2015 +0100 +++ b/targets/hal/TARGET_Atmel/TARGET_SAM21/drivers/tc/tc_sam_d_r/tc.c Fri Jul 17 09:15:10 2015 +0100 @@ -1,49 +1,3 @@ -/** - * \file - * - * \brief SAM TC - Timer Counter Driver - * - * Copyright (C) 2013-2014 Atmel Corporation. All rights reserved. - * - * \asf_license_start - * - * \page License - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are met: - * - * 1. Redistributions of source code must retain the above copyright notice, - * this list of conditions and the following disclaimer. - * - * 2. Redistributions in binary form must reproduce the above copyright notice, - * this list of conditions and the following disclaimer in the documentation - * and/or other materials provided with the distribution. - * - * 3. The name of Atmel may not be used to endorse or promote products derived - * from this software without specific prior written permission. - * - * 4. This software may only be redistributed and used in connection with an - * Atmel microcontroller product. - * - * THIS SOFTWARE IS PROVIDED BY ATMEL "AS IS" AND ANY EXPRESS OR IMPLIED - * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF - * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT ARE - * EXPRESSLY AND SPECIFICALLY DISCLAIMED. IN NO EVENT SHALL ATMEL BE LIABLE FOR - * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL - * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS - * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) - * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, - * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN - * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE - * POSSIBILITY OF SUCH DAMAGE. - * - * \asf_license_stop - * - */ -/** -* Support and FAQ: visit <a href="http://www.atmel.com/design-support/">Atmel Support</a> -*/ - #include "tc.h" //#if TC_ASYNC == true // TEMP: Commented by V
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/targets/hal/TARGET_Atmel/TARGET_SAM21/gpio_irq_api.c Fri Jul 17 09:15:10 2015 +0100
@@ -0,0 +1,150 @@
+/* mbed Microcontroller Library
+ * Copyright (c) 2006-2013 ARM Limited
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+#include <stddef.h>
+#include "cmsis.h"
+
+#include "gpio_irq_api.h"
+#include "gpio_api.h"
+#include "mbed_error.h"
+#include "extint.h"
+#include "pinmap.h"
+#include "PeripheralPins.h"
+#include "port.h"
+
+#define IRQ_RISE_POSITION 1
+#define IRQ_FALL_POSITION 2
+#define CHANNEL_NUM 16
+#define pEXT_CONF(obj) (obj->config_extint_chan)
+static uint32_t channel_ids[CHANNEL_NUM] = {0};
+static gpio_irq_handler irq_handler;
+uint8_t ext_int_pins[EIC_NUMBER_OF_INTERRUPTS] = {0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF};
+
+void gpio_irq(void)
+{
+ uint32_t current_channel;
+ uint32_t mask;
+ gpio_irq_event event;
+ PortGroup *port_base;
+
+ for (current_channel = 0; current_channel < EIC_NUMBER_OF_INTERRUPTS ; current_channel++) {
+ if (extint_chan_is_detected(current_channel)) {
+ extint_chan_clear_detected(current_channel);
+ port_base = (PortGroup*)port_get_group_from_gpio_pin(ext_int_pins[current_channel]);
+ mask = gpio_set(ext_int_pins[current_channel]);
+ if ((port_base->IN.reg & mask) != 0) {
+ event = IRQ_RISE;
+ } else {
+ event = IRQ_FALL;
+ }
+ irq_handler(channel_ids[current_channel], event);
+ }
+ }
+}
+
+int gpio_irq_init(gpio_irq_t *obj, PinName pin, gpio_irq_handler handler, uint32_t id)
+{
+ MBED_ASSERT(obj);
+ if (pin == NC)
+ return -1;
+
+ IRQn_Type irq_n = (IRQn_Type)0;
+ uint32_t vector = 0;
+ int int_channel = 0;
+ irq_handler = handler; // assuming the usage of these apis in mbed layer only
+
+ obj->pin = pin;
+
+ extint_chan_get_config_defaults(&pEXT_CONF(obj));
+ pEXT_CONF(obj).gpio_pin = (uint32_t)pin;
+ pEXT_CONF(obj).gpio_pin_mux = 0; // mux setting for ext int is 0
+ pEXT_CONF(obj).gpio_pin_pull = EXTINT_PULL_UP;
+ pEXT_CONF(obj).detection_criteria = EXTINT_DETECT_NONE;
+
+ int_channel = pinmap_find_peripheral(pin, PinMap_EXTINT);
+ if (int_channel == NC) {
+ return -1;
+ }
+ extint_chan_set_config(int_channel, &pEXT_CONF(obj));
+ ext_int_pins[int_channel] = pin;
+
+ irq_n = EIC_IRQn;
+ vector = (uint32_t)gpio_irq;
+ NVIC_SetVector(irq_n, vector);
+ NVIC_EnableIRQ(irq_n);
+ obj->ch = int_channel;
+ channel_ids[int_channel] = id;
+
+ return 0;
+}
+
+void gpio_irq_free(gpio_irq_t *obj)
+{
+ MBED_ASSERT(obj);
+ Eic *const eic = _extint_get_eic_from_channel(obj->ch);
+ channel_ids[obj->ch] = 0;
+ eic->INTENCLR.reg = (1UL << obj->ch);
+}
+
+void gpio_irq_set(gpio_irq_t *obj, gpio_irq_event event, uint32_t enable)
+{
+ MBED_ASSERT(obj);
+ Eic *const eic = _extint_get_eic_from_channel(obj->ch);
+ if (enable) {
+ if (event == IRQ_RISE) {
+ obj->irqmask |= IRQ_RISE_POSITION;
+ } else if (event == IRQ_FALL) {
+ obj->irqmask |= IRQ_FALL_POSITION;
+ }
+ eic->INTENSET.reg = (1UL << obj->ch);
+ } else {
+ if (event == IRQ_RISE) {
+ obj->irqmask &= ~IRQ_RISE_POSITION;
+ } else if (event == IRQ_FALL) {
+ obj->irqmask &= ~IRQ_FALL_POSITION;
+ }
+ }
+
+ if (obj->irqmask == (IRQ_RISE_POSITION | IRQ_FALL_POSITION)) {
+ pEXT_CONF(obj).detection_criteria = EXTINT_DETECT_BOTH;
+ } else if (obj->irqmask == IRQ_RISE_POSITION) {
+ pEXT_CONF(obj).detection_criteria = EXTINT_DETECT_RISING;
+ } else if (obj->irqmask == IRQ_FALL_POSITION) {
+ pEXT_CONF(obj).detection_criteria = EXTINT_DETECT_FALLING;
+ } else {
+ pEXT_CONF(obj).detection_criteria = EXTINT_DETECT_NONE;
+ eic->INTENCLR.reg = (1UL << obj->ch);
+ }
+
+ extint_chan_set_config(obj->ch, &pEXT_CONF(obj));
+}
+
+void gpio_irq_enable(gpio_irq_t *obj)
+{
+ MBED_ASSERT(obj);
+ Eic *const eic = _extint_get_eic_from_channel(obj->ch);
+ NVIC_EnableIRQ(EIC_IRQn);
+ eic->INTENSET.reg = (1UL << obj->ch);
+}
+
+void gpio_irq_disable(gpio_irq_t *obj)
+{
+ MBED_ASSERT(obj);
+ Eic *const eic = _extint_get_eic_from_channel(obj->ch);
+ eic->INTENCLR.reg = (1UL << obj->ch);
+ if (eic->INTENSET.reg == 0) {
+ NVIC_DisableIRQ(EIC_IRQn);
+ }
+}
--- a/targets/hal/TARGET_Atmel/TARGET_SAM21/objects.h Wed Jul 15 08:15:08 2015 +0100
+++ b/targets/hal/TARGET_Atmel/TARGET_SAM21/objects.h Fri Jul 17 09:15:10 2015 +0100
@@ -20,21 +20,26 @@
#include "PortNames.h"
#include "PeripheralNames.h"
#include "gpio_object.h"
+#include "adc.h"
+#include "extint.h"
#ifdef __cplusplus
extern "C" {
#endif
struct gpio_irq_s {
+ uint8_t irqmask;
uint32_t port;
uint32_t pin;
uint32_t ch;
+ struct extint_chan_conf config_extint_chan;
};
struct port_s {
__IO uint32_t *OUTCLR;
__IO uint32_t *OUTSET;
__I uint32_t *IN;
+ __I uint32_t *OUT;
PortName port;
uint32_t mask;
@@ -48,16 +53,17 @@
uint32_t character_size;
uint32_t mux_setting;
uint32_t baudrate;
- uint32_t pinmux_pad0;
- uint32_t pinmux_pad1;
- uint32_t pinmux_pad2;
- uint32_t pinmux_pad3;
- PinName rxpin;
- PinName txpin;
+ PinName pins[4];
#if DEVICE_SERIAL_ASYNCH
uint32_t events;
#endif
};
+
+struct analogin_s {
+ ADCName adc;
+ struct adc_module adc_instance;
+ struct adc_config config_adc;
+};
/*
struct pwmout_s {
__IO uint32_t *MR;
@@ -69,10 +75,6 @@
int index;
};
-struct analogin_s {
- ADCName adc;
-};
-
struct dac_s {
DACName dac;
};
@@ -90,6 +92,7 @@
struct spi_s {
Sercom *spi;
uint8_t mode;
+ PinName pins[4];
#if DEVICE_SPI_ASYNCH
uint8_t status;
uint32_t mask;
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/targets/hal/TARGET_Atmel/TARGET_SAM21/pinmap.c Fri Jul 17 09:15:10 2015 +0100
@@ -0,0 +1,108 @@
+/* mbed Microcontroller Library
+ * Copyright (c) 2006-2013 ARM Limited
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+#include <stddef.h>
+#include "us_ticker_api.h"
+#include "cmsis.h"
+#include "mbed_assert.h"
+#include "ins_gclk.h"
+#include "compiler.h"
+#include "system.h"
+
+#include "pinmux.h"
+#include "pinmap.h"
+
+extern uint8_t g_sys_init;
+
+
+static inline void pinmux_get_current_config(PinName pin, struct system_pinmux_config *const config)
+{
+ MBED_ASSERT(pin != (PinName)NC);
+ uint32_t pin_index = pin % 32;
+ uint32_t pin_mask = (uint32_t)(1UL << pin_index);
+
+ PortGroup *const port = system_pinmux_get_group_from_gpio_pin(pin);
+ MBED_ASSERT(port);
+
+ config->mux_position = system_pinmux_pin_get_mux_position(pin);
+
+ if (port->PINCFG[pin_index].reg & PORT_PINCFG_INEN) {
+ if (port->DIR.reg & pin_mask) {
+ config->direction = SYSTEM_PINMUX_PIN_DIR_OUTPUT_WITH_READBACK;
+ config->input_pull = SYSTEM_PINMUX_PIN_PULL_NONE;
+ } else {
+ config->direction = SYSTEM_PINMUX_PIN_DIR_INPUT;
+ if (port->PINCFG[pin_index].reg & PORT_PINCFG_PULLEN) {
+ if (port->OUT.reg & pin_mask) {
+ config->input_pull = SYSTEM_PINMUX_PIN_PULL_UP;
+ } else {
+ config->input_pull = SYSTEM_PINMUX_PIN_PULL_DOWN;
+ }
+ } else {
+ config->input_pull = SYSTEM_PINMUX_PIN_PULL_NONE;
+ }
+ }
+ } else {
+ config->input_pull = SYSTEM_PINMUX_PIN_PULL_NONE;
+ config->direction = SYSTEM_PINMUX_PIN_DIR_OUTPUT;
+ }
+
+ /* Not relevant for now */
+ config->powersave = false;
+}
+
+/** Change the MUX padding of input pin
+ *
+ * Configure the pin for specific module
+ * @param[in] pin Pin name whose MUX padding is to be changed
+ * @param[in] function The MUX mode to be selected
+ * @return void
+ */
+void pin_function(PinName pin, int function)
+{
+ MBED_ASSERT(pin != (PinName)NC);
+
+ struct system_pinmux_config pin_conf;
+
+ pinmux_get_current_config(pin, &pin_conf);
+ pin_conf.mux_position = function;
+
+ system_pinmux_pin_set_config(pin, &pin_conf);
+}
+
+/** Change the pin pull mode
+ *
+ * Configure the pin pull mode
+ * @param[in] pin Pin name whose MUX padding is to be changed
+ * @param[in] mode Pin pull mode to be set
+ * @return void
+ */
+void pin_mode(PinName pin, PinMode mode)
+{
+ MBED_ASSERT(pin != (PinName)NC);
+
+ struct system_pinmux_config pin_conf;
+
+ pinmux_get_current_config(pin, &pin_conf);
+ if (mode == PullUp) {
+ pin_conf.input_pull = SYSTEM_PINMUX_PIN_PULL_UP;
+ } else if (mode == PullDown) {
+ pin_conf.input_pull = SYSTEM_PINMUX_PIN_PULL_DOWN;
+ } else {
+ pin_conf.input_pull = SYSTEM_PINMUX_PIN_PULL_NONE;
+ }
+
+ system_pinmux_pin_set_config(pin, &pin_conf);
+}
\ No newline at end of file
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/targets/hal/TARGET_Atmel/TARGET_SAM21/pinmap_function.c Fri Jul 17 09:15:10 2015 +0100
@@ -0,0 +1,221 @@
+/* mbed Microcontroller Library
+ * Copyright (c) 2006-2013 ARM Limited
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+#include <stddef.h>
+#include "us_ticker_api.h"
+#include "cmsis.h"
+#include "mbed_assert.h"
+#include "ins_gclk.h"
+#include "compiler.h"
+#include "system.h"
+
+#include "pinmap_function.h"
+
+static uint32_t pinmap_merge_pins(uint32_t a, uint32_t b)
+{
+ // both are the same (inc both NC)
+ if (a == b)
+ return a;
+
+ // one (or both) is not connected
+ if (a == (uint32_t)NC)
+ return b;
+ if (b == (uint32_t)NC)
+ return a;
+
+ return (uint32_t)NC;
+}
+
+/** Find the common SERCOM shared by two pins
+ *
+ * Finds the common SERCOM index of two input pins.
+ * If swapping the input argument gives different result, it means, two SERCOMs share both pins
+ * @param[in] pin1 First pin
+ * @param[in] pin2 Second pin
+ * @return SERCOM index if found, else, NC
+ */
+uint32_t pinmap_merge_sercom(PinName pin1, PinName pin2)
+{
+ int i, j;
+ uint32_t pin1_sercom[2];
+ uint32_t pin2_sercom[2];
+ uint32_t sercom_index[4];
+
+ uint32_t pin_com = NC;
+ uint32_t pin_alt = NC;
+ uint32_t count_com = 0;
+ uint32_t count_alt = 0;
+
+ /* Adding a condition check just in case we need a different result when swapping arguments */
+ if (pin1 >= pin2) {
+ pin1_sercom[0] = pinmap_find_peripheral(pin1, PinMap_SERCOM_PAD);
+ pin1_sercom[1] = pinmap_find_peripheral(pin1, PinMap_SERCOM_PADEx);
+ } else {
+ pin1_sercom[0] = pinmap_find_peripheral(pin1, PinMap_SERCOM_PADEx);
+ pin1_sercom[1] = pinmap_find_peripheral(pin1, PinMap_SERCOM_PAD);
+ }
+
+ pin2_sercom[0] = pinmap_find_peripheral(pin2, PinMap_SERCOM_PAD);
+ pin2_sercom[1] = pinmap_find_peripheral(pin2, PinMap_SERCOM_PADEx);
+
+ for (i=0; i<2; i++) {
+ if (pin1_sercom[i] != NC) {
+ pin1_sercom[i] &= 0x0F;
+ }
+ for (j=0; j<2; j++) {
+ if (pin2_sercom[i] != NC) {
+ pin2_sercom[i] &= 0x0F;
+ }
+ sercom_index[(i*2) + j] = pinmap_merge_pins(pin1_sercom[i], pin2_sercom[j]);
+ }
+ }
+
+ for (i=0; i<4; i++) {
+ if (sercom_index[i] != NC) {
+ if (pin_com == NC) {
+ pin_com = sercom_index[i];
+ count_com++;
+ } else if (pin_com == sercom_index[i]) {
+ count_com++;
+ } else if (pin_alt == NC) {
+ pin_alt = sercom_index[i];
+ count_alt++;
+ } else if (pin_alt == sercom_index[i]) {
+ count_alt++;
+ } else {}
+ }
+ }
+ return ((count_com >= count_alt) ? pin_com : pin_alt);
+}
+
+/** Find the common SERCOM shared by four pins
+ *
+ * Finds the common SERCOM index shared by four input pins.
+ * If reversing the input argument order gives different result, it means, two SERCOMs share the pins
+ * @param[in] pin1 First pin
+ * @param[in] pin2 Second pin
+ * @param[in] pin3 Third pin
+ * @param[in] pin4 Fourth pin
+ * @return SERCOM index if found, else, NC
+ */
+uint32_t pinmap_find_sercom(PinName pin1, PinName pin2, PinName pin3, PinName pin4)
+{
+ int i;
+ uint32_t sercom_index[4];
+ uint32_t pin_com = NC;
+ uint32_t pin_alt = NC;
+ uint32_t count_com = 0;
+ uint32_t count_alt = 0;
+
+ sercom_index[0] = pinmap_merge_sercom(pin1, pin2);
+ sercom_index[1] = pinmap_merge_sercom(pin3, pin3);
+ sercom_index[2] = pinmap_merge_sercom(pin1, pin3);
+ sercom_index[3] = pinmap_merge_sercom(pin2, pin4);
+
+
+ for (i=0; i<4; i++) {
+ if (sercom_index[i] != NC) {
+ if (pin_com == NC) {
+ pin_com = sercom_index[i];
+ count_com++;
+ } else if (pin_com == sercom_index[i]) {
+ count_com++;
+ } else if (pin_alt == NC) {
+ pin_alt = sercom_index[i];
+ count_alt++;
+ } else if (pin_alt == sercom_index[i]) {
+ count_alt++;
+ } else {}
+ }
+ }
+ return ((count_com >= count_alt) ? pin_com : pin_alt);
+}
+
+/** Find the MUX function of input pin specific to given SERCOM index
+ *
+ * @param[in] pin Pin whose function is to be found out
+ * @param[in] sercom_index SERCOM index
+ * @return MUX function if found, else, NC
+ */
+uint32_t pinmap_function_sercom(PinName pin, uint32_t sercom_index)
+{
+ uint32_t func = NC;
+ uint32_t index;
+ sercom_index &= 0x0F;
+
+ if ((pin == NC) || (sercom_index >= SERCOM_INST_NUM)) {
+ return NC;
+ }
+ index = pinmap_peripheral(pin, PinMap_SERCOM_PAD);
+ if ((index & 0x0F) == sercom_index) {
+ func = pinmap_function(pin, PinMap_SERCOM_PAD);
+ return func;
+ }
+ index = pinmap_peripheral(pin, PinMap_SERCOM_PADEx);
+ if ((index & 0x0F) == sercom_index) {
+ func = pinmap_function(pin, PinMap_SERCOM_PADEx);
+ return func;
+ }
+ return NC;
+}
+
+/** Find the MUX pad of input pin specific to given SERCOM index
+ *
+ * @param[in] pin Pin whose function is to be found out
+ * @param[in] sercom_index SERCOM index
+ * @return MUX pad if found, else, NC
+ */
+uint32_t pinmap_pad_sercom(PinName pin, uint32_t sercom_index)
+{
+ uint32_t index;
+ sercom_index &= 0x0F;
+
+ if ((pin == NC) || (sercom_index >= SERCOM_INST_NUM)) {
+ return NC;
+ }
+ index = pinmap_peripheral(pin, PinMap_SERCOM_PAD);
+ if ((index & 0x0F) == sercom_index) {
+ return ((index >> 4) & 0x0F);
+ }
+ index = pinmap_peripheral(pin, PinMap_SERCOM_PADEx);
+ if ((index & 0x0F) == sercom_index) {
+ return ((index >> 4) & 0x0F);
+ }
+ return NC;
+}
+
+/** Find the MUX function of input pin specific to given SERCOM index
+ *
+ * @param[in] pin unused
+ * @param[in] sercom_index SERCOM index
+ * @return base address to SERCOM if found, else NC
+ */
+uint32_t pinmap_peripheral_sercom(PinName pin, uint32_t sercom_index)
+{
+ uint32_t sercom_address[6] = {
+ 0x42000800UL, // Base address of SERCOM0
+ 0x42000C00UL, // Base address of SERCOM1
+ 0x42001000UL, // Base address of SERCOM2
+ 0x42001400UL, // Base address of SERCOM3
+ 0x42001800UL, // Base address of SERCOM4
+ 0x42001C00UL // Base address of SERCOM5
+ };
+ uint32_t index = sercom_index & 0x0F;
+
+ if (index >= SERCOM_INST_NUM) {
+ return NC;
+ }
+ return sercom_address[(sercom_index&0x0F)];
+}
\ No newline at end of file
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/targets/hal/TARGET_Atmel/TARGET_SAM21/pinmap_function.h Fri Jul 17 09:15:10 2015 +0100
@@ -0,0 +1,82 @@
+/* mbed Microcontroller Library
+ * Copyright (c) 2006-2013 ARM Limited
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+#ifndef PINMAP_FUNCTION_H
+#define PINMAP_FUNCTION_H
+
+#include <compiler.h>
+#include "cmsis.h"
+#include "PinNames.h"
+#include "pinmux.h"
+#include "pinmap.h"
+
+#include "PeripheralPins.h"
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+
+/** Find the common SERCOM shared by two pins
+ *
+ * Finds the common SERCOM index of two input pins.
+ * If swapping the input argument gives different result, it means, two SERCOMs share both pins
+ * @param[in] pin1 First pin
+ * @param[in] pin2 Second pin
+ * @return SERCOM index if found, else, NC
+ */
+uint32_t pinmap_merge_sercom(PinName pin1, PinName pin2);
+
+/** Find the common SERCOM shared by four pins
+ *
+ * Finds the common SERCOM index shared by four input pins.
+ * If reversing the input argument order gives different result, it means, two SERCOMs share the pins
+ * @param[in] pin1 First pin
+ * @param[in] pin2 Second pin
+ * @param[in] pin3 Third pin
+ * @param[in] pin4 Fourth pin
+ * @return SERCOM index if found, else, NC
+ */
+uint32_t pinmap_find_sercom(PinName pin1, PinName pin2, PinName pin3, PinName pin4);
+
+/** Find the MUX function of input pin specific to given SERCOM index
+ *
+ * @param[in] pin Pin whose function is to be found out
+ * @param[in] sercom_index SERCOM index
+ * @return MUX function if found, else, NC
+ */
+uint32_t pinmap_function_sercom(PinName pin, uint32_t sercom_index);
+
+/** Find the MUX pad of input pin specific to given SERCOM index
+ *
+ * @param[in] pin Pin whose function is to be found out
+ * @param[in] sercom_index SERCOM index
+ * @return MUX pad if found, else, NC
+ */
+uint32_t pinmap_pad_sercom(PinName pin, uint32_t sercom_index);
+
+/** Find the MUX function of input pin specific to given SERCOM index
+ *
+ * @param[in] pin unused
+ * @param[in] sercom_index SERCOM index
+ * @return base address to SERCOM if found, else NC
+ */
+uint32_t pinmap_peripheral_sercom(PinName pin, uint32_t sercom_index);
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* PINMAP_FUNCTION_H */
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/targets/hal/TARGET_Atmel/TARGET_SAM21/port_api.c Fri Jul 17 09:15:10 2015 +0100
@@ -0,0 +1,39 @@
+/* mbed Microcontroller Library
+ * Copyright (c) 2006-2013 ARM Limited
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+#include "port_api.h"
+#include "pinmap.h"
+#include "gpio_api.h"
+
+void port_init(port_t *obj, PortName port, int mask, PinDirection dir)
+{
+}
+
+void port_mode(port_t *obj, PinMode mode)
+{
+}
+
+void port_dir(port_t *obj, PinDirection dir)
+{
+}
+
+void port_write(port_t *obj, int value)
+{
+}
+
+int port_read(port_t *obj)
+{
+ return 0;
+}
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/targets/hal/TARGET_Atmel/TARGET_SAM21/rtc_api.c Fri Jul 17 09:15:10 2015 +0100
@@ -0,0 +1,118 @@
+/* mbed Microcontroller Library
+ * Copyright (c) 2006-2013 ARM Limited
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+#include "mbed_assert.h"
+#include "rtc_api.h"
+
+#include <math.h>
+
+#include "cmsis.h"
+#include "system.h"
+
+#include "rtc_count.h"
+
+/* Global RTC instance*/
+static struct rtc_module rtc_instance;
+
+static int rtc_inited = 0;
+
+/* Extern variables */
+extern uint8_t g_sys_init;
+
+/** Initialize the RTC
+ *
+ * Initialize the RTC with default time
+ * @param[void] void
+ */
+void rtc_init(void)
+{
+ if (g_sys_init == 0) {
+ system_init();
+ g_sys_init = 1;
+ }
+
+ struct rtc_count_config config_rtc_count;
+
+ rtc_count_get_config_defaults(&config_rtc_count);
+
+ config_rtc_count.prescaler = RTC_COUNT_PRESCALER_DIV_1024;
+ config_rtc_count.mode = RTC_COUNT_MODE_32BIT;
+#ifdef FEATURE_RTC_CONTINUOUSLY_UPDATED
+ config_rtc_count.continuously_update = true;
+#endif
+
+ rtc_count_init(&rtc_instance, RTC, &config_rtc_count);
+
+ rtc_count_enable(&rtc_instance);
+ rtc_inited = 1;
+}
+
+/** Frees the RTC
+ *
+ * @param[void] void
+ */
+void rtc_free(void)
+{
+ if (rtc_inited) {
+ /* Disable the RTC module */
+ rtc_count_disable(&rtc_instance);
+ /* Disable the RTC clock */
+ system_gclk_chan_disable(RTC_GCLK_ID);
+ rtc_inited = 0;
+ }
+}
+
+/** Checks whether RTC is enabled or not
+ *
+ * To check whether RTC module is enabled or not
+ * @param[void] void
+ * @return Non zero if RTC is already enabled, else zero
+ */
+int rtc_isenabled(void)
+{
+ return rtc_inited;
+}
+
+/** Reads the RTC value
+ *
+ * Reads and return the current time in RTC
+ * @param[void] void
+ * @return the current value in RTC
+ */
+time_t rtc_read(void)
+{
+ if (!rtc_inited) {
+ /* Return invalid time for now! */
+ return 0;
+ }
+ return (time_t)rtc_count_get_count(&rtc_instance);
+}
+
+/** Write the RTC value
+ *
+ * Update the time value in RTC
+ * @param[in] t The time value to be written
+ * @return void
+ */
+void rtc_write(time_t t)
+{
+ if (!rtc_inited) {
+ /* Initialize the RTC is not yet initialized */
+ rtc_init();
+ }
+
+ uint32_t count_value = (uint32_t)t;
+ rtc_count_set_count(&rtc_instance, count_value);
+}
\ No newline at end of file
--- a/targets/hal/TARGET_Atmel/TARGET_SAM21/serial_api.c Wed Jul 15 08:15:08 2015 +0100
+++ b/targets/hal/TARGET_Atmel/TARGET_SAM21/serial_api.c Fri Jul 17 09:15:10 2015 +0100
@@ -20,7 +20,12 @@
#include "pinmap.h"
#include "PeripheralPins.h"
#include "usart.h"
-#include "samr21_xplained_pro.h"
+#include "pinmap_function.h"
+
+#define USART_TX_INDEX 0
+#define USART_RX_INDEX 1
+#define USART_RXFLOW_INDEX 2
+#define USART_TXFLOW_INDEX 3
#if DEVICE_SERIAL_ASYNCH
#define pUSART_S(obj) obj->serial.usart
@@ -35,6 +40,13 @@
uint8_t serial_get_index(serial_t *obj);
IRQn_Type get_serial_irq_num (serial_t *obj);
+uint32_t get_serial_vector (serial_t *obj);
+void uart0_irq();
+void uart1_irq();
+void uart2_irq();
+void uart3_irq();
+void uart4_irq();
+void uart5_irq();
static uint32_t serial_irq_ids[USART_NUM] = {0};
static uart_irq_handler irq_handler;
@@ -90,9 +102,54 @@
_USART(obj).CTRLA.reg = SERCOM_USART_CTRLA_SWRST;
}
-static enum status_code usart_set_config_default( serial_t *obj)
+uint32_t serial_find_mux_settings (serial_t *obj)
{
+ /* Sanity check arguments */
+ MBED_ASSERT(obj);
+ uint32_t mux_setting = 0;
+ uint32_t pinpad[4] = {0};
+ uint8_t i = 0;
+ uint32_t sercom_index = pinmap_merge_sercom(pSERIAL_S(obj)->pins[0], pSERIAL_S(obj)->pins[1]);
+ for (i = 0; i < 4 ; i++) {
+ pinpad[i] = pinmap_pad_sercom(pSERIAL_S(obj)->pins[i], sercom_index);
+ }
+
+ switch(pinpad[USART_RX_INDEX]) {
+ case 0:
+ mux_setting |= SERCOM_USART_CTRLA_RXPO(0);
+ break;
+ case 1:
+ mux_setting |= SERCOM_USART_CTRLA_RXPO(1);
+ break;
+ case 2:
+ mux_setting |= SERCOM_USART_CTRLA_RXPO(2);
+ break;
+ case 3:
+ mux_setting |= SERCOM_USART_CTRLA_RXPO(3);
+ break;
+ }
+
+ if ((pSERIAL_S(obj)->pins[USART_RXFLOW_INDEX] == NC) && (pSERIAL_S(obj)->pins[USART_TXFLOW_INDEX] == NC)) {
+ if (pinpad[USART_TX_INDEX] == 0) {
+ mux_setting |= SERCOM_USART_CTRLA_TXPO(0);
+ } else if(pinpad[USART_RX_INDEX] == 2) {
+ mux_setting |= SERCOM_USART_CTRLA_TXPO(1);
+ } else {
+ mux_setting = mux_setting; // dummy condition
+ }
+ } else { // for hardware flow control and uart // expecting the tx in pad 0, rts in pad2 and cts in pad 3
+ if((pinpad[USART_TX_INDEX] == 0) && (pinpad[USART_RXFLOW_INDEX]/*rts pin*/ == 2) && (pinpad[USART_TXFLOW_INDEX] /*cts pin*/ == 3)) {
+ mux_setting |= SERCOM_USART_CTRLA_TXPO(2);
+ }
+ }
+ return mux_setting;
+}
+
+static enum status_code usart_set_config_default(serial_t *obj)
+{
+ /* Sanity check arguments */
+ MBED_ASSERT(obj);
/* Index for generic clock */
uint32_t sercom_index = _sercom_get_sercom_inst_index(pUSART_S(obj));
uint32_t gclk_index = sercom_index + SERCOM0_GCLK_ID_CORE;
@@ -155,85 +212,60 @@
void get_default_serial_values(serial_t *obj)
{
+ /* Sanity check arguments */
+ MBED_ASSERT(obj);
/* Set default config to object */
pSERIAL_S(obj)->parity = USART_PARITY_NONE;
pSERIAL_S(obj)->stopbits = USART_STOPBITS_1;
pSERIAL_S(obj)->character_size = USART_CHARACTER_SIZE_8BIT;
pSERIAL_S(obj)->baudrate = 9600;
pSERIAL_S(obj)->mux_setting = USART_RX_1_TX_2_XCK_3;
- pSERIAL_S(obj)->pinmux_pad0 = PINMUX_DEFAULT;
- pSERIAL_S(obj)->pinmux_pad1 = PINMUX_DEFAULT;
- pSERIAL_S(obj)->pinmux_pad2 = PINMUX_DEFAULT;
- pSERIAL_S(obj)->pinmux_pad3 = PINMUX_DEFAULT;
};
void serial_init(serial_t *obj, PinName tx, PinName rx)
{
+ /* Sanity check arguments */
+ MBED_ASSERT(obj);
if (g_sys_init == 0) {
system_init();
g_sys_init = 1;
}
-
struct system_gclk_chan_config gclk_chan_conf;
UARTName uart;
uint32_t gclk_index;
uint32_t pm_index;
uint32_t sercom_index = 0;
uint32_t muxsetting = 0;
- uint32_t padsetting[4] = {0};
/* Disable USART module */
disable_usart(obj);
get_default_serial_values(obj);
- find_pin_settings(tx, rx, NC, NC, &padsetting[0]); // tx, rx, clk(rts), chipsel(cts) pad array // getting pads from pins
- muxsetting = find_mux_setting(tx, rx, NC, NC); // getting mux setting from pins
- sercom_index = pinmap_sercom_peripheral(tx, rx); // same variable sercom_index reused for optimization
- switch (sercom_index) {
- case 0:
- uart = UART_0;
- pUSART_S(obj) = SERCOM0;
- break;
- case 1:
- uart = UART_1;
- pUSART_S(obj) = SERCOM1;
- break;
- case 2:
- uart = UART_2;
- pUSART_S(obj) = SERCOM2;
- break;
- case 3:
- uart = UART_3;
- pUSART_S(obj) = SERCOM3;
- break;
- case 4:
- uart = UART_4;
- pUSART_S(obj) = SERCOM4;
- break;
- case 5:
- uart = UART_5;
- pUSART_S(obj) = SERCOM5;
- break;
+ pSERIAL_S(obj)->pins[USART_TX_INDEX] = tx;
+ pSERIAL_S(obj)->pins[USART_RX_INDEX] = rx;
+ pSERIAL_S(obj)->pins[USART_RXFLOW_INDEX] = NC;
+ pSERIAL_S(obj)->pins[USART_TXFLOW_INDEX] = NC;
+
+ muxsetting = serial_find_mux_settings(obj); // getting mux setting from pins
+ sercom_index = pinmap_merge_sercom(tx, rx); // same variable sercom_index reused for optimization
+ if (sercom_index == (uint32_t)NC) {
+ /*expecting a valid value for sercom index*/
+ return;
}
-
- pSERIAL_S(obj)->txpin = tx;
- pSERIAL_S(obj)->rxpin = rx;
- pSERIAL_S(obj)->mux_setting = muxsetting;//EDBG_CDC_SERCOM_MUX_SETTING;
- pSERIAL_S(obj)->pinmux_pad0 = padsetting[0];//EDBG_CDC_SERCOM_PINMUX_PAD0;
- pSERIAL_S(obj)->pinmux_pad1 = padsetting[1];//EDBG_CDC_SERCOM_PINMUX_PAD1;
- pSERIAL_S(obj)->pinmux_pad2 = padsetting[2];//EDBG_CDC_SERCOM_PINMUX_PAD2;
- pSERIAL_S(obj)->pinmux_pad3 = padsetting[3];//EDBG_CDC_SERCOM_PINMUX_PAD3;
+ sercom_index &= 0x0F;
+ uart = pinmap_peripheral_sercom(NC, sercom_index);
+ pUSART_S(obj) = (Sercom *)uart;
pm_index = sercom_index + PM_APBCMASK_SERCOM0_Pos;
gclk_index = sercom_index + SERCOM0_GCLK_ID_CORE;
if (_USART(obj).CTRLA.reg & SERCOM_USART_CTRLA_SWRST) {
- /* The module is busy resetting itself */
+ return; /* The module is busy resetting itself */
}
if (_USART(obj).CTRLA.reg & SERCOM_USART_CTRLA_ENABLE) {
- /* Check the module is enabled */
+ return; /* Check the module is enabled */
}
/* Turn on module in PM */
@@ -245,29 +277,23 @@
system_gclk_chan_enable(gclk_index);
sercom_set_gclk_generator(GCLK_GENERATOR_0, false);
+ pSERIAL_S(obj)->mux_setting = muxsetting;
/* Set configuration according to the config struct */
usart_set_config_default(obj);
+
struct system_pinmux_config pin_conf;
- system_pinmux_get_config_defaults(&pin_conf);
pin_conf.direction = SYSTEM_PINMUX_PIN_DIR_INPUT;
pin_conf.input_pull = SYSTEM_PINMUX_PIN_PULL_NONE;
-
- uint32_t pad_pinmuxes[] = {
- pSERIAL_S(obj)->pinmux_pad0, pSERIAL_S(obj)->pinmux_pad1,
- pSERIAL_S(obj)->pinmux_pad2, pSERIAL_S(obj)->pinmux_pad3
- };
+ pin_conf.powersave = false;
/* Configure the SERCOM pins according to the user configuration */
for (uint8_t pad = 0; pad < 4; pad++) {
- uint32_t current_pinmux = pad_pinmuxes[pad];
-
- if (current_pinmux == PINMUX_DEFAULT) {
- current_pinmux = _sercom_get_default_pad(pUSART_S(obj), pad);
- }
-
- if (current_pinmux != PINMUX_UNUSED) {
- pin_conf.mux_position = current_pinmux & 0xFFFF;
- system_pinmux_pin_set_config(current_pinmux >> 16, &pin_conf);
+ uint32_t current_pin = pSERIAL_S(obj)->pins[pad];
+ if (current_pin != (uint32_t)NC) {
+ pin_conf.mux_position = pinmap_function_sercom(current_pin, sercom_index);
+ if ((uint8_t)NC != pin_conf.mux_position) {
+ system_pinmux_pin_set_config(current_pin, &pin_conf);
+ }
}
}
@@ -275,23 +301,25 @@
stdio_uart_inited = 1;
memcpy(&stdio_uart, obj, sizeof(serial_t));
}
-
/* Wait until synchronization is complete */
usart_syncing(obj);
/* Enable USART module */
enable_usart(obj);
-
}
void serial_free(serial_t *obj)
{
+ /* Sanity check arguments */
+ MBED_ASSERT(obj);
serial_irq_ids[serial_get_index(obj)] = 0;
disable_usart(obj);
}
void serial_baud(serial_t *obj, int baudrate)
{
+ /* Sanity check arguments */
+ MBED_ASSERT(obj);
MBED_ASSERT((baudrate == 110) || (baudrate == 150) || (baudrate == 300) || (baudrate == 1200) ||
(baudrate == 2400) || (baudrate == 4800) || (baudrate == 9600) || (baudrate == 19200) || (baudrate == 38400) ||
(baudrate == 57600) || (baudrate == 115200) || (baudrate == 230400) || (baudrate == 460800) || (baudrate == 921600) );
@@ -330,6 +358,8 @@
void serial_format(serial_t *obj, int data_bits, SerialParity parity, int stop_bits)
{
+ /* Sanity check arguments */
+ MBED_ASSERT(obj);
MBED_ASSERT((stop_bits == 1) || (stop_bits == 2));
MBED_ASSERT((parity == ParityNone) || (parity == ParityOdd) || (parity == ParityEven));
MBED_ASSERT((data_bits == 5) || (data_bits == 6) || (data_bits == 7) || (data_bits == 8) /*|| (data_bits == 9)*/);
@@ -418,117 +448,114 @@
}
#ifdef DEVICE_SERIAL_FC
-void uart0_irq();
-void uart1_irq();
-void uart2_irq();
-void uart3_irq();
-void uart4_irq();
-void uart5_irq();
void serial_set_flow_control(serial_t *obj, FlowControl type, PinName rxflow, PinName txflow)
{
+ /* Sanity check arguments */
+ MBED_ASSERT(obj);
uint32_t muxsetting = 0;
uint32_t sercom_index = 0;
- uint32_t padsetting[4] = {0};
-
IRQn_Type irq_n = (IRQn_Type)0;
uint32_t vector = 0;
- switch ((int)pUSART_S(obj)) {
- case UART_0:
- vector = (uint32_t)uart0_irq;
- break;
- case UART_1:
- vector = (uint32_t)uart1_irq;
- break;
- case UART_2:
- vector = (uint32_t)uart2_irq;
- break;
- case UART_3:
- vector = (uint32_t)uart3_irq;
- break;
- case UART_4:
- vector = (uint32_t)uart4_irq;
- break;
- case UART_5:
- vector = (uint32_t)uart5_irq;
- break;
+ pSERIAL_S(obj)->pins[USART_RXFLOW_INDEX] = rxflow;
+ pSERIAL_S(obj)->pins[USART_TXFLOW_INDEX] = txflow;
+ muxsetting = serial_find_mux_settings(obj); // getting mux setting from pins
+ sercom_index = pinmap_merge_sercom(pSERIAL_S(obj)->pins[USART_TX_INDEX], pSERIAL_S(obj)->pins[USART_RX_INDEX]); // same variable sercom_index reused for optimization
+ if (sercom_index == (uint32_t)NC) {
+ /*expecting a valid value for sercom index*/
+ return;
}
+
+ vector = get_serial_vector(obj);
irq_n = get_serial_irq_num(obj);
disable_usart(obj);
- //TODO : assert for rxflow and txflow pis to be added
- find_pin_settings(pSERIAL_S(obj)->txpin, pSERIAL_S(obj)->rxpin, rxflow, txflow, &padsetting[0]); // tx, rx, clk(rts), chipsel(cts) pad array // getting pads from pins
- muxsetting = find_mux_setting(pSERIAL_S(obj)->txpin, pSERIAL_S(obj)->rxpin, rxflow, txflow); // getting mux setting from pins
-
- pSERIAL_S(obj)->mux_setting = muxsetting;//EDBG_CDC_SERCOM_MUX_SETTING;
- pSERIAL_S(obj)->pinmux_pad0 = padsetting[0];//EDBG_CDC_SERCOM_PINMUX_PAD0;
- pSERIAL_S(obj)->pinmux_pad1 = padsetting[1];//EDBG_CDC_SERCOM_PINMUX_PAD1;
- pSERIAL_S(obj)->pinmux_pad2 = padsetting[2];//EDBG_CDC_SERCOM_PINMUX_PAD2;
- pSERIAL_S(obj)->pinmux_pad3 = padsetting[3];//EDBG_CDC_SERCOM_PINMUX_PAD3;
/* Set configuration according to the config struct */
+ pSERIAL_S(obj)->mux_setting = muxsetting; // mux setting to be changed for configuring hardware control
usart_set_config_default(obj);
struct system_pinmux_config pin_conf;
- system_pinmux_get_config_defaults(&pin_conf);
pin_conf.direction = SYSTEM_PINMUX_PIN_DIR_INPUT;
pin_conf.input_pull = SYSTEM_PINMUX_PIN_PULL_NONE;
-
- uint32_t pad_pinmuxes[] = {
- pSERIAL_S(obj)->pinmux_pad0, pSERIAL_S(obj)->pinmux_pad1,
- pSERIAL_S(obj)->pinmux_pad2, pSERIAL_S(obj)->pinmux_pad3
- };
+ pin_conf.powersave = false;
- /* Configure the SERCOM pins according to the user configuration */
- for (uint8_t pad = 0; pad < 3; pad++) {
- uint32_t current_pinmux = pad_pinmuxes[pad];
-
- if (current_pinmux == PINMUX_DEFAULT) {
- current_pinmux = _sercom_get_default_pad(pUSART_S(obj), pad);
- }
-
- if (current_pinmux != PINMUX_UNUSED) {
- pin_conf.mux_position = current_pinmux & 0xFFFF;
- system_pinmux_pin_set_config(current_pinmux >> 16, &pin_conf);
+ for (uint8_t pad = 0; pad < 2; pad++) { // setting for rx and tx
+ uint32_t current_pin = pSERIAL_S(obj)->pins[pad];
+ if (current_pin != (uint32_t)NC) {
+ pin_conf.mux_position = pinmap_function_sercom(current_pin, sercom_index);
+ if ((uint8_t)NC != pin_conf.mux_position) {
+ system_pinmux_pin_set_config(current_pin, &pin_conf);
+ }
}
}
- if (pSERIAL_S(obj)->pinmux_pad3 != PINMUX_UNUSED) {
- pin_conf.input_pull = SYSTEM_PINMUX_PIN_PULL_UP;
- pin_conf.mux_position = pSERIAL_S(obj)->pinmux_pad3 & 0xFFFF;
- system_pinmux_pin_set_config(pSERIAL_S(obj)->pinmux_pad3 >> 16, &pin_conf);
+ if((FlowControlRTS == type) || (FlowControlRTSCTS== type)) {
+ if (pSERIAL_S(obj)->pins[USART_RXFLOW_INDEX] != NC) {
+ pin_conf.direction = SYSTEM_PINMUX_PIN_DIR_OUTPUT; // setting for rxflow
+ pin_conf.input_pull = SYSTEM_PINMUX_PIN_PULL_UP;
+ pin_conf.mux_position = pinmap_function_sercom(pSERIAL_S(obj)->pins[USART_RXFLOW_INDEX] , sercom_index);
+ if ((uint8_t)NC != pin_conf.mux_position) {
+ system_pinmux_pin_set_config(pSERIAL_S(obj)->pins[USART_RXFLOW_INDEX], &pin_conf);
+ }
+ }
}
+ if((FlowControlCTS == type) || (FlowControlRTSCTS== type)) {
+ if (pSERIAL_S(obj)->pins[USART_TXFLOW_INDEX] != NC) {
+ pin_conf.direction = SYSTEM_PINMUX_PIN_DIR_INPUT; // setting for txflow
+ pin_conf.input_pull = SYSTEM_PINMUX_PIN_PULL_UP;
+ pin_conf.mux_position = pinmap_function_sercom(pSERIAL_S(obj)->pins[USART_TXFLOW_INDEX] , sercom_index);
+ if ((uint8_t)NC != pin_conf.mux_position) {
+ system_pinmux_pin_set_config(pSERIAL_S(obj)->pins[USART_TXFLOW_INDEX], &pin_conf);
+ }
+ }
+ }
+ enable_usart(obj);
+}
- NVIC_SetVector(irq_n, vector);
- NVIC_EnableIRQ(irq_n);
-
- enable_usart(obj);
- _USART(obj).INTENSET.reg = SERCOM_USART_INTENCLR_CTSIC;
-}
+#endif //DEVICE_SERIAL_FC
void serial_break_set(serial_t *obj)
{
- disable_usart(obj);
- _USART(obj).CTRLB.reg &= ~SERCOM_SPI_CTRLB_RXEN;
- usart_syncing(obj);
- enable_usart(obj);
+ /* Sanity check arguments */
+ MBED_ASSERT(obj);
+ struct system_pinmux_config pin_conf;
+ pin_conf.direction = SYSTEM_PINMUX_PIN_DIR_OUTPUT;
+ pin_conf.input_pull = SYSTEM_PINMUX_PIN_PULL_NONE;
+ pin_conf.mux_position = SYSTEM_PINMUX_GPIO;
+ pin_conf.powersave = false;
+
+ if (pSERIAL_S(obj)->pins[USART_TX_INDEX] != NC) {
+ system_pinmux_pin_set_config(pSERIAL_S(obj)->pins[USART_TX_INDEX], &pin_conf);
+ }
}
void serial_break_clear(serial_t *obj)
{
- disable_usart(obj);
- _USART(obj).CTRLB.reg |= SERCOM_SPI_CTRLB_RXEN;
- usart_syncing(obj);
- enable_usart(obj);
+ /* Sanity check arguments */
+ MBED_ASSERT(obj);
+ uint32_t sercom_index = pinmap_merge_sercom(pSERIAL_S(obj)->pins[USART_TX_INDEX], pSERIAL_S(obj)->pins[USART_RX_INDEX]);
+
+ struct system_pinmux_config pin_conf;
+ pin_conf.direction = SYSTEM_PINMUX_PIN_DIR_INPUT;
+ pin_conf.input_pull = SYSTEM_PINMUX_PIN_PULL_NONE;
+ pin_conf.powersave = false;
+
+ if (pSERIAL_S(obj)->pins[USART_TX_INDEX] != NC) {
+ pin_conf.mux_position = pinmap_function_sercom(pSERIAL_S(obj)->pins[USART_TX_INDEX], sercom_index);
+ if ((uint8_t)NC != pin_conf.mux_position) {
+ system_pinmux_pin_set_config(pSERIAL_S(obj)->pins[USART_TX_INDEX], &pin_conf);
+ }
+ }
}
-#endif //DEVICE_SERIAL_FC
-
/******************************************************************************
* INTERRUPTS HANDLING
******************************************************************************/
inline uint8_t serial_get_index(serial_t *obj)
{
+ /* Sanity check arguments */
+ MBED_ASSERT(obj);
switch ((int)pUSART_S(obj)) {
case UART_0:
return 0;
@@ -545,8 +572,10 @@
}
return 0;
}
+
static inline void uart_irq(SercomUsart *const usart, uint32_t index)
{
+ MBED_ASSERT(usart != (void*)0);
uint16_t interrupt_status;
interrupt_status = usart->INTFLAG.reg;
interrupt_status &= usart->INTENSET.reg;
@@ -560,10 +589,6 @@
usart->INTFLAG.reg = SERCOM_USART_INTFLAG_RXC;
irq_handler(serial_irq_ids[index], RxIrq);
}
- if (interrupt_status & SERCOM_USART_INTFLAG_CTSIC) { // hardware flow control
- usart->INTENCLR.reg = SERCOM_USART_INTENCLR_CTSIC;
- usart->INTFLAG.reg = SERCOM_USART_INTENCLR_CTSIC;
- }
}
}
@@ -597,37 +622,11 @@
uart_irq((SercomUsart *)UART_5, 5);
}
-void serial_irq_handler(serial_t *obj, uart_irq_handler handler, uint32_t id)
-{
- irq_handler = handler;
- serial_irq_ids[serial_get_index(obj)] = id;
-}
-
-IRQn_Type get_serial_irq_num (serial_t *obj)
+uint32_t get_serial_vector (serial_t *obj)
{
- switch ((int)pUSART_S(obj)) {
- case UART_0:
- return SERCOM0_IRQn;
- case UART_1:
- return SERCOM1_IRQn;
- case UART_2:
- return SERCOM2_IRQn;
- case UART_3:
- return SERCOM3_IRQn;
- case UART_4:
- return SERCOM4_IRQn;
- case UART_5:
- return SERCOM5_IRQn;
- default:
- MBED_ASSERT(0);
- }
-}
-
-void serial_irq_set(serial_t *obj, SerialIrq irq, uint32_t enable)
-{
- IRQn_Type irq_n = (IRQn_Type)0;
+ /* Sanity check arguments */
+ MBED_ASSERT(obj);
uint32_t vector = 0;
-
switch ((int)pUSART_S(obj)) {
case UART_0:
vector = (uint32_t)uart0_irq;
@@ -648,6 +647,48 @@
vector = (uint32_t)uart5_irq;
break;
}
+ return vector;
+}
+
+void serial_irq_handler(serial_t *obj, uart_irq_handler handler, uint32_t id)
+{
+ /* Sanity check arguments */
+ MBED_ASSERT(obj);
+ irq_handler = handler;
+ serial_irq_ids[serial_get_index(obj)] = id;
+}
+
+IRQn_Type get_serial_irq_num (serial_t *obj)
+{
+ /* Sanity check arguments */
+ MBED_ASSERT(obj);
+ switch ((int)pUSART_S(obj)) {
+ case UART_0:
+ return SERCOM0_IRQn;
+ case UART_1:
+ return SERCOM1_IRQn;
+ case UART_2:
+ return SERCOM2_IRQn;
+ case UART_3:
+ return SERCOM3_IRQn;
+ case UART_4:
+ return SERCOM4_IRQn;
+ case UART_5:
+ return SERCOM5_IRQn;
+ default:
+ MBED_ASSERT(0);
+ }
+ return SERCOM0_IRQn; // to avoid warning
+}
+
+void serial_irq_set(serial_t *obj, SerialIrq irq, uint32_t enable)
+{
+ /* Sanity check arguments */
+ MBED_ASSERT(obj);
+ IRQn_Type irq_n = (IRQn_Type)0;
+ uint32_t vector = 0;
+
+ vector = get_serial_vector(obj);
irq_n = get_serial_irq_num(obj);
if (enable) {
@@ -680,12 +721,16 @@
******************************************************************************/
int serial_getc(serial_t *obj)
{
+ /* Sanity check arguments */
+ MBED_ASSERT(obj);
while (!serial_readable(obj));
return _USART(obj).DATA.reg ;
}
void serial_putc(serial_t *obj, int c)
{
+ /* Sanity check arguments */
+ MBED_ASSERT(obj);
uint16_t q = (c & SERCOM_USART_DATA_MASK);
while (!serial_writable(obj));
_USART(obj).DATA.reg = q;
@@ -694,6 +739,8 @@
int serial_readable(serial_t *obj)
{
+ /* Sanity check arguments */
+ MBED_ASSERT(obj);
uint32_t status = 1;
if (!(_USART(obj).INTFLAG.reg & SERCOM_USART_INTFLAG_RXC)) {
status = 0;
@@ -705,6 +752,8 @@
int serial_writable(serial_t *obj)
{
+ /* Sanity check arguments */
+ MBED_ASSERT(obj);
uint32_t status = 1;
if (!(_USART(obj).INTFLAG.reg & SERCOM_USART_INTFLAG_DRE)) {
status = 0;
@@ -725,6 +774,8 @@
***********************************/
void serial_tx_enable_event(serial_t *obj, int event, uint8_t enable)
{
+ /* Sanity check arguments */
+ MBED_ASSERT(obj);
if(enable) {
pSERIAL_S(obj)->events |= event;
} else {
@@ -734,6 +785,8 @@
void serial_rx_enable_event(serial_t *obj, int event, uint8_t enable)
{
+ /* Sanity check arguments */
+ MBED_ASSERT(obj);
if(enable) {
pSERIAL_S(obj)->events |= event;
} else {
@@ -743,6 +796,9 @@
void serial_tx_buffer_set(serial_t *obj, void *tx, int tx_length, uint8_t width)
{
+ /* Sanity check arguments */
+ MBED_ASSERT(obj);
+ MBED_ASSERT(tx != (void*)0);
// We only support byte buffers for now
MBED_ASSERT(width == 8);
@@ -757,6 +813,9 @@
void serial_rx_buffer_set(serial_t *obj, void *rx, int rx_length, uint8_t width)
{
+ /* Sanity check arguments */
+ MBED_ASSERT(obj);
+ MBED_ASSERT(rx != (void*)0);
// We only support byte buffers for now
MBED_ASSERT(width == 8);
@@ -771,6 +830,8 @@
void serial_set_char_match(serial_t *obj, uint8_t char_match)
{
+ /* Sanity check arguments */
+ MBED_ASSERT(obj);
if (char_match != SERIAL_RESERVED_CHAR_MATCH) {
obj->char_match = char_match;
}
@@ -781,6 +842,8 @@
***********************************/
int serial_tx_asynch(serial_t *obj, const void *tx, size_t tx_length, uint8_t tx_width, uint32_t handler, uint32_t event, DMAUsage hint)
{
+ /* Sanity check arguments */
+ MBED_ASSERT(obj);
MBED_ASSERT(tx != (void*)0);
if(tx_length == 0) return 0;
@@ -790,7 +853,6 @@
// if( hint == DMA_USAGE_NEVER) { //TODO: DMA to be implemented later
NVIC_ClearPendingIRQ(get_serial_irq_num(obj));
NVIC_DisableIRQ(get_serial_irq_num(obj));
- NVIC_SetPriority(get_serial_irq_num(obj), 1);
NVIC_SetVector(get_serial_irq_num(obj), (uint32_t)handler);
NVIC_EnableIRQ(get_serial_irq_num(obj));
@@ -799,20 +861,23 @@
_USART(obj).INTENSET.reg = SERCOM_USART_INTFLAG_DRE;
}
// }
+ return 0;
}
void serial_rx_asynch(serial_t *obj, void *rx, size_t rx_length, uint8_t rx_width, uint32_t handler, uint32_t event, uint8_t char_match, DMAUsage hint)
{
+ /* Sanity check arguments */
+ MBED_ASSERT(obj);
MBED_ASSERT(rx != (void*)0);
serial_rx_enable_event(obj, SERIAL_EVENT_RX_ALL, false);
serial_rx_enable_event(obj, event, true);
serial_set_char_match(obj, char_match);
-
serial_rx_buffer_set(obj, rx, rx_length, rx_width);
// if( hint == DMA_USAGE_NEVER) { //TODO: DMA to be implemented later
NVIC_ClearPendingIRQ(get_serial_irq_num(obj));
+ NVIC_DisableIRQ(get_serial_irq_num(obj));
NVIC_SetVector(get_serial_irq_num(obj), (uint32_t)handler);
NVIC_EnableIRQ(get_serial_irq_num(obj));
@@ -820,35 +885,43 @@
_USART(obj).INTENSET.reg = SERCOM_USART_INTFLAG_RXC;
}
// }
+ return;
}
uint8_t serial_tx_active(serial_t *obj)
{
- return ((_USART(obj).INTENSET.reg & SERCOM_USART_INTFLAG_DRE) ? true : false);
+ /* Sanity check arguments */
+ MBED_ASSERT(obj);
+ return ((obj->tx_buff.length > 0) ? true : false);
}
uint8_t serial_rx_active(serial_t *obj)
{
- return ((_USART(obj).INTENSET.reg & SERCOM_USART_INTFLAG_RXC) ? true : false);
+ /* Sanity check arguments */
+ MBED_ASSERT(obj);
+ return ((obj->rx_buff.length > 0) ? true : false);
}
int serial_tx_irq_handler_asynch(serial_t *obj)
{
+ /* Sanity check arguments */
+ MBED_ASSERT(obj);
_USART(obj).INTENCLR.reg = SERCOM_USART_INTFLAG_TXC;
+ serial_tx_abort_asynch(obj);
return SERIAL_EVENT_TX_COMPLETE & obj->serial.events;
}
int serial_rx_irq_handler_asynch(serial_t *obj)
{
+ /* Sanity check arguments */
+ MBED_ASSERT(obj);
int event = 0;
/* This interrupt handler is called from USART irq */
uint8_t *buf = (uint8_t*)obj->rx_buff.buffer;
uint8_t error_code = 0;
uint16_t received_data = 0;
-
error_code = (uint8_t)(_USART(obj).STATUS.reg & SERCOM_USART_STATUS_MASK);
-
/* Check if an error has occurred during the receiving */
if (error_code) {
/* Check which error occurred */
@@ -882,6 +955,7 @@
if((buf[obj->rx_buff.pos - 1] == obj->char_match) && (obj->serial.events & SERIAL_EVENT_RX_CHARACTER_MATCH)) {
event |= SERIAL_EVENT_RX_CHARACTER_MATCH;
}
+ _USART(obj).INTFLAG.reg = SERCOM_USART_INTFLAG_RXC;
serial_rx_abort_asynch(obj);
return event & obj->serial.events;
}
@@ -891,20 +965,19 @@
event |= SERIAL_EVENT_RX_CHARACTER_MATCH;
}
- /* check for final char event */
- if((obj->rx_buff.length) == 0) {
- event |= SERIAL_EVENT_RX_COMPLETE & obj->serial.events;
- }
-
+ /* Return to the call back if character match occured */
if(event != 0) {
serial_rx_abort_asynch(obj);
return event & obj->serial.events;
}
+ return 0;
}
int serial_irq_handler_asynch(serial_t *obj)
{
//TODO: DMA to be implemented
+ /* Sanity check arguments */
+ MBED_ASSERT(obj);
uint16_t interrupt_status;
uint8_t *buf = obj->tx_buff.buffer;
@@ -915,12 +988,9 @@
if (interrupt_status & SERCOM_USART_INTFLAG_DRE) {
/* Interrupt has another TX source */
if(obj->tx_buff.pos >= obj->tx_buff.length) {
-
/* Transfer complete. Switch off interrupt and return event. */
_USART(obj).INTENCLR.reg = SERCOM_USART_INTFLAG_DRE;
- serial_tx_abort_asynch(obj);
-
- return SERIAL_EVENT_TX_COMPLETE & obj->serial.events;
+ _USART(obj).INTENSET.reg = SERCOM_USART_INTFLAG_TXC;
} else {
while((serial_writable(obj)) && (obj->tx_buff.pos <= (obj->tx_buff.length - 1))) {
_USART(obj).DATA.reg = buf[obj->tx_buff.pos];
@@ -929,29 +999,34 @@
}
}
if (interrupt_status & SERCOM_USART_INTFLAG_TXC) {
- serial_tx_irq_handler_asynch(obj);
+ return serial_tx_irq_handler_asynch(obj);
}
if (interrupt_status & SERCOM_USART_INTFLAG_RXC) {
- serial_rx_irq_handler_asynch(obj);
+ return serial_rx_irq_handler_asynch(obj);
}
}
-
+ return 0;
}
void serial_tx_abort_asynch(serial_t *obj)
{
//TODO: DMA to be implemented
- _USART(obj).INTENSET.reg = SERCOM_USART_INTFLAG_TXC;
- obj->tx_buff.pos = 0;
+ /* Sanity check arguments */
+ MBED_ASSERT(obj);
+ _USART(obj).INTFLAG.reg = SERCOM_USART_INTFLAG_TXC;
obj->tx_buff.length = 0;
+ obj->rx_buff.pos = 0;
+
}
void serial_rx_abort_asynch(serial_t *obj)
{
//TODO: DMA to be implemented
- _USART(obj).INTENCLR.reg = SERCOM_USART_INTFLAG_RXC;
+ /* Sanity check arguments */
+ MBED_ASSERT(obj);
+ _USART(obj).INTFLAG.reg = SERCOM_USART_INTFLAG_RXC;
+ obj->rx_buff.length = 0;
obj->rx_buff.pos = 0;
- obj->rx_buff.length = 0;
}
#endif
\ No newline at end of file
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/targets/hal/TARGET_Atmel/TARGET_SAM21/sleep_api.c Fri Jul 17 09:15:10 2015 +0100
@@ -0,0 +1,49 @@
+/* mbed Microcontroller Library
+ * Copyright (c) 2006-2013 ARM Limited
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+#include "mbed_assert.h"
+#include "sleep_api.h"
+
+#include <math.h>
+
+#include "cmsis.h"
+#include "power.h"
+
+/** Send the device to sleep
+ *
+ * The processor is setup ready for sleep, and sent to sleep using __WFI(). In this mode, the
+ * system clock to the core is stopped until a reset or an interrupt occurs.
+ * @param[void] void
+ * @return void
+ */
+void sleep(void)
+{
+ system_set_sleepmode(SYSTEM_SLEEPMODE_IDLE_2);
+ system_sleep();
+}
+
+/** Send the device to deep sleep
+ *
+ * This processor is setup ready for deep sleep, and sent to sleep using __WFI(). This mode
+ * has the same sleep features as sleep plus it powers down peripherals and clocks. All state
+ * is still maintained.
+ * @param[void] void
+ * @return void
+ */
+void deepsleep(void)
+{
+ system_set_sleepmode(SYSTEM_SLEEPMODE_STANDBY);
+ system_sleep();
+}
\ No newline at end of file
--- a/targets/hal/TARGET_Atmel/TARGET_SAM21/spi_api.c Wed Jul 15 08:15:08 2015 +0100
+++ b/targets/hal/TARGET_Atmel/TARGET_SAM21/spi_api.c Fri Jul 17 09:15:10 2015 +0100
@@ -22,34 +22,12 @@
#include "pinmap.h"
#include "sercom.h"
-/** Temporary definitions START
- * Need to implement Pinmux APIs. For now, have hard coded to external SPIs available in SAM21 */
-#ifdef SAMR21
-#define EXT1_SPI_MODULE SERCOM5
-#define EXT1_SPI_SERCOM_MUX_SETTING ((0x1 << SERCOM_SPI_CTRLA_DOPO_Pos) | (0x0 << SERCOM_SPI_CTRLA_DIPO_Pos))
-#define EXT1_SPI_SERCOM_PINMUX_PAD0 PINMUX_PB02D_SERCOM5_PAD0
-#define EXT1_SPI_SERCOM_PINMUX_PAD1 PINMUX_PB03D_SERCOM5_PAD1
-#define EXT1_SPI_SERCOM_PINMUX_PAD2 PINMUX_PB22D_SERCOM5_PAD2
-#define EXT1_SPI_SERCOM_PINMUX_PAD3 PINMUX_PB23D_SERCOM5_PAD3
-#define EXT1_SPI_SERCOM_DMAC_ID_TX SERCOM5_DMAC_ID_TX
-#define EXT1_SPI_SERCOM_DMAC_ID_RX SERCOM5_DMAC_ID_RX
-#elif SAMD21
-#define EXT1_SPI_MODULE SERCOM0
-#define EXT1_SPI_SERCOM_MUX_SETTING ((0x1 << SERCOM_SPI_CTRLA_DOPO_Pos) | (0x0 << SERCOM_SPI_CTRLA_DIPO_Pos))
-#define EXT1_SPI_SERCOM_PINMUX_PAD0 PINMUX_PA04D_SERCOM0_PAD0
-#define EXT1_SPI_SERCOM_PINMUX_PAD1 PINMUX_PA05D_SERCOM0_PAD1
-#define EXT1_SPI_SERCOM_PINMUX_PAD2 PINMUX_PA06D_SERCOM0_PAD2
-#define EXT1_SPI_SERCOM_PINMUX_PAD3 PINMUX_PA07D_SERCOM0_PAD3
-#define EXT1_SPI_SERCOM_DMAC_ID_TX SERCOM0_DMAC_ID_TX
-#define EXT1_SPI_SERCOM_DMAC_ID_RX SERCOM0_DMAC_ID_RX
-#endif
+#include "pinmap_function.h"
-/** Default pinmux. */
-# define PINMUX_DEFAULT 0
-
-/** Unused pinmux. */
-# define PINMUX_UNUSED 0xFFFFFFFF
-/** Temporary definitions END */
+#define SPI_MOSI_INDEX 0
+#define SPI_MISO_INDEX 1
+#define SPI_SCLK_INDEX 2
+#define SPI_SSEL_INDEX 3
/**
* \brief SPI modes enum
@@ -82,31 +60,6 @@
extern uint8_t g_sys_init;
uint16_t dummy_fill_word = 0xFFFF;
-#if DEVICE_SPI_ASYNCH
-/* Global variables */
-extern void *_sercom_instances[SERCOM_INST_NUM];
-
-static void _spi_transceive_buffer(spi_t *obj);
-
-/** \internal
- * Generates a SERCOM interrupt handler function for a given SERCOM index.
- */
-#define _SERCOM_SPI_INTERRUPT_HANDLER(n, unused) \
-void SERCOM##n##_SPIHandler(void) \
-{ \
- _spi_transceive_buffer((spi_t *)_sercom_instances[n]); \
-}
-#define _SERCOM_SPI_INTERRUPT_HANDLER_DECLR(n, unused) \
- (uint32_t)SERCOM##n##_SPIHandler,
-
-/** Auto-generate a set of interrupt handlers for each SERCOM SPI in the device */
-MREPEAT(SERCOM_INST_NUM, _SERCOM_SPI_INTERRUPT_HANDLER, ~)
-
-const uint32_t _sercom_handlers[SERCOM_INST_NUM] = {
- MREPEAT(SERCOM_INST_NUM, _SERCOM_SPI_INTERRUPT_HANDLER_DECLR, ~)
-};
-uint32_t _sercom_callbacks[SERCOM_INST_NUM] = {0};
-#endif /* DEVICE_SPI_ASYNCH */
static inline bool spi_is_syncing(spi_t *obj)
{
@@ -122,11 +75,6 @@
/* Sanity check arguments */
MBED_ASSERT(obj);
-#if DEVICE_SPI_ASYNCH
- /* Enable interrupt */
- NVIC_EnableIRQ(SERCOM0_IRQn + _sercom_get_sercom_inst_index(pSPI_SERCOM(obj)));
-#endif
-
/* Wait until the synchronization is complete */
while (spi_is_syncing(obj));
@@ -139,10 +87,6 @@
/* Sanity check arguments */
MBED_ASSERT(obj);
-#if DEVICE_SPI_ASYNCH
- /* Disable interrupt */
- NVIC_DisableIRQ(SERCOM0_IRQn + _sercom_get_sercom_inst_index(pSPI_SERCOM(obj)));
-#endif
/* Wait until the synchronization is complete */
while (spi_is_syncing(obj));
@@ -221,6 +165,59 @@
return true;
}
+static uint32_t spi_find_mux_settings(spi_t *obj)
+{
+ /* Sanity check arguments */
+ MBED_ASSERT(obj);
+ uint8_t i_dipo;
+ uint8_t i_dopo;
+ uint32_t dipo = 0;
+ uint32_t dopo = 0;
+ uint32_t mux_pad;
+
+ uint32_t mux_settings = 0;
+
+ uint32_t sercom_index = _sercom_get_sercom_inst_index(pSPI_SERCOM(obj));
+
+ if (pSPI_S(obj)->mode == SPI_MODE_MASTER) {
+ i_dipo = SPI_MISO_INDEX;
+ i_dopo = SPI_MOSI_INDEX;
+ } else {
+ i_dipo = SPI_MOSI_INDEX;
+ i_dopo = SPI_MISO_INDEX;
+ }
+
+ /* Find MUX setting */
+ if (pSPI_S(obj)->pins[i_dipo] != NC) {
+ /* Set Data input MUX padding for master */
+ mux_pad = pinmap_pad_sercom(pSPI_S(obj)->pins[i_dipo], sercom_index);
+ if (mux_pad != NC) {
+ /* MUX pad value is same as DIPO value */
+ dipo = mux_pad;
+ mux_settings |= ((dipo << SERCOM_SPI_CTRLA_DIPO_Pos) & SERCOM_SPI_CTRLA_DIPO_Msk);
+ }
+ }
+
+ if (pSPI_S(obj)->pins[i_dopo] != NC) {
+ /* Set Data output MUX padding for master */
+ mux_pad = pinmap_pad_sercom(pSPI_S(obj)->pins[i_dopo], sercom_index);
+ if (mux_pad != NC) {
+ if (mux_pad != 0) {
+ dopo = mux_pad - 1;
+ } else {
+ if (3 == pinmap_pad_sercom(pSPI_S(obj)->pins[SPI_SCLK_INDEX], sercom_index)) {
+ dopo = 3;
+ } else {
+ dopo = 0;
+ }
+ }
+ mux_settings |= ((dopo << SERCOM_SPI_CTRLA_DOPO_Pos) & SERCOM_SPI_CTRLA_DOPO_Msk);
+ }
+ }
+
+ return mux_settings;
+}
+
/**
* \defgroup GeneralSPI SPI Configuration Functions
* @{
@@ -237,6 +234,10 @@
*/
void spi_init(spi_t *obj, PinName mosi, PinName miso, PinName sclk, PinName ssel)
{
+ /* Sanity check arguments */
+ MBED_ASSERT(obj);
+ MBED_ASSERT(sclk != NC);
+
uint16_t baud = 0;
uint32_t ctrla = 0;
uint32_t ctrlb = 0;
@@ -247,9 +248,9 @@
g_sys_init = 1;
}
- /* TODO: Calculate SERCOM instance from pins */
- /* TEMP: Giving external SPI module value of SAMR21 for now */
- pSPI_SERCOM(obj) = EXT1_SPI_MODULE;
+ /* Calculate SERCOM instance from pins */
+ uint32_t sercom_index = pinmap_find_sercom(mosi, miso, sclk, ssel);
+ pSPI_SERCOM(obj) = (Sercom*)pinmap_peripheral_sercom(NC, sercom_index);
/* Disable SPI */
spi_disable(obj);
@@ -258,7 +259,7 @@
if (_SPI(obj).CTRLA.reg & SERCOM_SPI_CTRLA_SWRST) {
return;
}
- uint32_t sercom_index = _sercom_get_sercom_inst_index(pSPI_SERCOM(obj));
+
uint32_t pm_index, gclk_index;
#if (SAML21)
if (sercom_index == 5) {
@@ -292,14 +293,6 @@
system_gclk_chan_enable(gclk_index);
sercom_set_gclk_generator(GCLK_GENERATOR_0, false);
-#if DEVICE_SPI_ASYNCH
- /* Save the object */
- _sercom_instances[sercom_index] = obj;
-
- /* Configure interrupt handler */
- NVIC_SetVector((SERCOM0_IRQn + sercom_index), (uint32_t)_sercom_handlers[sercom_index]);
-#endif
-
/* Set the SERCOM in SPI master mode */
_SPI(obj).CTRLA.reg |= SERCOM_SPI_CTRLA_MODE(0x3);
pSPI_S(obj)->mode = SPI_MODE_MASTER;
@@ -309,17 +302,18 @@
system_pinmux_get_config_defaults(&pin_conf);
pin_conf.direction = SYSTEM_PINMUX_PIN_DIR_INPUT;
- uint32_t pad_pinmuxes[] = {
- EXT1_SPI_SERCOM_PINMUX_PAD0, EXT1_SPI_SERCOM_PINMUX_PAD1,
- EXT1_SPI_SERCOM_PINMUX_PAD2, EXT1_SPI_SERCOM_PINMUX_PAD3
- };
-
+ pSPI_S(obj)->pins[SPI_MOSI_INDEX] = mosi;
+ pSPI_S(obj)->pins[SPI_MISO_INDEX] = miso;
+ pSPI_S(obj)->pins[SPI_SCLK_INDEX] = sclk;
+ pSPI_S(obj)->pins[SPI_SSEL_INDEX] = ssel;
/* Configure the SERCOM pins according to the user configuration */
for (uint8_t pad = 0; pad < 4; pad++) {
- uint32_t current_pinmux = pad_pinmuxes[pad];
- if (current_pinmux != PINMUX_UNUSED) {
- pin_conf.mux_position = current_pinmux & 0xFFFF;
- system_pinmux_pin_set_config(current_pinmux >> 16, &pin_conf);
+ uint32_t current_pin = pSPI_S(obj)->pins[pad];
+ if (current_pin != NC) {
+ pin_conf.mux_position = pinmap_function_sercom(current_pin, sercom_index);
+ if ((uint8_t)NC != pin_conf.mux_position) {
+ system_pinmux_pin_set_config(current_pin, &pin_conf);
+ }
}
}
@@ -333,8 +327,8 @@
}
_SPI(obj).BAUD.reg = (uint8_t)baud;
- /* Set MUX setting */
- ctrla |= EXT1_SPI_SERCOM_MUX_SETTING; /* TODO: Change this to appropriate Settings */
+ /* TODO: Find MUX settings */
+ ctrla |= spi_find_mux_settings(obj);
/* Set SPI character size */
ctrlb |= SERCOM_SPI_CTRLB_CHSIZE(0);
@@ -377,37 +371,40 @@
*/
void spi_format(spi_t *obj, int bits, int mode, int slave)
{
+ PinMode pull_mode;
+ /* Sanity check arguments */
+ MBED_ASSERT(obj);
+
/* Disable SPI */
spi_disable(obj);
+
if (slave) {
/* Set the SERCOM in SPI mode */
_SPI(obj).CTRLA.bit.MODE = 0x2;
pSPI_S(obj)->mode = SPI_MODE_SLAVE;
-
- struct system_pinmux_config pin_conf;
- system_pinmux_get_config_defaults(&pin_conf);
- pin_conf.direction = SYSTEM_PINMUX_PIN_DIR_INPUT;
- pin_conf.input_pull = SYSTEM_PINMUX_PIN_PULL_NONE;
-
- uint32_t pad_pinmuxes[] = {
- EXT1_SPI_SERCOM_PINMUX_PAD0, EXT1_SPI_SERCOM_PINMUX_PAD1,
- EXT1_SPI_SERCOM_PINMUX_PAD2, EXT1_SPI_SERCOM_PINMUX_PAD3
- };
-
- /* Configure the SERCOM pins according to the user configuration */
- for (uint8_t pad = 0; pad < 4; pad++) {
- uint32_t current_pinmux = pad_pinmuxes[pad];
- if (current_pinmux != PINMUX_UNUSED) {
- pin_conf.mux_position = current_pinmux & 0xFFFF;
- system_pinmux_pin_set_config(current_pinmux >> 16, &pin_conf);
- }
- }
+ pull_mode = PullNone;
+ /* Enable PLOADEN to avoid sending dummy character by slave */
+ _SPI(obj).CTRLB.bit.PLOADEN = 1;
} else {
- /* Already in SPI master mode */
+ /* Set the SERCOM in SPI mode */
+ _SPI(obj).CTRLA.bit.MODE = 0x3;
+ pSPI_S(obj)->mode = SPI_MODE_MASTER;
+ pull_mode = PullUp;
}
- /* TODO: Change MUX settings to appropriate value */
+ /* Change pull mode of pins */
+ for (uint8_t pad = 0; pad < 4; pad++) {
+ if (pSPI_S(obj)->pins[pad] != NC) {
+ pin_mode(pSPI_S(obj)->pins[pad], pull_mode);
+ }
+ }
+
+ /* Change MUX settings */
+ uint32_t ctrla = _SPI(obj).CTRLA.reg;
+ ctrla &= ~(SERCOM_SPI_CTRLA_DIPO_Msk | SERCOM_SPI_CTRLA_DOPO_Msk);
+ ctrla |= spi_find_mux_settings(obj);
+ _SPI(obj).CTRLA.reg = ctrla;
/* Set SPI Frame size - only 8-bit and 9-bit supported now */
_SPI(obj).CTRLB.bit.CHSIZE = (bits > 8)? 1 : 0;
@@ -432,6 +429,8 @@
void spi_frequency(spi_t *obj, int hz)
{
uint16_t baud = 0;
+ /* Sanity check arguments */
+ MBED_ASSERT(obj);
/* Disable SPI */
spi_disable(obj);
@@ -711,6 +710,9 @@
*/
static void _spi_clear_interrupts(spi_t *obj)
{
+ /* Sanity check arguments */
+ MBED_ASSERT(obj);
+
uint8_t sercom_index = _sercom_get_sercom_inst_index(obj->spi.spi);
/* Clear all interrupts */
@@ -730,13 +732,10 @@
* \param[in,out] obj Pointer to SPI software instance struct
*
*/
-static void _spi_transceive_buffer(spi_t *obj)
+static enum status_code _spi_transceive_buffer(spi_t *obj)
{
/* Sanity check arguments */
MBED_ASSERT(obj);
- void (*callback_func)(void);
-
- uint8_t sercom_index = _sercom_get_sercom_inst_index(obj->spi.spi);
uint16_t interrupt_status = _SPI(obj).INTFLAG.reg;
interrupt_status &= _SPI(obj).INTENSET.reg;
@@ -780,11 +779,7 @@
} else {
obj->spi.status = STATUS_ERR_BAD_DATA;
}
- callback_func = _sercom_callbacks[sercom_index];
- if (callback_func && (obj->spi.mask & (SPI_EVENT_ERROR | SPI_EVENT_RX_OVERFLOW))) {
- callback_func();
- }
- return;
+ return obj->spi.status;
}
if ((obj->tx_buff.pos >= obj->tx_buff.length) && (obj->rx_buff.pos >= obj->rx_buff.length) && (interrupt_status & SERCOM_SPI_INTFLAG_TXC)) {
@@ -794,12 +789,9 @@
/* Transfer complete, invoke the callback function */
obj->spi.event = SPI_EVENT_INTERNAL_TRANSFER_COMPLETE;
obj->spi.status = STATUS_OK;
- callback_func = _sercom_callbacks[sercom_index];
- if (callback_func && (obj->spi.mask & SPI_EVENT_COMPLETE)) {
- callback_func();
- }
- return;
}
+
+ return obj->spi.status;
}
/** Begin the SPI transfer. Buffer pointers and lengths are specified in tx_buff and rx_buff
@@ -856,7 +848,6 @@
dummy_read = _SPI(obj).DATA.reg;
}
- _sercom_callbacks[sercom_index] = handler;
obj->spi.mask = event;
obj->spi.dma_usage = hint;
@@ -867,7 +858,7 @@
obj->spi.status = STATUS_BUSY;
/* Enable interrupt */
- NVIC_SetVector((SERCOM0_IRQn + sercom_index), _sercom_handlers[sercom_index]);
+ NVIC_SetVector((SERCOM0_IRQn + sercom_index), handler);
NVIC_EnableIRQ(SERCOM0_IRQn + sercom_index);
/* Clear all interrupts */
@@ -895,53 +886,16 @@
*/
uint32_t spi_irq_handler_asynch(spi_t *obj)
{
+ /* Sanity check arguments */
+ MBED_ASSERT(obj);
+
uint32_t transfer_event = 0;
- uint32_t bytes_to_transfer = 0;
-
- uint8_t sercom_index = _sercom_get_sercom_inst_index(obj->spi.spi);
/*if (obj->spi.dma_usage == DMA_USAGE_NEVER) {** TEMP: Commented as DMA is not implemented now */
/* IRQ method */
- if (obj->spi.event & SPI_EVENT_INTERNAL_TRANSFER_COMPLETE) {
- obj->spi.event |= SPI_EVENT_COMPLETE;
- transfer_event = obj->spi.event;
- } else {
- /* Data is still remaining to be transferred! */
- obj->spi.status = STATUS_BUSY;
-
- /* Read any pending data in RX buffer */
- while (spi_is_ready_to_read(obj)) {
- _spi_read_async(obj);
- }
-
- while (obj->tx_buff.pos < obj->tx_buff.length) {
- /* Write data */
- _spi_write_async(obj);
- /* Read if any */
- if ((obj->rx_buff.buffer) && (obj->rx_buff.pos < obj->rx_buff.length)) {
- if (spi_is_ready_to_read(obj)) {
- _spi_read_async(obj);
- }
- /* Extend TX buffer (with dummy) if there is more to receive */
- if ((obj->tx_buff.pos >= obj->tx_buff.length) && (obj->tx_buff.length < obj->rx_buff.length)) {
- obj->tx_buff.length = obj->rx_buff.length;
- obj->tx_buff.buffer = 0;
- }
- }
- if (obj->spi.event & SPI_EVENT_ERROR) {
- transfer_event = obj->spi.event;
- obj->spi.status = STATUS_ERR_BAD_DATA;
- break;
- }
- }
- if ((obj->tx_buff.pos >= obj->tx_buff.length) && (obj->rx_buff.pos >= obj->rx_buff.length)) {
- transfer_event = (SPI_EVENT_INTERNAL_TRANSFER_COMPLETE | SPI_EVENT_COMPLETE);
- obj->spi.status = STATUS_OK;
- }
+ if (STATUS_BUSY != _spi_transceive_buffer(obj)) {
+ transfer_event = obj->spi.event & (obj->spi.mask | SPI_EVENT_INTERNAL_TRANSFER_COMPLETE);
}
- transfer_event &= (obj->spi.mask | SPI_EVENT_INTERNAL_TRANSFER_COMPLETE);
- /* Clear all interrupts */
- _spi_clear_interrupts(obj);
/*}** TEMP: Commented as DMA is not implemented now */
return transfer_event;
}
@@ -952,6 +906,9 @@
*/
uint8_t spi_active(spi_t *obj)
{
+ /* Sanity check arguments */
+ MBED_ASSERT(obj);
+
/* Check if the SPI module is busy with a job */
return (obj->spi.status == STATUS_BUSY);
}
--- a/targets/hal/TARGET_Atmel/common/boards/board.h Wed Jul 15 08:15:08 2015 +0100 +++ b/targets/hal/TARGET_Atmel/common/boards/board.h Fri Jul 17 09:15:10 2015 +0100 @@ -1,51 +1,3 @@ -/** - * \file - * - * \brief Standard board header file. - * - * This file includes the appropriate board header file according to the - * defined board (parameter BOARD). - * - * Copyright (c) 2009-2014 Atmel Corporation. All rights reserved. - * - * \asf_license_start - * - * \page License - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are met: - * - * 1. Redistributions of source code must retain the above copyright notice, - * this list of conditions and the following disclaimer. - * - * 2. Redistributions in binary form must reproduce the above copyright notice, - * this list of conditions and the following disclaimer in the documentation - * and/or other materials provided with the distribution. - * - * 3. The name of Atmel may not be used to endorse or promote products derived - * from this software without specific prior written permission. - * - * 4. This software may only be redistributed and used in connection with an - * Atmel microcontroller product. - * - * THIS SOFTWARE IS PROVIDED BY ATMEL "AS IS" AND ANY EXPRESS OR IMPLIED - * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF - * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT ARE - * EXPRESSLY AND SPECIFICALLY DISCLAIMED. IN NO EVENT SHALL ATMEL BE LIABLE FOR - * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL - * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS - * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) - * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, - * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN - * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE - * POSSIBILITY OF SUCH DAMAGE. - * - * \asf_license_stop - * - */ -/** -* Support and FAQ: visit <a href="http://www.atmel.com/design-support/">Atmel Support</a> -*/ #ifndef _BOARD_H_ #define _BOARD_H_
--- a/targets/hal/TARGET_Atmel/common/utils/interrupt.h Wed Jul 15 08:15:08 2015 +0100 +++ b/targets/hal/TARGET_Atmel/common/utils/interrupt.h Fri Jul 17 09:15:10 2015 +0100 @@ -1,48 +1,3 @@ -/** - * \file - * - * \brief Global interrupt management for 8- and 32-bit AVR - * - * Copyright (c) 2010-2014 Atmel Corporation. All rights reserved. - * - * \asf_license_start - * - * \page License - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are met: - * - * 1. Redistributions of source code must retain the above copyright notice, - * this list of conditions and the following disclaimer. - * - * 2. Redistributions in binary form must reproduce the above copyright notice, - * this list of conditions and the following disclaimer in the documentation - * and/or other materials provided with the distribution. - * - * 3. The name of Atmel may not be used to endorse or promote products derived - * from this software without specific prior written permission. - * - * 4. This software may only be redistributed and used in connection with an - * Atmel microcontroller product. - * - * THIS SOFTWARE IS PROVIDED BY ATMEL "AS IS" AND ANY EXPRESS OR IMPLIED - * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF - * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT ARE - * EXPRESSLY AND SPECIFICALLY DISCLAIMED. IN NO EVENT SHALL ATMEL BE LIABLE FOR - * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL - * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS - * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) - * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, - * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN - * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE - * POSSIBILITY OF SUCH DAMAGE. - * - * \asf_license_stop - * - */ -/** -* Support and FAQ: visit <a href="http://www.atmel.com/design-support/">Atmel Support</a> -*/ #ifndef UTILS_INTERRUPT_H #define UTILS_INTERRUPT_H
--- a/targets/hal/TARGET_Atmel/common/utils/interrupt/interrupt_sam_nvic.c Wed Jul 15 08:15:08 2015 +0100 +++ b/targets/hal/TARGET_Atmel/common/utils/interrupt/interrupt_sam_nvic.c Fri Jul 17 09:15:10 2015 +0100 @@ -1,49 +1,3 @@ -/** - * \file - * - * \brief Global interrupt management for SAM D20, SAM3 and SAM4 (NVIC based) - * - * Copyright (c) 2012-2014 Atmel Corporation. All rights reserved. - * - * \asf_license_start - * - * \page License - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are met: - * - * 1. Redistributions of source code must retain the above copyright notice, - * this list of conditions and the following disclaimer. - * - * 2. Redistributions in binary form must reproduce the above copyright notice, - * this list of conditions and the following disclaimer in the documentation - * and/or other materials provided with the distribution. - * - * 3. The name of Atmel may not be used to endorse or promote products derived - * from this software without specific prior written permission. - * - * 4. This software may only be redistributed and used in connection with an - * Atmel microcontroller product. - * - * THIS SOFTWARE IS PROVIDED BY ATMEL "AS IS" AND ANY EXPRESS OR IMPLIED - * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF - * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT ARE - * EXPRESSLY AND SPECIFICALLY DISCLAIMED. IN NO EVENT SHALL ATMEL BE LIABLE FOR - * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL - * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS - * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) - * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, - * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN - * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE - * POSSIBILITY OF SUCH DAMAGE. - * - * \asf_license_stop - * - */ -/** -* Support and FAQ: visit <a href="http://www.atmel.com/design-support/">Atmel Support</a> -*/ - #include "interrupt_sam_nvic.h" #if !defined(__DOXYGEN__)
--- a/targets/hal/TARGET_Atmel/common/utils/interrupt/interrupt_sam_nvic.h Wed Jul 15 08:15:08 2015 +0100 +++ b/targets/hal/TARGET_Atmel/common/utils/interrupt/interrupt_sam_nvic.h Fri Jul 17 09:15:10 2015 +0100 @@ -1,49 +1,3 @@ -/** - * \file - * - * \brief Global interrupt management for SAM D20, SAM3 and SAM4 (NVIC based) - * - * Copyright (c) 2012-2014 Atmel Corporation. All rights reserved. - * - * \asf_license_start - * - * \page License - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are met: - * - * 1. Redistributions of source code must retain the above copyright notice, - * this list of conditions and the following disclaimer. - * - * 2. Redistributions in binary form must reproduce the above copyright notice, - * this list of conditions and the following disclaimer in the documentation - * and/or other materials provided with the distribution. - * - * 3. The name of Atmel may not be used to endorse or promote products derived - * from this software without specific prior written permission. - * - * 4. This software may only be redistributed and used in connection with an - * Atmel microcontroller product. - * - * THIS SOFTWARE IS PROVIDED BY ATMEL "AS IS" AND ANY EXPRESS OR IMPLIED - * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF - * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT ARE - * EXPRESSLY AND SPECIFICALLY DISCLAIMED. IN NO EVENT SHALL ATMEL BE LIABLE FOR - * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL - * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS - * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) - * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, - * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN - * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE - * POSSIBILITY OF SUCH DAMAGE. - * - * \asf_license_stop - * - */ -/** -* Support and FAQ: visit <a href="http://www.atmel.com/design-support/">Atmel Support</a> -*/ - #ifndef UTILS_INTERRUPT_INTERRUPT_H #define UTILS_INTERRUPT_INTERRUPT_H
--- a/targets/hal/TARGET_Atmel/common/utils/parts.h Wed Jul 15 08:15:08 2015 +0100 +++ b/targets/hal/TARGET_Atmel/common/utils/parts.h Fri Jul 17 09:15:10 2015 +0100 @@ -1,49 +1,3 @@ -/** - * \file - * - * \brief Atmel part identification macros - * - * Copyright (C) 2012-2014 Atmel Corporation. All rights reserved. - * - * \asf_license_start - * - * \page License - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are met: - * - * 1. Redistributions of source code must retain the above copyright notice, - * this list of conditions and the following disclaimer. - * - * 2. Redistributions in binary form must reproduce the above copyright notice, - * this list of conditions and the following disclaimer in the documentation - * and/or other materials provided with the distribution. - * - * 3. The name of Atmel may not be used to endorse or promote products derived - * from this software without specific prior written permission. - * - * 4. This software may only be redistributed and used in connection with an - * Atmel microcontroller product. - * - * THIS SOFTWARE IS PROVIDED BY ATMEL "AS IS" AND ANY EXPRESS OR IMPLIED - * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF - * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT ARE - * EXPRESSLY AND SPECIFICALLY DISCLAIMED. IN NO EVENT SHALL ATMEL BE LIABLE FOR - * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL - * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS - * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) - * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, - * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN - * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE - * POSSIBILITY OF SUCH DAMAGE. - * - * \asf_license_stop - * - */ -/** -* Support and FAQ: visit <a href="http://www.atmel.com/design-support/">Atmel Support</a> -*/ - #ifndef ATMEL_PARTS_H #define ATMEL_PARTS_H
--- a/targets/hal/TARGET_Atmel/common2/services/delay/delay.h Wed Jul 15 08:15:08 2015 +0100 +++ b/targets/hal/TARGET_Atmel/common2/services/delay/delay.h Fri Jul 17 09:15:10 2015 +0100 @@ -1,48 +1,3 @@ -/** - * \file - * - * \brief Common Delay Service - * - * Copyright (c) 2013-2014 Atmel Corporation. All rights reserved. - * - * \asf_license_start - * - * \page License - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are met: - * - * 1. Redistributions of source code must retain the above copyright notice, - * this list of conditions and the following disclaimer. - * - * 2. Redistributions in binary form must reproduce the above copyright notice, - * this list of conditions and the following disclaimer in the documentation - * and/or other materials provided with the distribution. - * - * 3. The name of Atmel may not be used to endorse or promote products derived - * from this software without specific prior written permission. - * - * 4. This software may only be redistributed and used in connection with an - * Atmel microcontroller product. - * - * THIS SOFTWARE IS PROVIDED BY ATMEL "AS IS" AND ANY EXPRESS OR IMPLIED - * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF - * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT ARE - * EXPRESSLY AND SPECIFICALLY DISCLAIMED. IN NO EVENT SHALL ATMEL BE LIABLE FOR - * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL - * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS - * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) - * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, - * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN - * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE - * POSSIBILITY OF SUCH DAMAGE. - * - * \asf_license_stop - * - */ -/** -* Support and FAQ: visit <a href="http://www.atmel.com/design-support/">Atmel Support</a> -*/ #ifndef DELAY_H_INCLUDED #define DELAY_H_INCLUDED
--- a/targets/hal/TARGET_Atmel/common2/services/delay/sam0/systick_counter.c Wed Jul 15 08:15:08 2015 +0100 +++ b/targets/hal/TARGET_Atmel/common2/services/delay/sam0/systick_counter.c Fri Jul 17 09:15:10 2015 +0100 @@ -1,49 +1,3 @@ -/** - * \file - * - * \brief ARM functions for busy-wait delay loops - * - * Copyright (c) 2014 Atmel Corporation. All rights reserved. - * - * \asf_license_start - * - * \page License - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are met: - * - * 1. Redistributions of source code must retain the above copyright notice, - * this list of conditions and the following disclaimer. - * - * 2. Redistributions in binary form must reproduce the above copyright notice, - * this list of conditions and the following disclaimer in the documentation - * and/or other materials provided with the distribution. - * - * 3. The name of Atmel may not be used to endorse or promote products derived - * from this software without specific prior written permission. - * - * 4. This software may only be redistributed and used in connection with an - * Atmel microcontroller product. - * - * THIS SOFTWARE IS PROVIDED BY ATMEL "AS IS" AND ANY EXPRESS OR IMPLIED - * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF - * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT ARE - * EXPRESSLY AND SPECIFICALLY DISCLAIMED. IN NO EVENT SHALL ATMEL BE LIABLE FOR - * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL - * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS - * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) - * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, - * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN - * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE - * POSSIBILITY OF SUCH DAMAGE. - * - * \asf_license_stop - * - */ -/** -* Support and FAQ: visit <a href="http://www.atmel.com/design-support/">Atmel Support</a> -*/ - #include "delay.h" /**
--- a/targets/hal/TARGET_Atmel/common2/services/delay/sam0/systick_counter.h Wed Jul 15 08:15:08 2015 +0100 +++ b/targets/hal/TARGET_Atmel/common2/services/delay/sam0/systick_counter.h Fri Jul 17 09:15:10 2015 +0100 @@ -1,48 +1,3 @@ -/** - * \file - * - * \brief ARM functions for busy-wait delay loops - * - * Copyright (c) 2014 Atmel Corporation. All rights reserved. - * - * \asf_license_start - * - * \page License - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are met: - * - * 1. Redistributions of source code must retain the above copyright notice, - * this list of conditions and the following disclaimer. - * - * 2. Redistributions in binary form must reproduce the above copyright notice, - * this list of conditions and the following disclaimer in the documentation - * and/or other materials provided with the distribution. - * - * 3. The name of Atmel may not be used to endorse or promote products derived - * from this software without specific prior written permission. - * - * 4. This software may only be redistributed and used in connection with an - * Atmel microcontroller product. - * - * THIS SOFTWARE IS PROVIDED BY ATMEL "AS IS" AND ANY EXPRESS OR IMPLIED - * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF - * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT ARE - * EXPRESSLY AND SPECIFICALLY DISCLAIMED. IN NO EVENT SHALL ATMEL BE LIABLE FOR - * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL - * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS - * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) - * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, - * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN - * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE - * POSSIBILITY OF SUCH DAMAGE. - * - * \asf_license_stop - * - */ -/** -* Support and FAQ: visit <a href="http://www.atmel.com/design-support/">Atmel Support</a> -*/ #ifndef CYCLE_COUNTER_H_INCLUDED #define CYCLE_COUNTER_H_INCLUDED
--- a/targets/hal/TARGET_Atmel/config/conf_board.h Wed Jul 15 08:15:08 2015 +0100 +++ b/targets/hal/TARGET_Atmel/config/conf_board.h Fri Jul 17 09:15:10 2015 +0100 @@ -1,49 +1,3 @@ -/** - * \file - * - * \brief SAM R21 Xplained Pro board configuration. - * - * Copyright (c) 2014 Atmel Corporation. All rights reserved. - * - * \asf_license_start - * - * \page License - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are met: - * - * 1. Redistributions of source code must retain the above copyright notice, - * this list of conditions and the following disclaimer. - * - * 2. Redistributions in binary form must reproduce the above copyright notice, - * this list of conditions and the following disclaimer in the documentation - * and/or other materials provided with the distribution. - * - * 3. The name of Atmel may not be used to endorse or promote products derived - * from this software without specific prior written permission. - * - * 4. This software may only be redistributed and used in connection with an - * Atmel microcontroller product. - * - * THIS SOFTWARE IS PROVIDED BY ATMEL "AS IS" AND ANY EXPRESS OR IMPLIED - * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF - * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT ARE - * EXPRESSLY AND SPECIFICALLY DISCLAIMED. IN NO EVENT SHALL ATMEL BE LIABLE FOR - * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL - * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS - * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) - * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, - * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN - * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE - * POSSIBILITY OF SUCH DAMAGE. - * - * \asf_license_stop - * - */ -/** -* Support and FAQ: visit <a href="http://www.atmel.com/design-support/">Atmel Support</a> -*/ - #ifndef CONF_BOARD_H_INCLUDED #define CONF_BOARD_H_INCLUDED
--- a/targets/hal/TARGET_Atmel/config/conf_clocks.h Wed Jul 15 08:15:08 2015 +0100 +++ b/targets/hal/TARGET_Atmel/config/conf_clocks.h Fri Jul 17 09:15:10 2015 +0100 @@ -1,48 +1,3 @@ -/** - * \file - * - * \brief SAM R21 Clock configuration - * - * Copyright (C) 2014 Atmel Corporation. All rights reserved. - * - * \asf_license_start - * - * \page License - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are met: - * - * 1. Redistributions of source code must retain the above copyright notice, - * this list of conditions and the following disclaimer. - * - * 2. Redistributions in binary form must reproduce the above copyright notice, - * this list of conditions and the following disclaimer in the documentation - * and/or other materials provided with the distribution. - * - * 3. The name of Atmel may not be used to endorse or promote products derived - * from this software without specific prior written permission. - * - * 4. This software may only be redistributed and used in connection with an - * Atmel microcontroller product. - * - * THIS SOFTWARE IS PROVIDED BY ATMEL "AS IS" AND ANY EXPRESS OR IMPLIED - * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF - * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT ARE - * EXPRESSLY AND SPECIFICALLY DISCLAIMED. IN NO EVENT SHALL ATMEL BE LIABLE FOR - * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL - * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS - * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) - * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, - * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN - * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE - * POSSIBILITY OF SUCH DAMAGE. - * - * \asf_license_stop - * - */ -/** -* Support and FAQ: visit <a href="http://www.atmel.com/design-support/">Atmel Support</a> -*/ #include <clock.h> #ifndef CONF_CLOCKS_H_INCLUDED @@ -79,13 +34,15 @@ # define CONF_CLOCK_XOSC32K_ON_DEMAND true # define CONF_CLOCK_XOSC32K_RUN_IN_STANDBY false +//! [oscillator_settings] /* SYSTEM_CLOCK_SOURCE_OSC32K configuration - Internal 32KHz oscillator */ -# define CONF_CLOCK_OSC32K_ENABLE false +# define CONF_CLOCK_OSC32K_ENABLE true # define CONF_CLOCK_OSC32K_STARTUP_TIME SYSTEM_OSC32K_STARTUP_130 # define CONF_CLOCK_OSC32K_ENABLE_1KHZ_OUTPUT true # define CONF_CLOCK_OSC32K_ENABLE_32KHZ_OUTPUT true # define CONF_CLOCK_OSC32K_ON_DEMAND true # define CONF_CLOCK_OSC32K_RUN_IN_STANDBY false +//! [oscillator_settings] /* SYSTEM_CLOCK_SOURCE_DFLL configuration - Digital Frequency Locked Loop */ # define CONF_CLOCK_DFLL_ENABLE false @@ -140,12 +97,14 @@ # define CONF_CLOCK_GCLK_1_PRESCALER 1 # define CONF_CLOCK_GCLK_1_OUTPUT_ENABLE false +//! [gclk_settings] /* Configure GCLK generator 2 (RTC) */ -# define CONF_CLOCK_GCLK_2_ENABLE false +# define CONF_CLOCK_GCLK_2_ENABLE true # define CONF_CLOCK_GCLK_2_RUN_IN_STANDBY false # define CONF_CLOCK_GCLK_2_CLOCK_SOURCE SYSTEM_CLOCK_SOURCE_OSC32K # define CONF_CLOCK_GCLK_2_PRESCALER 32 # define CONF_CLOCK_GCLK_2_OUTPUT_ENABLE false +//! [gclk_settings] /* Configure GCLK generator 3 */ # define CONF_CLOCK_GCLK_3_ENABLE false
--- a/targets/hal/TARGET_Atmel/config/conf_dma.h Wed Jul 15 08:15:08 2015 +0100 +++ b/targets/hal/TARGET_Atmel/config/conf_dma.h Fri Jul 17 09:15:10 2015 +0100 @@ -1,48 +1,3 @@ -/** - * \file - * - * \brief SAM R21 Direct Memory Access Driver Configuration Header - * - * Copyright (C) 2014 Atmel Corporation. All rights reserved. - * - * \asf_license_start - * - * \page License - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are met: - * - * 1. Redistributions of source code must retain the above copyright notice, - * this list of conditions and the following disclaimer. - * - * 2. Redistributions in binary form must reproduce the above copyright notice, - * this list of conditions and the following disclaimer in the documentation - * and/or other materials provided with the distribution. - * - * 3. The name of Atmel may not be used to endorse or promote products derived - * from this software without specific prior written permission. - * - * 4. This software may only be redistributed and used in connection with an - * Atmel microcontroller product. - * - * THIS SOFTWARE IS PROVIDED BY ATMEL "AS IS" AND ANY EXPRESS OR IMPLIED - * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF - * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT ARE - * EXPRESSLY AND SPECIFICALLY DISCLAIMED. IN NO EVENT SHALL ATMEL BE LIABLE FOR - * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL - * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS - * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) - * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, - * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN - * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE - * POSSIBILITY OF SUCH DAMAGE. - * - * \asf_license_stop - * - */ -/** -* Support and FAQ: visit <a href="http://www.atmel.com/design-support/">Atmel Support</a> -*/ #ifndef CONF_DMA_H_INCLUDED #define CONF_DMA_H_INCLUDED
--- a/targets/hal/TARGET_Atmel/config/conf_extint.h Wed Jul 15 08:15:08 2015 +0100 +++ b/targets/hal/TARGET_Atmel/config/conf_extint.h Fri Jul 17 09:15:10 2015 +0100 @@ -1,48 +1,3 @@ -/** - * \file - * - * \brief SAM R21 External Interrupt Driver Configuration Header - * - * Copyright (C) 2014 Atmel Corporation. All rights reserved. - * - * \asf_license_start - * - * \page License - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are met: - * - * 1. Redistributions of source code must retain the above copyright notice, - * this list of conditions and the following disclaimer. - * - * 2. Redistributions in binary form must reproduce the above copyright notice, - * this list of conditions and the following disclaimer in the documentation - * and/or other materials provided with the distribution. - * - * 3. The name of Atmel may not be used to endorse or promote products derived - * from this software without specific prior written permission. - * - * 4. This software may only be redistributed and used in connection with an - * Atmel microcontroller product. - * - * THIS SOFTWARE IS PROVIDED BY ATMEL "AS IS" AND ANY EXPRESS OR IMPLIED - * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF - * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT ARE - * EXPRESSLY AND SPECIFICALLY DISCLAIMED. IN NO EVENT SHALL ATMEL BE LIABLE FOR - * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL - * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS - * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) - * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, - * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN - * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE - * POSSIBILITY OF SUCH DAMAGE. - * - * \asf_license_stop - * - */ -/** -* Support and FAQ: visit <a href="http://www.atmel.com/design-support/">Atmel Support</a> -*/ #ifndef CONF_EXTINT_H_INCLUDED #define CONF_EXTINT_H_INCLUDED
--- a/targets/hal/TARGET_Atmel/config/conf_spi.h Wed Jul 15 08:15:08 2015 +0100 +++ b/targets/hal/TARGET_Atmel/config/conf_spi.h Fri Jul 17 09:15:10 2015 +0100 @@ -1,50 +1,3 @@ -/** - * \file - * - * \brief SAM R21 SPI configuration - * - * Copyright (C) 2014 Atmel Corporation. All rights reserved. - * - * \asf_license_start - * - * \page License - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are met: - * - * 1. Redistributions of source code must retain the above copyright notice, - * this list of conditions and the following disclaimer. - * - * 2. Redistributions in binary form must reproduce the above copyright notice, - * this list of conditions and the following disclaimer in the documentation - * and/or other materials provided with the distribution. - * - * 3. The name of Atmel may not be used to endorse or promote products derived - * from this software without specific prior written permission. - * - * 4. This software may only be redistributed and used in connection with an - * Atmel microcontroller product. - * - * THIS SOFTWARE IS PROVIDED BY ATMEL "AS IS" AND ANY EXPRESS OR IMPLIED - * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF - * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT ARE - * EXPRESSLY AND SPECIFICALLY DISCLAIMED. IN NO EVENT SHALL ATMEL BE LIABLE FOR - * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL - * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS - * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) - * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, - * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN - * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE - * POSSIBILITY OF SUCH DAMAGE. - * - * \asf_license_stop - * - */ -/** -* Support and FAQ: visit <a href="http://www.atmel.com/design-support/">Atmel Support</a> -*/ - - #ifndef CONF_SPI_H_INCLUDED # define CONF_SPI_H_INCLUDED
--- a/targets/hal/TARGET_NXP/TARGET_LPC43XX/TARGET_LPC4337/PinNames.h Wed Jul 15 08:15:08 2015 +0100
+++ b/targets/hal/TARGET_NXP/TARGET_LPC43XX/TARGET_LPC4337/PinNames.h Fri Jul 17 09:15:10 2015 +0100
@@ -14,8 +14,6 @@
* limitations under the License.
*/
-#define BOARD_REV_B
-
#ifndef MBED_PINNAMES_H
#define MBED_PINNAMES_H
@@ -451,29 +449,6 @@
SFP_INS0 = MBED_PIN(0x1C, 0, 0, 0), // Interrupt select for pin interrupts 0 to 3
SFP_INS1 = MBED_PIN(0x1C, 1, 0, 0), // Interrupt select for pin interrupts 4 to 7
-/*
-#define MBED_ADC_NUM(MBED_PIN) ((MBED_PIN >> 5) & 0x0000000F)
-#define MBED_ADC_CHAN(MBED_PIN) (MBED_PIN & 0x0000001F)
-
- // Use pseudo-pin ID also for ADCs, although with special handling
- SFP_ADC0_0 = MBED_PIN(0x19, 2, 0, 0), // ADC0_0
- SFP_ADC0_1 = MBED_PIN(0x19, 2, 0, 1), // ADC0_1
- SFP_ADC0_2 = MBED_PIN(0x19, 2, 0, 2), // ADC0_2
- SFP_ADC0_3 = MBED_PIN(0x19, 2, 0, 3), // ADC0_3
- SFP_ADC0_4 = MBED_PIN(0x19, 2, 0, 4), // ADC0_4
- SFP_ADC0_5 = MBED_PIN(0x19, 2, 0, 5), // ADC0_5
- SFP_ADC0_6 = MBED_PIN(0x19, 2, 0, 6), // ADC0_6
-
- SFP_ADC1_0 = MBED_PIN(0x19, 3, 1, 0), // ADC1_0
- SFP_ADC1_1 = MBED_PIN(0x19, 3, 1, 1), // ADC1_1
- SFP_ADC1_2 = MBED_PIN(0x19, 3, 1, 2), // ADC1_2
- SFP_ADC1_3 = MBED_PIN(0x19, 3, 1, 3), // ADC1_3
- SFP_ADC1_4 = MBED_PIN(0x19, 3, 1, 4), // ADC1_4
- SFP_ADC1_5 = MBED_PIN(0x19, 3, 1, 5), // ADC1_5
- SFP_ADC1_6 = MBED_PIN(0x19, 3, 1, 6), // ADC1_6
- SFP_ADC1_7 = MBED_PIN(0x19, 3, 1, 7), // ADC1_7
-*/
-
// Dedicated pin (no GPIO)
P_DED = MBED_PIN(0, 0, NO_GPIO, 0),
@@ -482,21 +457,23 @@
// ---------- LPCXpresso 4337 pins ----------
-#ifdef BOARD_REV_A // for Rev.A
- D0 = P2_1,
- D1 = P2_0,
- D2 = P1_20,
- D3 = P1_18,
- D4 = P1_16,
- D5 = P1_15,
- D6 = P1_4,
- D7 = P2_2,
- D8 = P1_0,
- D9 = P1_3,
+ D0 = P2_11,
+ D1 = P2_10,
+ D2 = P2_13,
+ D3 = P1_8,
+ D4 = P2_2,
+ D5 = P1_7,
+ D6 = P2_9,
+ D7 = P2_12,
+
+ D8 = P2_6,
+ D9 = P6_5,
D10 = P1_5,
- D11 = P0_1,
- D12 = P0_0,
- D13 = P1_19,
+ D11 = P1_4,
+ D12 = P1_3,
+ D13 = PF_4,
+ D14 = P2_3,
+ D15 = P2_4,
SDA = P2_3,
SCL = P2_4,
@@ -504,44 +481,10 @@
A1 = P4_1,
A2 = PF_8,
A3 = P7_5,
- A4 = P1_14,
+ A4 = NC,
A5 = P2_5,
- LED_GREEN = GPIO0_14,
- LED_RED = GPIO3_7,
- LED_BLUE = GPIO3_5,
-
- // Serial pins
- UART0_TX = P2_0,
- UART0_RX = P2_1,
- USBTX = UART0_TX,
- USBRX = UART0_RX,
-#else // for Rev.B
- D0 = P1_14,
- D1 = P3_4,
- D2 = P2_13,
- D3 = P1_8,
- D4 = P2_6,
- D5 = P1_7,
- D6 = P2_9,
- D7 = P2_2,
- D8 = P3_5,
- D9 = P1_2,
- D10 = P1_5,
- D11 = P1_4,
- D12 = P1_3,
- D13 = PF_4,
- SDA = P2_3,
- SCL = P2_4,
-
- A0 = P4_3,
- A1 = P4_1,
- A2 = PF_8,
- A3 = P7_5,
- A4 = P2_11,
- A5 = P2_5,
-
- LED_GREEN = P2_10,
+ LED_GREEN = P2_7,
LED_RED = P6_11,
LED_BLUE = P6_9,
@@ -552,7 +495,6 @@
UART1_RX = D0,
USBTX = UART0_TX,
USBRX = UART0_RX,
-#endif
I2C_SDA = SDA,
I2C_SDL = SCL,
@@ -562,46 +504,6 @@
LED3 = LED_GREEN,
LED4 = LED_RED,
-// UART1_TX = P5_6,
-// UART1_RX = P1_14,
-// UART2_TX = P2_10,
-// UART2_RX = P2_11,
-// UART3_TX = P2_3,
-// UART3_RX = P2_4,
-
-/*
- // Analog pins
- ADC4 = P4_3,
- ADC2 = P4_1,
- ADC0 = P7_4,
- ADC1 = P7_5,
- ADC3 = P7_7,
- DAC0 = P4_4,
-*/
-
- // USB pins
- //P_USB0_TX = SFP_USB1,
- //P_USB0_RX = SFP_USB1,
-
-
-/*
- // PWM pins
- // 210E 210 200E 200
- // ---- ---- ---- ----
- PWM1 = P1_7, // J9-3 J9-3 S2-3 S2-3
- PWM2 = P7_6, // J9-8 J9-8 S4-6 S4-6
- PWM3 = P6_12, // J10-1 J10-1 S10-3 n/p
- PWM4 = P4_6, // J10-3 J10-3 S2-6 S2-6
- PWM5 = P7_5, // J8-2 J8-2 S4-4 S4-4
- PWM6 = P4_1, // J8-3 J8-3 S3-4 S3-4
- PWM7 = P7_7, // J8-4 J8-4 S4-5 S4-5
- PWM8 = P2_8, // J12-4 n/p S8-3 n/p
- PWM9 = P2_9, // J12-6 n/p S9-3 n/p
- PWM10 = P7_1, // J13-5 n/p S9-8 n/p
- PWM11 = P7_0, // J13-6 n/p S9-9 n/p
- PWM12 = P1_5, // J14-7 n/p S10-6 n/p
-*/
-
// ---------- End of LPCXpresso 4337 pins ----------
} PinName;
