From 69d0f4424a5c9d2bba4ec7c8a69968d7ae034f77 Mon Sep 17 00:00:00 2001 From: Marti Bolivar Date: Mon, 18 Jul 2011 14:07:17 -0400 Subject: Move STM32 config from libmaple.h into stm32.h. --- libmaple/libmaple.h | 39 --------------------------------------- libmaple/stm32.h | 39 +++++++++++++++++++++++++++++++++++++++ 2 files changed, 39 insertions(+), 39 deletions(-) (limited to 'libmaple') 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 -- cgit v1.2.3