1
0
mirror of https://github.com/RIOT-OS/RIOT.git synced 2024-12-29 04:50:03 +01:00

Merge pull request #13310 from benpicco/sam0-exti-common

cpu/sam0_common: use generic exti_config
This commit is contained in:
benpicco 2020-02-26 08:40:49 +01:00 committed by GitHub
commit 0edfd13df0
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
9 changed files with 747 additions and 107 deletions

View File

@ -0,0 +1,697 @@
/*
* Copyright (C) 2020 ML!PA Consulting GmbH
*
* This file is subject to the terms and conditions of the GNU Lesser
* General Public License v2.1. See the file LICENSE in the top level
* directory for more details.
*/
/**
* @ingroup cpu_sam0_common
* @brief Generic EXTI map for all CPUs of the sam0 family.
* @{
*
* @author Benjamin Valentin <benjamin.valentin@ml-pa.com>
* @author Derek Hageman <hageman@inthat.cloud>
*/
#ifndef EXTI_CONFIG_H
#define EXTI_CONFIG_H
#include "cpu_conf.h"
#ifdef __cplusplus
extern "C" {
#endif
/**
* @brief Mapping of pins to EXTI lines, -1 means not EXTI possible
*/
static const int8_t exti_config[PORT_GROUPS][32] = {
#if PORT_GROUPS >= 1
{
#ifdef PIN_PA00A_EIC_EXTINT_NUM
PIN_PA00A_EIC_EXTINT_NUM,
#else
-1,
#endif
#ifdef PIN_PA01A_EIC_EXTINT_NUM
PIN_PA01A_EIC_EXTINT_NUM,
#else
-1,
#endif
#ifdef PIN_PA02A_EIC_EXTINT_NUM
PIN_PA02A_EIC_EXTINT_NUM,
#else
-1,
#endif
#ifdef PIN_PA03A_EIC_EXTINT_NUM
PIN_PA03A_EIC_EXTINT_NUM,
#else
-1,
#endif
#ifdef PIN_PA04A_EIC_EXTINT_NUM
PIN_PA04A_EIC_EXTINT_NUM,
#else
-1,
#endif
#ifdef PIN_PA05A_EIC_EXTINT_NUM
PIN_PA05A_EIC_EXTINT_NUM,
#else
-1,
#endif
#ifdef PIN_PA06A_EIC_EXTINT_NUM
PIN_PA06A_EIC_EXTINT_NUM,
#else
-1,
#endif
#ifdef PIN_PA07A_EIC_EXTINT_NUM
PIN_PA07A_EIC_EXTINT_NUM,
#else
-1,
#endif
#ifdef PIN_PA08A_EIC_EXTINT_NUM
PIN_PA08A_EIC_EXTINT_NUM,
#else
-1,
#endif
#ifdef PIN_PA09A_EIC_EXTINT_NUM
PIN_PA09A_EIC_EXTINT_NUM,
#else
-1,
#endif
#ifdef PIN_PA10A_EIC_EXTINT_NUM
PIN_PA10A_EIC_EXTINT_NUM,
#else
-1,
#endif
#ifdef PIN_PA11A_EIC_EXTINT_NUM
PIN_PA11A_EIC_EXTINT_NUM,
#else
-1,
#endif
#ifdef PIN_PA12A_EIC_EXTINT_NUM
PIN_PA12A_EIC_EXTINT_NUM,
#else
-1,
#endif
#ifdef PIN_PA13A_EIC_EXTINT_NUM
PIN_PA13A_EIC_EXTINT_NUM,
#else
-1,
#endif
#ifdef PIN_PA14A_EIC_EXTINT_NUM
PIN_PA14A_EIC_EXTINT_NUM,
#else
-1,
#endif
#ifdef PIN_PA15A_EIC_EXTINT_NUM
PIN_PA15A_EIC_EXTINT_NUM,
#else
-1,
#endif
#ifdef PIN_PA16A_EIC_EXTINT_NUM
PIN_PA16A_EIC_EXTINT_NUM,
#else
-1,
#endif
#ifdef PIN_PA17A_EIC_EXTINT_NUM
PIN_PA17A_EIC_EXTINT_NUM,
#else
-1,
#endif
#ifdef PIN_PA18A_EIC_EXTINT_NUM
PIN_PA18A_EIC_EXTINT_NUM,
#else
-1,
#endif
#ifdef PIN_PA19A_EIC_EXTINT_NUM
PIN_PA19A_EIC_EXTINT_NUM,
#else
-1,
#endif
#ifdef PIN_PA20A_EIC_EXTINT_NUM
PIN_PA20A_EIC_EXTINT_NUM,
#else
-1,
#endif
#ifdef PIN_PA21A_EIC_EXTINT_NUM
PIN_PA21A_EIC_EXTINT_NUM,
#else
-1,
#endif
#ifdef PIN_PA22A_EIC_EXTINT_NUM
PIN_PA22A_EIC_EXTINT_NUM,
#else
-1,
#endif
#ifdef PIN_PA23A_EIC_EXTINT_NUM
PIN_PA23A_EIC_EXTINT_NUM,
#else
-1,
#endif
#ifdef PIN_PA24A_EIC_EXTINT_NUM
PIN_PA24A_EIC_EXTINT_NUM,
#else
-1,
#endif
#ifdef PIN_PA25A_EIC_EXTINT_NUM
PIN_PA25A_EIC_EXTINT_NUM,
#else
-1,
#endif
#ifdef PIN_PA26A_EIC_EXTINT_NUM
PIN_PA26A_EIC_EXTINT_NUM,
#else
-1,
#endif
#ifdef PIN_PA27A_EIC_EXTINT_NUM
PIN_PA27A_EIC_EXTINT_NUM,
#else
-1,
#endif
#ifdef PIN_PA28A_EIC_EXTINT_NUM
PIN_PA28A_EIC_EXTINT_NUM,
#else
-1,
#endif
#ifdef PIN_PA29A_EIC_EXTINT_NUM
PIN_PA29A_EIC_EXTINT_NUM,
#else
-1,
#endif
#ifdef PIN_PA30A_EIC_EXTINT_NUM
PIN_PA30A_EIC_EXTINT_NUM,
#else
-1,
#endif
#ifdef PIN_PA31A_EIC_EXTINT_NUM
PIN_PA31A_EIC_EXTINT_NUM,
#else
-1,
#endif
},
#endif
#if PORT_GROUPS >= 2
{
#ifdef PIN_PB00A_EIC_EXTINT_NUM
PIN_PB00A_EIC_EXTINT_NUM,
#else
-1,
#endif
#ifdef PIN_PB01A_EIC_EXTINT_NUM
PIN_PB01A_EIC_EXTINT_NUM,
#else
-1,
#endif
#ifdef PIN_PB02A_EIC_EXTINT_NUM
PIN_PB02A_EIC_EXTINT_NUM,
#else
-1,
#endif
#ifdef PIN_PB03A_EIC_EXTINT_NUM
PIN_PB03A_EIC_EXTINT_NUM,
#else
-1,
#endif
#ifdef PIN_PB04A_EIC_EXTINT_NUM
PIN_PB04A_EIC_EXTINT_NUM,
#else
-1,
#endif
#ifdef PIN_PB05A_EIC_EXTINT_NUM
PIN_PB05A_EIC_EXTINT_NUM,
#else
-1,
#endif
#ifdef PIN_PB06A_EIC_EXTINT_NUM
PIN_PB06A_EIC_EXTINT_NUM,
#else
-1,
#endif
#ifdef PIN_PB07A_EIC_EXTINT_NUM
PIN_PB07A_EIC_EXTINT_NUM,
#else
-1,
#endif
#ifdef PIN_PB08A_EIC_EXTINT_NUM
PIN_PB08A_EIC_EXTINT_NUM,
#else
-1,
#endif
#ifdef PIN_PB09A_EIC_EXTINT_NUM
PIN_PB09A_EIC_EXTINT_NUM,
#else
-1,
#endif
#ifdef PIN_PB10A_EIC_EXTINT_NUM
PIN_PB10A_EIC_EXTINT_NUM,
#else
-1,
#endif
#ifdef PIN_PB11A_EIC_EXTINT_NUM
PIN_PB11A_EIC_EXTINT_NUM,
#else
-1,
#endif
#ifdef PIN_PB12A_EIC_EXTINT_NUM
PIN_PB12A_EIC_EXTINT_NUM,
#else
-1,
#endif
#ifdef PIN_PB13A_EIC_EXTINT_NUM
PIN_PB13A_EIC_EXTINT_NUM,
#else
-1,
#endif
#ifdef PIN_PB14A_EIC_EXTINT_NUM
PIN_PB14A_EIC_EXTINT_NUM,
#else
-1,
#endif
#ifdef PIN_PB15A_EIC_EXTINT_NUM
PIN_PB15A_EIC_EXTINT_NUM,
#else
-1,
#endif
#ifdef PIN_PB16A_EIC_EXTINT_NUM
PIN_PB16A_EIC_EXTINT_NUM,
#else
-1,
#endif
#ifdef PIN_PB17A_EIC_EXTINT_NUM
PIN_PB17A_EIC_EXTINT_NUM,
#else
-1,
#endif
#ifdef PIN_PB18A_EIC_EXTINT_NUM
PIN_PB18A_EIC_EXTINT_NUM,
#else
-1,
#endif
#ifdef PIN_PB19A_EIC_EXTINT_NUM
PIN_PB19A_EIC_EXTINT_NUM,
#else
-1,
#endif
#ifdef PIN_PB20A_EIC_EXTINT_NUM
PIN_PB20A_EIC_EXTINT_NUM,
#else
-1,
#endif
#ifdef PIN_PB21A_EIC_EXTINT_NUM
PIN_PB21A_EIC_EXTINT_NUM,
#else
-1,
#endif
#ifdef PIN_PB22A_EIC_EXTINT_NUM
PIN_PB22A_EIC_EXTINT_NUM,
#else
-1,
#endif
#ifdef PIN_PB23A_EIC_EXTINT_NUM
PIN_PB23A_EIC_EXTINT_NUM,
#else
-1,
#endif
#ifdef PIN_PB24A_EIC_EXTINT_NUM
PIN_PB24A_EIC_EXTINT_NUM,
#else
-1,
#endif
#ifdef PIN_PB25A_EIC_EXTINT_NUM
PIN_PB25A_EIC_EXTINT_NUM,
#else
-1,
#endif
#ifdef PIN_PB26A_EIC_EXTINT_NUM
PIN_PB26A_EIC_EXTINT_NUM,
#else
-1,
#endif
#ifdef PIN_PB27A_EIC_EXTINT_NUM
PIN_PB27A_EIC_EXTINT_NUM,
#else
-1,
#endif
#ifdef PIN_PB28A_EIC_EXTINT_NUM
PIN_PB28A_EIC_EXTINT_NUM,
#else
-1,
#endif
#ifdef PIN_PB29A_EIC_EXTINT_NUM
PIN_PB29A_EIC_EXTINT_NUM,
#else
-1,
#endif
#ifdef PIN_PB30A_EIC_EXTINT_NUM
PIN_PB30A_EIC_EXTINT_NUM,
#else
-1,
#endif
#ifdef PIN_PB31A_EIC_EXTINT_NUM
PIN_PB31A_EIC_EXTINT_NUM,
#else
-1,
#endif
},
#endif
#if PORT_GROUPS >= 3
{
#ifdef PIN_PC00A_EIC_EXTINT_NUM
PIN_PC00A_EIC_EXTINT_NUM,
#else
-1,
#endif
#ifdef PIN_PC01A_EIC_EXTINT_NUM
PIN_PC01A_EIC_EXTINT_NUM,
#else
-1,
#endif
#ifdef PIN_PC02A_EIC_EXTINT_NUM
PIN_PC02A_EIC_EXTINT_NUM,
#else
-1,
#endif
#ifdef PIN_PC03A_EIC_EXTINT_NUM
PIN_PC03A_EIC_EXTINT_NUM,
#else
-1,
#endif
#ifdef PIN_PC04A_EIC_EXTINT_NUM
PIN_PC04A_EIC_EXTINT_NUM,
#else
-1,
#endif
#ifdef PIN_PC05A_EIC_EXTINT_NUM
PIN_PC05A_EIC_EXTINT_NUM,
#else
-1,
#endif
#ifdef PIN_PC06A_EIC_EXTINT_NUM
PIN_PC06A_EIC_EXTINT_NUM,
#else
-1,
#endif
#ifdef PIN_PC07A_EIC_EXTINT_NUM
PIN_PC07A_EIC_EXTINT_NUM,
#else
-1,
#endif
#ifdef PIN_PC08A_EIC_EXTINT_NUM
PIN_PC08A_EIC_EXTINT_NUM,
#else
-1,
#endif
#ifdef PIN_PC09A_EIC_EXTINT_NUM
PIN_PC09A_EIC_EXTINT_NUM,
#else
-1,
#endif
#ifdef PIN_PC10A_EIC_EXTINT_NUM
PIN_PC10A_EIC_EXTINT_NUM,
#else
-1,
#endif
#ifdef PIN_PC11A_EIC_EXTINT_NUM
PIN_PC11A_EIC_EXTINT_NUM,
#else
-1,
#endif
#ifdef PIN_PC12A_EIC_EXTINT_NUM
PIN_PC12A_EIC_EXTINT_NUM,
#else
-1,
#endif
#ifdef PIN_PC13A_EIC_EXTINT_NUM
PIN_PC13A_EIC_EXTINT_NUM,
#else
-1,
#endif
#ifdef PIN_PC14A_EIC_EXTINT_NUM
PIN_PC14A_EIC_EXTINT_NUM,
#else
-1,
#endif
#ifdef PIN_PC15A_EIC_EXTINT_NUM
PIN_PC15A_EIC_EXTINT_NUM,
#else
-1,
#endif
#ifdef PIN_PC16A_EIC_EXTINT_NUM
PIN_PC16A_EIC_EXTINT_NUM,
#else
-1,
#endif
#ifdef PIN_PC17A_EIC_EXTINT_NUM
PIN_PC17A_EIC_EXTINT_NUM,
#else
-1,
#endif
#ifdef PIN_PC18A_EIC_EXTINT_NUM
PIN_PC18A_EIC_EXTINT_NUM,
#else
-1,
#endif
#ifdef PIN_PC19A_EIC_EXTINT_NUM
PIN_PC19A_EIC_EXTINT_NUM,
#else
-1,
#endif
#ifdef PIN_PC20A_EIC_EXTINT_NUM
PIN_PC20A_EIC_EXTINT_NUM,
#else
-1,
#endif
#ifdef PIN_PC21A_EIC_EXTINT_NUM
PIN_PC21A_EIC_EXTINT_NUM,
#else
-1,
#endif
#ifdef PIN_PC22A_EIC_EXTINT_NUM
PIN_PC22A_EIC_EXTINT_NUM,
#else
-1,
#endif
#ifdef PIN_PC23A_EIC_EXTINT_NUM
PIN_PC23A_EIC_EXTINT_NUM,
#else
-1,
#endif
#ifdef PIN_PC24A_EIC_EXTINT_NUM
PIN_PC24A_EIC_EXTINT_NUM,
#else
-1,
#endif
#ifdef PIN_PC25A_EIC_EXTINT_NUM
PIN_PC25A_EIC_EXTINT_NUM,
#else
-1,
#endif
#ifdef PIN_PC26A_EIC_EXTINT_NUM
PIN_PC26A_EIC_EXTINT_NUM,
#else
-1,
#endif
#ifdef PIN_PC27A_EIC_EXTINT_NUM
PIN_PC27A_EIC_EXTINT_NUM,
#else
-1,
#endif
#ifdef PIN_PC28A_EIC_EXTINT_NUM
PIN_PC28A_EIC_EXTINT_NUM,
#else
-1,
#endif
#ifdef PIN_PC29A_EIC_EXTINT_NUM
PIN_PC29A_EIC_EXTINT_NUM,
#else
-1,
#endif
#ifdef PIN_PC30A_EIC_EXTINT_NUM
PIN_PC30A_EIC_EXTINT_NUM,
#else
-1,
#endif
#ifdef PIN_PC31A_EIC_EXTINT_NUM
PIN_PC31A_EIC_EXTINT_NUM,
#else
-1,
#endif
},
#endif
#if PORT_GROUPS >= 4
{
#ifdef PIN_PD00A_EIC_EXTINT_NUM
PIN_PD00A_EIC_EXTINT_NUM,
#else
-1,
#endif
#ifdef PIN_PD01A_EIC_EXTINT_NUM
PIN_PD01A_EIC_EXTINT_NUM,
#else
-1,
#endif
#ifdef PIN_PD02A_EIC_EXTINT_NUM
PIN_PD02A_EIC_EXTINT_NUM,
#else
-1,
#endif
#ifdef PIN_PD03A_EIC_EXTINT_NUM
PIN_PD03A_EIC_EXTINT_NUM,
#else
-1,
#endif
#ifdef PIN_PD04A_EIC_EXTINT_NUM
PIN_PD04A_EIC_EXTINT_NUM,
#else
-1,
#endif
#ifdef PIN_PD05A_EIC_EXTINT_NUM
PIN_PD05A_EIC_EXTINT_NUM,
#else
-1,
#endif
#ifdef PIN_PD06A_EIC_EXTINT_NUM
PIN_PD06A_EIC_EXTINT_NUM,
#else
-1,
#endif
#ifdef PIN_PD07A_EIC_EXTINT_NUM
PIN_PD07A_EIC_EXTINT_NUM,
#else
-1,
#endif
#ifdef PIN_PD08A_EIC_EXTINT_NUM
PIN_PD08A_EIC_EXTINT_NUM,
#else
-1,
#endif
#ifdef PIN_PD09A_EIC_EXTINT_NUM
PIN_PD09A_EIC_EXTINT_NUM,
#else
-1,
#endif
#ifdef PIN_PD10A_EIC_EXTINT_NUM
PIN_PD10A_EIC_EXTINT_NUM,
#else
-1,
#endif
#ifdef PIN_PD11A_EIC_EXTINT_NUM
PIN_PD11A_EIC_EXTINT_NUM,
#else
-1,
#endif
#ifdef PIN_PD12A_EIC_EXTINT_NUM
PIN_PD12A_EIC_EXTINT_NUM,
#else
-1,
#endif
#ifdef PIN_PD13A_EIC_EXTINT_NUM
PIN_PD13A_EIC_EXTINT_NUM,
#else
-1,
#endif
#ifdef PIN_PD14A_EIC_EXTINT_NUM
PIN_PD14A_EIC_EXTINT_NUM,
#else
-1,
#endif
#ifdef PIN_PD15A_EIC_EXTINT_NUM
PIN_PD15A_EIC_EXTINT_NUM,
#else
-1,
#endif
#ifdef PIN_PD16A_EIC_EXTINT_NUM
PIN_PD16A_EIC_EXTINT_NUM,
#else
-1,
#endif
#ifdef PIN_PD17A_EIC_EXTINT_NUM
PIN_PD17A_EIC_EXTINT_NUM,
#else
-1,
#endif
#ifdef PIN_PD18A_EIC_EXTINT_NUM
PIN_PD18A_EIC_EXTINT_NUM,
#else
-1,
#endif
#ifdef PIN_PD19A_EIC_EXTINT_NUM
PIN_PD19A_EIC_EXTINT_NUM,
#else
-1,
#endif
#ifdef PIN_PD20A_EIC_EXTINT_NUM
PIN_PD20A_EIC_EXTINT_NUM,
#else
-1,
#endif
#ifdef PIN_PD21A_EIC_EXTINT_NUM
PIN_PD21A_EIC_EXTINT_NUM,
#else
-1,
#endif
#ifdef PIN_PD22A_EIC_EXTINT_NUM
PIN_PD22A_EIC_EXTINT_NUM,
#else
-1,
#endif
#ifdef PIN_PD23A_EIC_EXTINT_NUM
PIN_PD23A_EIC_EXTINT_NUM,
#else
-1,
#endif
#ifdef PIN_PD24A_EIC_EXTINT_NUM
PIN_PD24A_EIC_EXTINT_NUM,
#else
-1,
#endif
#ifdef PIN_PD25A_EIC_EXTINT_NUM
PIN_PD25A_EIC_EXTINT_NUM,
#else
-1,
#endif
#ifdef PIN_PD26A_EIC_EXTINT_NUM
PIN_PD26A_EIC_EXTINT_NUM,
#else
-1,
#endif
#ifdef PIN_PD27A_EIC_EXTINT_NUM
PIN_PD27A_EIC_EXTINT_NUM,
#else
-1,
#endif
#ifdef PIN_PD28A_EIC_EXTINT_NUM
PIN_PD28A_EIC_EXTINT_NUM,
#else
-1,
#endif
#ifdef PIN_PD29A_EIC_EXTINT_NUM
PIN_PD29A_EIC_EXTINT_NUM,
#else
-1,
#endif
#ifdef PIN_PD30A_EIC_EXTINT_NUM
PIN_PD30A_EIC_EXTINT_NUM,
#else
-1,
#endif
#ifdef PIN_PD31A_EIC_EXTINT_NUM
PIN_PD31A_EIC_EXTINT_NUM,
#else
-1,
#endif
},
#endif
};
#ifdef __cplusplus
}
#endif
#endif /* EXTI_CONFIG_H */
/** @} */

