From 0ac67559bb4d69557c866bd6bdde4a9402bc2ff0 Mon Sep 17 00:00:00 2001 From: Marti Bolivar Date: Tue, 10 Jan 2012 13:51:48 -0500 Subject: stm32f2/stm32.h: Add support for STM32F207IG. Signed-off-by: Marti Bolivar --- libmaple/include/libmaple/stm32.h | 27 ++++++++++++++++++--------- libmaple/stm32f2/include/series/stm32.h | 2 +- 2 files changed, 19 insertions(+), 10 deletions(-) diff --git a/libmaple/include/libmaple/stm32.h b/libmaple/include/libmaple/stm32.h index 4c0898b..3f86faa 100644 --- a/libmaple/include/libmaple/stm32.h +++ b/libmaple/include/libmaple/stm32.h @@ -36,15 +36,20 @@ extern "C" { #endif -/** - * @brief STM32 series identifiers. +/* + * STM32 series identifiers. + * + * Don't make these into an enum; the preprocessor needs them. */ -typedef enum stm32_series { - STM32_SERIES_F1, /**< F1 series */ - STM32_SERIES_F2, /**< F2 series */ - STM32_SERIES_L1, /**< L1 series */ - STM32_SERIES_F4, /**< F4 series */ -} stm32_series; + +/** STM32F1 series. */ +#define STM32_SERIES_F1 0 +/** STM32F2 series. */ +#define STM32_SERIES_F2 1 +/** STM32L1 series. */ +#define STM32_SERIES_L1 2 +/** STM32F4 series. */ +#define STM32_SERIES_F4 3 /* The series header is responsible for defining: * @@ -83,7 +88,11 @@ typedef enum stm32_series { */ /** - * @brief enum stm32_series value for the MCU being targeted. + * @brief STM32 series value for the MCU being targeted. + * + * At time of writing, allowed values are: STM32_SERIES_F1, + * STM32_SERIES_F2. This set of values will expand as libmaple adds + * support for more STM32 series MCUs. */ #define STM32_MCU_SERIES diff --git a/libmaple/stm32f2/include/series/stm32.h b/libmaple/stm32f2/include/series/stm32.h index 8b14a7d..7ae53b2 100644 --- a/libmaple/stm32f2/include/series/stm32.h +++ b/libmaple/stm32f2/include/series/stm32.h @@ -68,7 +68,7 @@ extern "C" { #define STM32_MCU_SERIES STM32_SERIES_F2 -#if defined(MCU_STM32F207IC) +#if defined(MCU_STM32F207IC) || defined(MCU_STM32F207IG) # define STM32_NR_GPIO_PORTS 9 # define STM32_SRAM_END ((void*)0x20020000) -- cgit v1.2.3