From 22119442336d1a7ef12c8ca4c41af881fecf8dfb Mon Sep 17 00:00:00 2001 From: Karl Palsson Date: Tue, 30 Sep 2014 22:32:52 +0000 Subject: [PATCH] stm32: exti: Define all irqs in common header. There's more exti lines on many more devices now. F0 and F3 have extras, as did L1 and L0. There's no real reason not to have higher order EXTI definitions defined at the top level, and it reduces the number of files to merge together to find all definitions for the bigger devices. Signed-off-by: Karl Palsson Fixes #338 --- .../libopencm3/stm32/common/exti_common_all.h | 19 ++++++++ .../stm32/common/exti_common_l1f24.h | 45 ------------------- include/libopencm3/stm32/f2/exti.h | 2 +- include/libopencm3/stm32/f4/exti.h | 2 +- include/libopencm3/stm32/l1/exti.h | 2 +- 5 files changed, 22 insertions(+), 48 deletions(-) delete mode 100644 include/libopencm3/stm32/common/exti_common_l1f24.h diff --git a/include/libopencm3/stm32/common/exti_common_all.h b/include/libopencm3/stm32/common/exti_common_all.h index 317c2670..18596ad4 100644 --- a/include/libopencm3/stm32/common/exti_common_all.h +++ b/include/libopencm3/stm32/common/exti_common_all.h @@ -59,6 +59,25 @@ #define EXTI17 (1 << 17) #define EXTI18 (1 << 18) #define EXTI19 (1 << 19) +#define EXTI20 (1 << 20) +#define EXTI21 (1 << 21) +#define EXTI22 (1 << 22) +#define EXTI23 (1 << 23) +#define EXTI24 (1 << 24) +#define EXTI25 (1 << 25) +#define EXTI26 (1 << 26) +#define EXTI27 (1 << 27) +#define EXTI28 (1 << 28) +#define EXTI29 (1 << 29) +#define EXTI30 (1 << 30) +#define EXTI31 (1 << 31) + +#define EXTI32 (1 << 0) +#define EXTI33 (1 << 1) +#define EXTI34 (1 << 2) +#define EXTI35 (1 << 3) +#define EXTI36 (1 << 4) +#define EXTI37 (1 << 5) /* Trigger types */ enum exti_trigger_type { diff --git a/include/libopencm3/stm32/common/exti_common_l1f24.h b/include/libopencm3/stm32/common/exti_common_l1f24.h deleted file mode 100644 index 60f5c1b3..00000000 --- a/include/libopencm3/stm32/common/exti_common_l1f24.h +++ /dev/null @@ -1,45 +0,0 @@ -/** @addtogroup exti_defines - * - * @author @htmlonly © @endhtmlonly 2010 - * Mark Butler - */ -/* - * This file is part of the libopencm3 project. - * - * Copyright (C) 2010 Mark Butler - * - * This library is free software: you can redistribute it and/or modify - * it under the terms of the GNU Lesser General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public License - * along with this library. If not, see . - */ - -/** @cond */ -#if defined(LIBOPENCM3_EXTI_H) -/** @endcond */ -#ifndef LIBOPENCM3_EXTI_COMMON_F24_H -#define LIBOPENCM3_EXTI_COMMON_F24_H -/**@{*/ - -#include - -/* EXTI number definitions */ -#define EXTI20 (1 << 20) -#define EXTI21 (1 << 21) -#define EXTI22 (1 << 22) -/**@}*/ - -#endif -/** @cond */ -#else -#warning "exti_common_f24.h should not be included directly, only via exti.h" -#endif -/** @endcond */ diff --git a/include/libopencm3/stm32/f2/exti.h b/include/libopencm3/stm32/f2/exti.h index 5caadf8f..d21a921a 100644 --- a/include/libopencm3/stm32/f2/exti.h +++ b/include/libopencm3/stm32/f2/exti.h @@ -36,6 +36,6 @@ #ifndef LIBOPENCM3_EXTI_H #define LIBOPENCM3_EXTI_H -#include +#include #endif diff --git a/include/libopencm3/stm32/f4/exti.h b/include/libopencm3/stm32/f4/exti.h index 727b5771..b9106787 100644 --- a/include/libopencm3/stm32/f4/exti.h +++ b/include/libopencm3/stm32/f4/exti.h @@ -36,6 +36,6 @@ #ifndef LIBOPENCM3_EXTI_H #define LIBOPENCM3_EXTI_H -#include +#include #endif diff --git a/include/libopencm3/stm32/l1/exti.h b/include/libopencm3/stm32/l1/exti.h index 2c14c95f..0f309537 100644 --- a/include/libopencm3/stm32/l1/exti.h +++ b/include/libopencm3/stm32/l1/exti.h @@ -36,6 +36,6 @@ #ifndef LIBOPENCM3_EXTI_H #define LIBOPENCM3_EXTI_H -#include +#include #endif