aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMarti Bolivar <mbolivar@leaflabs.com>2012-04-05 16:44:11 -0400
committerMarti Bolivar <mbolivar@leaflabs.com>2012-04-11 16:56:56 -0400
commitfb061ae2e50a81904797146c3b5de8156dfd3f91 (patch)
tree64278d931487d727a8d25f5d5d3e326fb534c73b
parent342c8de23e22b0b91daafb412f47b13deddf2128 (diff)
downloadlibrambutan-fb061ae2e50a81904797146c3b5de8156dfd3f91.tar.gz
librambutan-fb061ae2e50a81904797146c3b5de8156dfd3f91.zip
Don't conditionally compile rcc_clk_id or nvic_irq_num enumerators.
Whether or not a given peripheral is present on an F1 series MCU doesn't matter. It doesn't take up any extra space to include these enumerators, and it's convenient to have them defined so portable libmaple routines can safely refer to them. This can prevent the need for special series-specific versions of some functions. Signed-off-by: Marti Bolivar <mbolivar@leaflabs.com>
-rw-r--r--libmaple/stm32f1/include/series/nvic.h2
-rw-r--r--libmaple/stm32f1/include/series/rcc.h4
2 files changed, 0 insertions, 6 deletions
diff --git a/libmaple/stm32f1/include/series/nvic.h b/libmaple/stm32f1/include/series/nvic.h
index 69fd945..33783f3 100644
--- a/libmaple/stm32f1/include/series/nvic.h
+++ b/libmaple/stm32f1/include/series/nvic.h
@@ -102,7 +102,6 @@ typedef enum nvic_irq_num {
NVIC_TIMER8_UP = 44, /**< Timer 8 update */
NVIC_TIMER8_TRG_COM = 45, /**< Timer 8 trigger and commutation */
NVIC_TIMER8_CC = 46, /**< Timer 8 capture/compare */
-#ifdef STM32_HIGH_DENSITY
NVIC_ADC3 = 47, /**< ADC3 */
NVIC_FSMC = 48, /**< FSMC */
NVIC_SDIO = 49, /**< SDIO */
@@ -116,7 +115,6 @@ typedef enum nvic_irq_num {
NVIC_DMA2_CH2 = 57, /**< DMA2 channel 2 */
NVIC_DMA2_CH3 = 58, /**< DMA2 channel 3 */
NVIC_DMA2_CH_4_5 = 59, /**< DMA2 channels 4 and 5 */
-#endif
} nvic_irq_num;
static inline void nvic_irq_disable_all(void) {
diff --git a/libmaple/stm32f1/include/series/rcc.h b/libmaple/stm32f1/include/series/rcc.h
index 1eb913a..f60b07b 100644
--- a/libmaple/stm32f1/include/series/rcc.h
+++ b/libmaple/stm32f1/include/series/rcc.h
@@ -421,7 +421,6 @@ typedef enum rcc_clk_id {
RCC_FLITF,
RCC_SRAM,
RCC_USB,
-#if defined(STM32_HIGH_DENSITY) || defined(STM32_XL_DENSITY)
RCC_GPIOE,
RCC_GPIOF,
RCC_GPIOG,
@@ -436,15 +435,12 @@ typedef enum rcc_clk_id {
RCC_DMA2,
RCC_SDIO,
RCC_SPI3,
-#endif
-#ifdef STM32_XL_DENSITY
RCC_TIMER9,
RCC_TIMER10,
RCC_TIMER11,
RCC_TIMER12,
RCC_TIMER13,
RCC_TIMER14,
-#endif
} rcc_clk_id;
/**