aboutsummaryrefslogtreecommitdiffstats
path: root/libmaple
diff options
context:
space:
mode:
authorMarti Bolivar <mbolivar@leaflabs.com>2011-07-18 14:07:17 -0400
committerMarti Bolivar <mbolivar@leaflabs.com>2011-07-18 14:07:17 -0400
commit69d0f4424a5c9d2bba4ec7c8a69968d7ae034f77 (patch)
tree159e51a76981ac875e134524a218613d8e9211bb /libmaple
parent81ce22382b7bcff35a928a35bf7cdaa20463d777 (diff)
downloadlibrambutan-69d0f4424a5c9d2bba4ec7c8a69968d7ae034f77.tar.gz
librambutan-69d0f4424a5c9d2bba4ec7c8a69968d7ae034f77.zip
Move STM32 config from libmaple.h into stm32.h.
Diffstat (limited to 'libmaple')
-rw-r--r--libmaple/libmaple.h39
-rw-r--r--libmaple/stm32.h39
2 files changed, 39 insertions, 39 deletions
diff --git a/libmaple/libmaple.h b/libmaple/libmaple.h
index c517c6e..c509f5d 100644
--- a/libmaple/libmaple.h
+++ b/libmaple/libmaple.h
@@ -46,44 +46,5 @@
#define USER_ADDR_RAM 0x20000C00
#define STACK_TOP 0x20000800
-/* MCU-specific configuration */
-#if defined(MCU_STM32F103RB)
- /* e.g., LeafLabs Maple */
-
- /* Number of GPIO ports (GPIOA, GPIOB, etc.) */
- #define NR_GPIO_PORTS 4
-
- /* SRAM size, in bytes */
- #define SRAM_SIZE 0x5000
-
-#elif defined(MCU_STM32F103ZE)
- /* e.g., LeafLabs Maple Native */
-
- #define NR_GPIO_PORTS 7
- #define SRAM_SIZE 0x10000
-
-#elif defined(MCU_STM32F103CB)
- /* e.g., LeafLabs Maple Mini */
-
- /* Note that this is not, strictly speaking, true. But only pins
- 0 and 1 exist, and they're used for OSC on the Mini, so we'll
- live with this for now. */
- #define NR_GPIO_PORTS 3
-
- #define SRAM_SIZE 0x5000
-
-#elif defined(MCU_STM32F103RE)
- /* e.g., LeafLabs Maple RET6 edition */
-
- #define NR_GPIO_PORTS 4
- #define SRAM_SIZE 0x10000
-
-#else
-
-#error "No MCU type specified. Add something like -DMCU_STM32F103RB " \
- "to your compiler arguments (probably in a Makefile)."
-
-#endif
-
#endif
diff --git a/libmaple/stm32.h b/libmaple/stm32.h
index 985b941..d7e946e 100644
--- a/libmaple/stm32.h
+++ b/libmaple/stm32.h
@@ -22,5 +22,44 @@
#endif
#endif
+/* MCU-specific configuration */
+#if defined(MCU_STM32F103RB)
+ /* e.g., LeafLabs Maple */
+
+ /* Number of GPIO ports (GPIOA, GPIOB, etc.) */
+ #define NR_GPIO_PORTS 4
+
+ /* SRAM size, in bytes */
+ #define SRAM_SIZE 0x5000
+
+#elif defined(MCU_STM32F103ZE)
+ /* e.g., LeafLabs Maple Native */
+
+ #define NR_GPIO_PORTS 7
+ #define SRAM_SIZE 0x10000
+
+#elif defined(MCU_STM32F103CB)
+ /* e.g., LeafLabs Maple Mini */
+
+ /* Note that this is not, strictly speaking, true. But only pins
+ 0 and 1 exist, and they're used for OSC on the Mini, so we'll
+ live with this for now. */
+ #define NR_GPIO_PORTS 3
+
+ #define SRAM_SIZE 0x5000
+
+#elif defined(MCU_STM32F103RE)
+ /* e.g., LeafLabs Maple RET6 edition */
+
+ #define NR_GPIO_PORTS 4
+ #define SRAM_SIZE 0x10000
+
+#else
+
+#error "No MCU type specified. Add something like -DMCU_STM32F103RB " \
+ "to your compiler arguments (probably in a Makefile)."
+
+#endif
+
#endif