aboutsummaryrefslogtreecommitdiffstats
path: root/libmaple/include
diff options
context:
space:
mode:
authorMarti Bolivar <mbolivar@leaflabs.com>2011-11-29 02:26:22 -0500
committerMarti Bolivar <mbolivar@leaflabs.com>2012-04-11 16:56:52 -0400
commit3cbf2d87bfbf2d5c680525197dee861fe9a6c575 (patch)
tree315d554740e775435309366948adb0eb756fda5b /libmaple/include
parentc2a937bbb56294df10eec082ab23c353edf4629b (diff)
downloadlibrambutan-3cbf2d87bfbf2d5c680525197dee861fe9a6c575.tar.gz
librambutan-3cbf2d87bfbf2d5c680525197dee861fe9a6c575.zip
libmaple/stm32: Add enum stm32_series, STM32_MCU_SERIES.
enum stm32_series gives a tag to each STM32 series, including the ones we don't yet support. STM32_MCU_SERIES is a define which the series stm32.h header must provide, identifying the series of the MCU being targeted. Signed-off-by: Marti Bolivar <mbolivar@leaflabs.com>
Diffstat (limited to 'libmaple/include')
-rw-r--r--libmaple/include/libmaple/stm32.h22
1 files changed, 20 insertions, 2 deletions
diff --git a/libmaple/include/libmaple/stm32.h b/libmaple/include/libmaple/stm32.h
index 356a360..4c0898b 100644
--- a/libmaple/include/libmaple/stm32.h
+++ b/libmaple/include/libmaple/stm32.h
@@ -36,8 +36,21 @@
extern "C" {
#endif
-/* Everything enclosed in the following __DOXYGEN_PREDEFINED_HACK
- * conditional block must be defined in the series header. */
+/**
+ * @brief STM32 series identifiers.
+ */
+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;
+
+/* The series header is responsible for defining:
+ *
+ * - Everything enclosed in the following __DOXYGEN_PREDEFINED_HACK
+ * conditional block.
+ */
#include <series/stm32.h>
#ifdef __DOXYGEN_PREDEFINED_HACK
@@ -70,6 +83,11 @@ extern "C" {
*/
/**
+ * @brief enum stm32_series value for the MCU being targeted.
+ */
+#define STM32_MCU_SERIES
+
+/**
* @brief Number of interrupts in the vector table.
*
* This does not include Cortex-M interrupts (NMI, HardFault, etc.).