aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--libmaple/include/libmaple/stm32.h27
-rw-r--r--libmaple/stm32f2/include/series/stm32.h2
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)