View File

@ -22,6 +22,7 @@
#define PERIPH_CPU_COMMON_H
#include "cpu.h"
#include "exti_config.h"
#ifdef __cplusplus
extern "C" {

View File

@ -77,6 +77,21 @@ RIOT. The following replacements were done for compatibility with newlib:
find -name '*.h' -exec sed -ie 's/_U(/_U_(/g' {} \;
find -name '*.h' -exec sed -ie 's/_L(/_L_(/g' {} \;
## SAMR30 files
samr30: `Atmel.SAMR30_DFP.1.1.35.atpack`
Each atpack has an include subdirectory with the files we copy into
RIOT.
The PIN_($pin)_EIC_EXTINT_NUM macos and integer literal macros (_L_() etc)
were added manually.
It is expected for those to appear in the next atpack release by
Microchip.
If *_EIC_EXTINT_NUM macros are missing after an update, GPIO interrupts
not work. See 93d536f76 for how to generate them.
## SAMR34 files
samr34: `Atmel.SAMR34_DFP.1.0.11.atpacks`

View File

@ -83,6 +83,23 @@ typedef volatile uint8_t RwReg8; /**< Read-Write 8-bit register (volati
#define REG_ACCESS(type, address) (address) /**< Assembly code: Register address */
#endif
#if !defined(SKIP_INTEGER_LITERALS)
#if defined(_U_) || defined(_L_) || defined(_UL_)
#error "Integer Literals macros already defined elsewhere"
#endif
#if !(defined(__ASSEMBLY__) || defined(__IAR_SYSTEMS_ASM__))
/* Macros that deal with adding suffixes to integer literal constants for C/C++ */
#define _U_(x) x ## U /**< C code: Unsigned integer literal constant value */
#define _L_(x) x ## L /**< C code: Long integer literal constant value */
#define _UL_(x) x ## UL /**< C code: Unsigned Long integer literal constant value */
#else /* Assembler */
#define _U_(x) x /**< Assembler: Unsigned integer literal constant value */
#define _L_(x) x /**< Assembler: Long integer literal constant value */
#define _UL_(x) x /**< Assembler: Unsigned Long integer literal constant value */
#endif /* !(defined(__ASSEMBLY__) || defined(__IAR_SYSTEMS_ASM__)) */
#endif /* SKIP_INTEGER_LITERALS */
/* ************************************************************************** */
/** CMSIS DEFINITIONS FOR SAMR30E18A */
/* ************************************************************************** */

View File

@ -83,6 +83,23 @@ typedef volatile uint8_t RwReg8; /**< Read-Write 8-bit register (volati
#define REG_ACCESS(type, address) (address) /**< Assembly code: Register address */
#endif
#if !defined(SKIP_INTEGER_LITERALS)
#if defined(_U_) || defined(_L_) || defined(_UL_)
#error "Integer Literals macros already defined elsewhere"
#endif
#if !(defined(__ASSEMBLY__) || defined(__IAR_SYSTEMS_ASM__))
/* Macros that deal with adding suffixes to integer literal constants for C/C++ */
#define _U_(x) x ## U /**< C code: Unsigned integer literal constant value */
#define _L_(x) x ## L /**< C code: Long integer literal constant value */
#define _UL_(x) x ## UL /**< C code: Unsigned Long integer literal constant value */
#else /* Assembler */
#define _U_(x) x /**< Assembler: Unsigned integer literal constant value */
#define _L_(x) x /**< Assembler: Long integer literal constant value */
#define _UL_(x) x /**< Assembler: Unsigned Long integer literal constant value */
#endif /* !(defined(__ASSEMBLY__) || defined(__IAR_SYSTEMS_ASM__)) */
#endif /* SKIP_INTEGER_LITERALS */
/* ************************************************************************** */
/** CMSIS DEFINITIONS FOR SAMR30G18A */
/* ************************************************************************** */

View File

@ -56,35 +56,6 @@ enum {
};
/** @} */
/**
* @brief Mapping of pins to EXTI lines, -1 means not EXTI possible
*/
static const int8_t exti_config[2][32] = {
#ifdef CPU_MODEL_SAMD21J18A
{ 0, 1, 2, 3, 4, 5, 6, 7, -1, 9, 10, 11, 12, 13, 14, 15,
0, 1, 2, 3, 4, 5, 6, 7, 12, 13, -1, 15, 8, -1, 10, 11},
{ 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15,
0, 1, -1, -1, -1, -1, 6, 7, -1, -1, -1, -1, -1, -1, 14, 15},
#elif CPU_MODEL_SAMD21G18A
{ 0, 1, 2, 3, 4, 5, 6, 7, -1, 9, 10, 11, 12, 13, 14, 15,
0, 1, 2, 3, 4, 5, 6, 7, 12, 13, -1, 15, 8, -1, 10, 11},
{-1, -1, 2, 3, -1, -1, -1, -1, 8, 9, 10, 11, -1, -1, -1, -1,
-1, -1, -1, -1, -1, -1, 6, 7, -1, -1, -1, -1, -1, -1, -1, -1},
#elif CPU_MODEL_SAMR21G18A
{-1, 1, -1, -1, 4, 5, 6, 7, -1, 9, 10, 11, 12, 13, 14, 15,
-1, 1, 2, 3, -1, -1, 6, 7, 12, 13, -1, 15, 8, -1, 10, 11},
{ 0, -1, 2, 3, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
0, 1, -1, -1, -1, -1, 6, 7, -1, -1, -1, -1, 8, -1, -1, -1},
#elif CPU_MODEL_SAMR21E18A
{-1, -1, -1, -1, -1, -1, 6, 7, -1, 9, 10, 11, -1, -1, 14, 15,
-1, 1, 2, 3, -1, -1, -1, -1, 12, 13, -1, 15, 8, -1, 10, 11},
{ 0, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
0, 1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1},
#else
#error Please define a proper CPU_MODEL.
#endif
};
/**
* @brief Override SPI hardware chip select macro
*

View File

@ -55,33 +55,6 @@ enum {
};
/** @} */
/**
* @brief Mapping of pins to EXTI lines, -1 means not EXTI possible
*/
static const int8_t exti_config[4][32] = {
#ifdef CPU_MODEL_SAMD51J20A
{ 0, 1, 2, 3, 4, 5, 6, 7, -1, 9, 10, 11, 12, 13, 14, 15,
0, 1, 2, 3, 4, 5, 6, 7, 8, 9, -1, 11, -1, -1, 14, 15 },
{ 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15,
0, 1, -1, -1, -1, -1, 6, 7, -1, -1, -1, -1, -1, -1, 14, 15 },
{-1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1 },
{-1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1 },
#elif CPU_MODEL_SAME54P20A
{ 0, 1, 2, 3, 4, 5, 6, 7, -1, 9, 10, 11, 12, 13, 14, 15,
0, 1, 2, 3, 4, 5, 6, 7, 8, 9, -1, 11, -1, -1, 14, 15 },
{ 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15,
0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 12, 13, 14, 15, 14, 15 },
{ 0, 1, 2, 3, 4, 5, 6, 9, -1, -1, 10, 11, 12, 13, 14, 15,
0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, -1, 14, 15 },
{ 0, 1, -1, -1, -1, -1, -1, -1, 3, 4, 5, 6, 7, -1, -1, -1,
-1, -1, -1, -1, 10, 11, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1 }
#else
#error Please define a proper CPU_MODEL.
#endif
};
/**
* @brief Override SPI hardware chip select macro
*

View File

@ -42,14 +42,6 @@ enum {
};
/** @} */
/**
* @brief Mapping of pins to EXTI lines, -1 means not EXTI possible
*/
static const int8_t exti_config[1][32] = {
{ 0, 1, 2, 3, 4, 5, 6, 7, -1, 0, 1, 2, -1, -1, 3, 4,
5, 6, 7, 0, -1, -1, 1, 2, 3, 4, -1, 5, -1, -1, 6, 7},
};
#ifndef DOXYGEN
#define HAVE_ADC_RES_T
typedef enum {

View File

@ -41,49 +41,6 @@ enum {
};
/** @} */
/**
* @brief Mapping of pins to EXTI lines, -1 means not EXTI possible
*/
#if defined(CPU_MODEL_SAML21E18A) || defined(CPU_MODEL_SAML21E18B) || \
defined(CPU_MODEL_SAML21E17A) || defined(CPU_MODEL_SAML21E17B) || \
defined(CPU_MODEL_SAML21E16A) || defined(CPU_MODEL_SAML21E16B) || \
defined(CPU_MODEL_SAML21E15A) || defined(CPU_MODEL_SAML21E15B)
static const int8_t exti_config[1][32] = {
{ 0, 1, 2, 3, 4, 5, 6, 7, -1, 9, 10, 11, -1, -1, 14, 15,
0, 1, 2, 3, -1, -1, 6, 7, 12, 13, -1, 15, -1, -1, 10, 11},
};
#else /* CPU_MODEL_SAML21E */
static const int8_t exti_config[2][32] = {
#if defined(CPU_MODEL_SAML21G18A) || defined(CPU_MODEL_SAML21G18B) || \
defined(CPU_MODEL_SAML21G17A) || defined(CPU_MODEL_SAML21G17B) || \
defined(CPU_MODEL_SAML21G16A) || defined(CPU_MODEL_SAML21G16B)
{ 0, 1, 2, 3, 4, 5, 6, 7, -1, 9, 10, 11, 12, 13, 14, 15,
0, 1, 2, 3, 4, 5, 6, 7, 12, 13, -1, 15, -1, -1, 10, 11},
{-1, -1, 2, 3, -1, -1, -1, -1, 8, 9, 10, 11, -1, -1, -1, -1,
-1, -1, -1, -1, -1, -1, 6, 7, -1, -1, -1, -1, -1, -1, -1, -1},
#elif defined(CPU_MODEL_SAML21J18A) || defined(CPU_MODEL_SAML21J18B) || \
defined(CPU_MODEL_SAML21J17A) || defined(CPU_MODEL_SAML21J17B) || \
defined(CPU_MODEL_SAML21J16A) || defined(CPU_MODEL_SAML21J16B)
{ 0, 1, 2, 3, 4, 5, 6, 7, -1, 9, 10, 11, 12, 13, 14, 15,
0, 1, 2, 3, 4, 5, 6, 7, 12, 13, -1, 15, -1, -1, 10, 11},
{ 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15,
0, 1, -1, -1, -1, -1, 6, 7, -1, -1, -1, -1, -1, -1, 14, 15},
#elif defined(CPU_MODEL_SAMR30G18A) || defined(CPU_MODEL_SAMR34J18B)
{ 0, 1, -1, -1, 4, 5, 6, 7, -1, 9, 10, 11, 12, 13, 14, 15,
0, 1, 2, 3, 4, -1, 6, 7, 12, 13, -1, 15, 8, -1, 10, 11},
{ 0, -1, 2, 3, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 15,
0, 1, -1, -1, -1, -1, 6, 7, -1, -1, -1, -1, -1, -1, 14, 15},
#elif defined(CPU_MODEL_SAMR30E18A)
{-1, -1, -1, -1, -1, -1, 6, 7, -1, 9, 10, 11, -1, -1, 14, 15,
0, 1, 2, 3, 4, -1, -1, -1, 12, 13, -1, 15, 8, -1, 10, 11},
{ 0, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 15,
0, 1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 14, 15},
#else
#error Please define a proper CPU_MODEL.
#endif
};
#endif /* CPU_MODEL_SAML21E */
#ifndef DOXYGEN
#define HAVE_ADC_RES_T
typedef enum {