diff --git a/arch/arm/src/samdl/chip/samd_i2c_master.h b/arch/arm/src/samdl/chip/samd_i2c_master.h index 2c67836a82f..4e870272729 100644 --- a/arch/arm/src/samdl/chip/samd_i2c_master.h +++ b/arch/arm/src/samdl/chip/samd_i2c_master.h @@ -47,7 +47,7 @@ #include #include "chip.h" -#include "chip/sam_sercom.h" +#include "chip/samd_sercom.h" #ifdef CONFIG_ARCH_FAMILY_SAMD20 diff --git a/arch/arm/src/samdl/chip/samd_i2c_slave.h b/arch/arm/src/samdl/chip/samd_i2c_slave.h index 91a24664166..268a07b6f06 100644 --- a/arch/arm/src/samdl/chip/samd_i2c_slave.h +++ b/arch/arm/src/samdl/chip/samd_i2c_slave.h @@ -47,7 +47,7 @@ #include #include "chip.h" -#include "chip/sam_sercom.h" +#include "chip/samd_sercom.h" #ifdef CONFIG_ARCH_FAMILY_SAMD20 diff --git a/arch/arm/src/samdl/chip/sam_sercom.h b/arch/arm/src/samdl/chip/samd_sercom.h similarity index 93% rename from arch/arm/src/samdl/chip/sam_sercom.h rename to arch/arm/src/samdl/chip/samd_sercom.h index f2845677121..8a69e4050e8 100644 --- a/arch/arm/src/samdl/chip/sam_sercom.h +++ b/arch/arm/src/samdl/chip/samd_sercom.h @@ -1,7 +1,7 @@ /******************************************************************************************** - * arch/arm/src/samdl/chip/sam_sercom.h + * arch/arm/src/samdl/chip/samd_sercom.h * - * Copyright (C) 2014 Gregory Nutt. All rights reserved. + * Copyright (C) 2014-2015 Gregory Nutt. All rights reserved. * Author: Gregory Nutt * * References: @@ -37,8 +37,8 @@ * ********************************************************************************************/ -#ifndef __ARCH_ARM_SRC_SAMDL_CHIP_SAM_SERCOM_H -#define __ARCH_ARM_SRC_SAMDL_CHIP_SAM_SERCOM_H +#ifndef __ARCH_ARM_SRC_SAMDL_CHIP_SAMD_SERCOM_H +#define __ARCH_ARM_SRC_SAMDL_CHIP_SAMD_SERCOM_H /******************************************************************************************** * Included Files @@ -81,4 +81,4 @@ * Public Functions ********************************************************************************************/ -#endif /* __ARCH_ARM_SRC_SAMDL_CHIP_SAM_SERCOM_H */ +#endif /* __ARCH_ARM_SRC_SAMDL_CHIP_SAMD_SERCOM_H */ diff --git a/arch/arm/src/samdl/chip/samd_spi.h b/arch/arm/src/samdl/chip/samd_spi.h index 40b65159c55..13dd0166f8d 100644 --- a/arch/arm/src/samdl/chip/samd_spi.h +++ b/arch/arm/src/samdl/chip/samd_spi.h @@ -47,7 +47,7 @@ #include #include "chip.h" -#include "chip/sam_sercom.h" +#include "chip/samd_sercom.h" #ifdef CONFIG_ARCH_FAMILY_SAMD20 diff --git a/arch/arm/src/samdl/chip/samd_usart.h b/arch/arm/src/samdl/chip/samd_usart.h index 479a39a3b1f..4155eef4912 100644 --- a/arch/arm/src/samdl/chip/samd_usart.h +++ b/arch/arm/src/samdl/chip/samd_usart.h @@ -47,7 +47,7 @@ #include #include "chip.h" -#include "chip/sam_sercom.h" +#include "chip/samd_sercom.h" #ifdef CONFIG_ARCH_FAMILY_SAMD20 diff --git a/arch/arm/src/samdl/chip/saml_i2c_master.h b/arch/arm/src/samdl/chip/saml_i2c_master.h index d2c798c1736..743d927fc1e 100644 --- a/arch/arm/src/samdl/chip/saml_i2c_master.h +++ b/arch/arm/src/samdl/chip/saml_i2c_master.h @@ -47,7 +47,7 @@ #include #include "chip.h" -#include "chip/sam_sercom.h" +#include "chip/saml_sercom.h" #ifdef CONFIG_ARCH_FAMILY_SAML21 diff --git a/arch/arm/src/samdl/chip/saml_i2c_slave.h b/arch/arm/src/samdl/chip/saml_i2c_slave.h index 20fac459f61..be4890a1d48 100644 --- a/arch/arm/src/samdl/chip/saml_i2c_slave.h +++ b/arch/arm/src/samdl/chip/saml_i2c_slave.h @@ -47,7 +47,7 @@ #include #include "chip.h" -#include "chip/sam_sercom.h" +#include "chip/saml_sercom.h" #ifdef CONFIG_ARCH_FAMILY_SAML21 diff --git a/arch/arm/src/samdl/chip/saml_sercom.h b/arch/arm/src/samdl/chip/saml_sercom.h new file mode 100644 index 00000000000..da7cea14549 --- /dev/null +++ b/arch/arm/src/samdl/chip/saml_sercom.h @@ -0,0 +1,67 @@ +/******************************************************************************************** + * arch/arm/src/samdl/chip/saml_sercom.h + * + * Copyright (C) 2015 Gregory Nutt. All rights reserved. + * Author: Gregory Nutt + * + * References: + * "Atmel SAM L21E / SAM L21G / SAM L21J Smart ARM-Based Microcontroller + * Datasheet", Atmel-42385C-SAML21_Datasheet_Preliminary-03/20/15 + * + * 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. Neither the name NuttX nor the names of its contributors may be + * used to endorse or promote products derived from this software + * without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS + * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE + * COPYRIGHT OWNER OR CONTRIBUTORS 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. + * + ********************************************************************************************/ + +#ifndef __ARCH_ARM_SRC_SAMDL_CHIP_SAML_SERCOM_H +#define __ARCH_ARM_SRC_SAMDL_CHIP_SAML_SERCOM_H + +/******************************************************************************************** + * Included Files + ********************************************************************************************/ + +#include + +#include "chip.h" + +/******************************************************************************************** + * Pre-processor Definitions + ********************************************************************************************/ + +/******************************************************************************************** + * Public Types + ********************************************************************************************/ + +/******************************************************************************************** + * Public Data + ********************************************************************************************/ + +/******************************************************************************************** + * Public Functions + ********************************************************************************************/ + +#endif /* __ARCH_ARM_SRC_SAMDL_CHIP_SAML_SERCOM_H */ diff --git a/arch/arm/src/samdl/chip/saml_spi.h b/arch/arm/src/samdl/chip/saml_spi.h index c2a2a26653c..f69c14e6b93 100644 --- a/arch/arm/src/samdl/chip/saml_spi.h +++ b/arch/arm/src/samdl/chip/saml_spi.h @@ -47,7 +47,7 @@ #include #include "chip.h" -#include "chip/sam_sercom.h" +#include "chip/saml_sercom.h" #ifdef CONFIG_ARCH_FAMILY_SAML21 diff --git a/arch/arm/src/samdl/chip/saml_supc.h b/arch/arm/src/samdl/chip/saml_supc.h index 2f29948972d..2dbbc29cf91 100644 --- a/arch/arm/src/samdl/chip/saml_supc.h +++ b/arch/arm/src/samdl/chip/saml_supc.h @@ -47,7 +47,6 @@ #include #include "chip.h" -#include "chip/sam_sercom.h" #ifdef CONFIG_ARCH_FAMILY_SAML21 diff --git a/arch/arm/src/samdl/chip/saml_usart.h b/arch/arm/src/samdl/chip/saml_usart.h index 83509107d81..de8482e4be7 100644 --- a/arch/arm/src/samdl/chip/saml_usart.h +++ b/arch/arm/src/samdl/chip/saml_usart.h @@ -47,7 +47,7 @@ #include #include "chip.h" -#include "chip/sam_sercom.h" +#include "chip/saml_sercom.h" #ifdef CONFIG_ARCH_FAMILY_SAML21 diff --git a/arch/arm/src/samdl/chip/saml_wdt.h b/arch/arm/src/samdl/chip/saml_wdt.h index 61550b91688..1e236504f6c 100644 --- a/arch/arm/src/samdl/chip/saml_wdt.h +++ b/arch/arm/src/samdl/chip/saml_wdt.h @@ -47,7 +47,6 @@ #include #include "chip.h" -#include "chip/sam_sercom.h" #ifdef CONFIG_ARCH_FAMILY_SAML21 diff --git a/arch/arm/src/samdl/sam_lowputc.c b/arch/arm/src/samdl/sam_lowputc.c index c74539bddc4..d62ce43d76c 100644 --- a/arch/arm/src/samdl/sam_lowputc.c +++ b/arch/arm/src/samdl/sam_lowputc.c @@ -58,6 +58,7 @@ #include "sam_gclk.h" #include "sam_pm.h" +#include "sam_sercom.h" #include "sam_usart.h" #include "sam_lowputc.h" diff --git a/arch/arm/src/samdl/sam_sercom.h b/arch/arm/src/samdl/sam_sercom.h index de5f149fdd3..3f5c7da7c94 100644 --- a/arch/arm/src/samdl/sam_sercom.h +++ b/arch/arm/src/samdl/sam_sercom.h @@ -44,12 +44,18 @@ #include -#include "chip/sam_sercom.h" - #include "up_arch.h" #include "sam_config.h" #include "sam_pm.h" +#if defined(CONFIG_ARCH_FAMILY_SAMD20) +# include "chip/samd_sercom.h" +#elif defined(CONFIG_ARCH_FAMILY_SAML21) +# include "chip/saml_sercom.h" +#else +# error Unrecognized SAMD/L architecture +#endif + /**************************************************************************** * Pre-processor Definitions ****************************************************************************/