Rename sam_sercom.h to samd_sercom.h; Add saml_sercom.h for the SAML21

This commit is contained in:
Gregory Nutt 2015-05-18 10:54:50 -06:00
parent 317fb073ef
commit aecb60a8e8
14 changed files with 89 additions and 17 deletions

View File

@ -47,7 +47,7 @@
#include <nuttx/config.h> #include <nuttx/config.h>
#include "chip.h" #include "chip.h"
#include "chip/sam_sercom.h" #include "chip/samd_sercom.h"
#ifdef CONFIG_ARCH_FAMILY_SAMD20 #ifdef CONFIG_ARCH_FAMILY_SAMD20

View File

@ -47,7 +47,7 @@
#include <nuttx/config.h> #include <nuttx/config.h>
#include "chip.h" #include "chip.h"
#include "chip/sam_sercom.h" #include "chip/samd_sercom.h"
#ifdef CONFIG_ARCH_FAMILY_SAMD20 #ifdef CONFIG_ARCH_FAMILY_SAMD20

View File

@ -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 <gnutt@nuttx.org> * Author: Gregory Nutt <gnutt@nuttx.org>
* *
* References: * References:
@ -37,8 +37,8 @@
* *
********************************************************************************************/ ********************************************************************************************/
#ifndef __ARCH_ARM_SRC_SAMDL_CHIP_SAM_SERCOM_H #ifndef __ARCH_ARM_SRC_SAMDL_CHIP_SAMD_SERCOM_H
#define __ARCH_ARM_SRC_SAMDL_CHIP_SAM_SERCOM_H #define __ARCH_ARM_SRC_SAMDL_CHIP_SAMD_SERCOM_H
/******************************************************************************************** /********************************************************************************************
* Included Files * Included Files
@ -81,4 +81,4 @@
* Public Functions * Public Functions
********************************************************************************************/ ********************************************************************************************/
#endif /* __ARCH_ARM_SRC_SAMDL_CHIP_SAM_SERCOM_H */ #endif /* __ARCH_ARM_SRC_SAMDL_CHIP_SAMD_SERCOM_H */

View File

@ -47,7 +47,7 @@
#include <nuttx/config.h> #include <nuttx/config.h>
#include "chip.h" #include "chip.h"
#include "chip/sam_sercom.h" #include "chip/samd_sercom.h"
#ifdef CONFIG_ARCH_FAMILY_SAMD20 #ifdef CONFIG_ARCH_FAMILY_SAMD20

View File

@ -47,7 +47,7 @@
#include <nuttx/config.h> #include <nuttx/config.h>
#include "chip.h" #include "chip.h"
#include "chip/sam_sercom.h" #include "chip/samd_sercom.h"
#ifdef CONFIG_ARCH_FAMILY_SAMD20 #ifdef CONFIG_ARCH_FAMILY_SAMD20

View File

@ -47,7 +47,7 @@
#include <nuttx/config.h> #include <nuttx/config.h>
#include "chip.h" #include "chip.h"
#include "chip/sam_sercom.h" #include "chip/saml_sercom.h"
#ifdef CONFIG_ARCH_FAMILY_SAML21 #ifdef CONFIG_ARCH_FAMILY_SAML21

View File

@ -47,7 +47,7 @@
#include <nuttx/config.h> #include <nuttx/config.h>
#include "chip.h" #include "chip.h"
#include "chip/sam_sercom.h" #include "chip/saml_sercom.h"
#ifdef CONFIG_ARCH_FAMILY_SAML21 #ifdef CONFIG_ARCH_FAMILY_SAML21

View File

@ -0,0 +1,67 @@
/********************************************************************************************
* arch/arm/src/samdl/chip/saml_sercom.h
*
* Copyright (C) 2015 Gregory Nutt. All rights reserved.
* Author: Gregory Nutt <gnutt@nuttx.org>
*
* 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 <nuttx/config.h>
#include "chip.h"
/********************************************************************************************
* Pre-processor Definitions
********************************************************************************************/
/********************************************************************************************
* Public Types
********************************************************************************************/
/********************************************************************************************
* Public Data
********************************************************************************************/
/********************************************************************************************
* Public Functions
********************************************************************************************/
#endif /* __ARCH_ARM_SRC_SAMDL_CHIP_SAML_SERCOM_H */

View File

@ -47,7 +47,7 @@
#include <nuttx/config.h> #include <nuttx/config.h>
#include "chip.h" #include "chip.h"
#include "chip/sam_sercom.h" #include "chip/saml_sercom.h"
#ifdef CONFIG_ARCH_FAMILY_SAML21 #ifdef CONFIG_ARCH_FAMILY_SAML21

View File

@ -47,7 +47,6 @@
#include <nuttx/config.h> #include <nuttx/config.h>
#include "chip.h" #include "chip.h"
#include "chip/sam_sercom.h"
#ifdef CONFIG_ARCH_FAMILY_SAML21 #ifdef CONFIG_ARCH_FAMILY_SAML21

View File

@ -47,7 +47,7 @@
#include <nuttx/config.h> #include <nuttx/config.h>
#include "chip.h" #include "chip.h"
#include "chip/sam_sercom.h" #include "chip/saml_sercom.h"
#ifdef CONFIG_ARCH_FAMILY_SAML21 #ifdef CONFIG_ARCH_FAMILY_SAML21

View File

@ -47,7 +47,6 @@
#include <nuttx/config.h> #include <nuttx/config.h>
#include "chip.h" #include "chip.h"
#include "chip/sam_sercom.h"
#ifdef CONFIG_ARCH_FAMILY_SAML21 #ifdef CONFIG_ARCH_FAMILY_SAML21

View File

@ -58,6 +58,7 @@
#include "sam_gclk.h" #include "sam_gclk.h"
#include "sam_pm.h" #include "sam_pm.h"
#include "sam_sercom.h"
#include "sam_usart.h" #include "sam_usart.h"
#include "sam_lowputc.h" #include "sam_lowputc.h"

View File

@ -44,12 +44,18 @@
#include <stdbool.h> #include <stdbool.h>
#include "chip/sam_sercom.h"
#include "up_arch.h" #include "up_arch.h"
#include "sam_config.h" #include "sam_config.h"
#include "sam_pm.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 * Pre-processor Definitions
****************************************************************************/ ****************************************************************************/